LLVM  8.0.1
MSP430MachineFunctionInfo.h
Go to the documentation of this file.
1 //=== MSP430MachineFunctionInfo.h - MSP430 machine function info -*- C++ -*-==//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares MSP430-specific per-machine-function information.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H
15 #define LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H
16 
18 
19 namespace llvm {
20 
21 /// MSP430MachineFunctionInfo - This class is derived from MachineFunction and
22 /// contains private MSP430 target-specific information for each MachineFunction.
24  virtual void anchor();
25 
26  /// CalleeSavedFrameSize - Size of the callee-saved register portion of the
27  /// stack frame in bytes.
28  unsigned CalleeSavedFrameSize;
29 
30  /// ReturnAddrIndex - FrameIndex for return slot.
31  int ReturnAddrIndex;
32 
33  /// VarArgsFrameIndex - FrameIndex for start of varargs area.
34  int VarArgsFrameIndex;
35 
36  /// SRetReturnReg - Some subtargets require that sret lowering includes
37  /// returning the value of the returned struct in a register. This field
38  /// holds the virtual register into which the sret argument is passed.
39  unsigned SRetReturnReg;
40 
41 public:
42  MSP430MachineFunctionInfo() : CalleeSavedFrameSize(0) {}
43 
45  : CalleeSavedFrameSize(0), ReturnAddrIndex(0), SRetReturnReg(0) {}
46 
47  unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
48  void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }
49 
50  unsigned getSRetReturnReg() const { return SRetReturnReg; }
51  void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; }
52 
53  int getRAIndex() const { return ReturnAddrIndex; }
54  void setRAIndex(int Index) { ReturnAddrIndex = Index; }
55 
56  int getVarArgsFrameIndex() const { return VarArgsFrameIndex;}
57  void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
58 };
59 
60 } // End llvm namespace
61 
62 #endif
MSP430MachineFunctionInfo - This class is derived from MachineFunction and contains private MSP430 ta...
This class represents lattice values for constants.
Definition: AllocatorList.h:24
unsigned Reg
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...