Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / Lanai / LanaiMachineFunctionInfo.h
blob81f4a122d022f45c120984277c44a114dec18db9
1 //===- LanaiMachineFuctionInfo.h - Lanai machine func info -------*- C++ -*-==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares Lanai-specific per-machine-function information.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H
14 #define LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H
16 #include "LanaiRegisterInfo.h"
17 #include "llvm/CodeGen/MachineFunction.h"
18 #include "llvm/CodeGen/MachineRegisterInfo.h"
20 namespace llvm {
22 // LanaiMachineFunctionInfo - This class is derived from MachineFunction and
23 // contains private Lanai target-specific information for each MachineFunction.
24 class LanaiMachineFunctionInfo : public MachineFunctionInfo {
25 virtual void anchor();
27 // SRetReturnReg - Lanai ABI require that sret lowering includes
28 // returning the value of the returned struct in a register. This field
29 // holds the virtual register into which the sret argument is passed.
30 Register SRetReturnReg;
32 // GlobalBaseReg - keeps track of the virtual register initialized for
33 // use as the global base register. This is used for PIC in some PIC
34 // relocation models.
35 Register GlobalBaseReg;
37 // VarArgsFrameIndex - FrameIndex for start of varargs area.
38 int VarArgsFrameIndex;
40 public:
41 LanaiMachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
42 : VarArgsFrameIndex(0) {}
43 MachineFunctionInfo *
44 clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF,
45 const DenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)
46 const override;
48 Register getSRetReturnReg() const { return SRetReturnReg; }
49 void setSRetReturnReg(Register Reg) { SRetReturnReg = Reg; }
51 int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
52 void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
55 } // namespace llvm
57 #endif // LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H