LLVM  13.0.0git
MSP430MachineFunctionInfo.h
Go to the documentation of this file.
1 //=== MSP430MachineFunctionInfo.h - MSP430 machine function 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 MSP430-specific per-machine-function information.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H
14 #define LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H
15 
17 
18 namespace llvm {
19 
20 /// MSP430MachineFunctionInfo - This class is derived from MachineFunction and
21 /// contains private MSP430 target-specific information for each MachineFunction.
23  virtual void anchor();
24 
25  /// CalleeSavedFrameSize - Size of the callee-saved register portion of the
26  /// stack frame in bytes.
27  unsigned CalleeSavedFrameSize = 0;
28 
29  /// ReturnAddrIndex - FrameIndex for return slot.
30  int ReturnAddrIndex = 0;
31 
32  /// VarArgsFrameIndex - FrameIndex for start of varargs area.
33  int VarArgsFrameIndex = 0;
34 
35  /// SRetReturnReg - Some subtargets require that sret lowering includes
36  /// returning the value of the returned struct in a register. This field
37  /// holds the virtual register into which the sret argument is passed.
38  Register SRetReturnReg;
39 
40 public:
41  MSP430MachineFunctionInfo() = default;
42 
44  : CalleeSavedFrameSize(0), ReturnAddrIndex(0), SRetReturnReg(0) {}
45 
46  unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
47  void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }
48 
49  Register getSRetReturnReg() const { return SRetReturnReg; }
50  void setSRetReturnReg(Register Reg) { SRetReturnReg = Reg; }
51 
52  int getRAIndex() const { return ReturnAddrIndex; }
53  void setRAIndex(int Index) { ReturnAddrIndex = Index; }
54 
55  int getVarArgsFrameIndex() const { return VarArgsFrameIndex;}
56  void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
57 };
58 
59 } // End llvm namespace
60 
61 #endif
llvm
Definition: AllocatorList.h:23
Reg
unsigned Reg
Definition: MachineSink.cpp:1566
llvm::MSP430MachineFunctionInfo::setVarArgsFrameIndex
void setVarArgsFrameIndex(int Index)
Definition: MSP430MachineFunctionInfo.h:56
llvm::MSP430MachineFunctionInfo::MSP430MachineFunctionInfo
MSP430MachineFunctionInfo(MachineFunction &MF)
Definition: MSP430MachineFunctionInfo.h:43
llvm::MSP430MachineFunctionInfo
MSP430MachineFunctionInfo - This class is derived from MachineFunction and contains private MSP430 ta...
Definition: MSP430MachineFunctionInfo.h:22
llvm::MSP430MachineFunctionInfo::MSP430MachineFunctionInfo
MSP430MachineFunctionInfo()=default
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
llvm::MSP430MachineFunctionInfo::getVarArgsFrameIndex
int getVarArgsFrameIndex() const
Definition: MSP430MachineFunctionInfo.h:55
llvm::MSP430MachineFunctionInfo::setCalleeSavedFrameSize
void setCalleeSavedFrameSize(unsigned bytes)
Definition: MSP430MachineFunctionInfo.h:47
llvm::MSP430MachineFunctionInfo::getCalleeSavedFrameSize
unsigned getCalleeSavedFrameSize() const
Definition: MSP430MachineFunctionInfo.h:46
llvm::MachineFunction
Definition: MachineFunction.h:230
llvm::MSP430MachineFunctionInfo::getRAIndex
int getRAIndex() const
Definition: MSP430MachineFunctionInfo.h:52
llvm::MSP430MachineFunctionInfo::getSRetReturnReg
Register getSRetReturnReg() const
Definition: MSP430MachineFunctionInfo.h:49
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::MSP430MachineFunctionInfo::setSRetReturnReg
void setSRetReturnReg(Register Reg)
Definition: MSP430MachineFunctionInfo.h:50
llvm::MSP430MachineFunctionInfo::setRAIndex
void setRAIndex(int Index)
Definition: MSP430MachineFunctionInfo.h:53
MachineFunction.h
llvm::MachineFunctionInfo
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
Definition: MachineFunction.h:95