LLVM  15.0.0git
LanaiMachineFunctionInfo.h
Go to the documentation of this file.
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.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H
14 #define LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H
15 
16 #include "LanaiRegisterInfo.h"
19 
20 namespace llvm {
21 
22 // LanaiMachineFunctionInfo - This class is derived from MachineFunction and
23 // contains private Lanai target-specific information for each MachineFunction.
25  virtual void anchor();
26 
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;
31 
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;
36 
37  // VarArgsFrameIndex - FrameIndex for start of varargs area.
38  int VarArgsFrameIndex;
39 
40 public:
42  : VarArgsFrameIndex(0) {}
46  const override;
47 
48  Register getSRetReturnReg() const { return SRetReturnReg; }
49  void setSRetReturnReg(Register Reg) { SRetReturnReg = Reg; }
50 
51  int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
52  void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
53 };
54 
55 } // namespace llvm
56 
57 #endif // LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::X86Disassembler::Reg
Reg
All possible values of the reg field in the ModR/M byte.
Definition: X86DisassemblerDecoder.h:462
llvm::LanaiMachineFunctionInfo
Definition: LanaiMachineFunctionInfo.h:24
LanaiRegisterInfo.h
MachineRegisterInfo.h
llvm::LanaiMachineFunctionInfo::setVarArgsFrameIndex
void setVarArgsFrameIndex(int Index)
Definition: LanaiMachineFunctionInfo.h:52
llvm::dwarf::Index
Index
Definition: Dwarf.h:472
llvm::BumpPtrAllocatorImpl
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:63
llvm::DenseMap
Definition: DenseMap.h:716
llvm::MachineFunction
Definition: MachineFunction.h:257
llvm::LanaiMachineFunctionInfo::getVarArgsFrameIndex
int getVarArgsFrameIndex() const
Definition: LanaiMachineFunctionInfo.h:51
llvm::LanaiMachineFunctionInfo::clone
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
Definition: LanaiMachineFunctionInfo.cpp:15
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::LanaiMachineFunctionInfo::setSRetReturnReg
void setSRetReturnReg(Register Reg)
Definition: LanaiMachineFunctionInfo.h:49
llvm::LanaiMachineFunctionInfo::LanaiMachineFunctionInfo
LanaiMachineFunctionInfo(MachineFunction &MF)
Definition: LanaiMachineFunctionInfo.h:41
Allocator
Basic Register Allocator
Definition: RegAllocBasic.cpp:142
MachineFunction.h
llvm::MachineFunctionInfo
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
Definition: MachineFunction.h:95
llvm::LanaiMachineFunctionInfo::getSRetReturnReg
Register getSRetReturnReg() const
Definition: LanaiMachineFunctionInfo.h:48