llvm.org GIT mirror llvm / d0c71cf
Use default member initializers to deduplicate code in X86MachineFunctionInfo, NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241609 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 5 years ago
1 changed file(s) with 18 addition(s) and 49 deletion(s). Raw diff Collapse all Expand all
2929 /// pointer for reasons other than it containing dynamic allocation or
3030 /// that FP eliminatation is turned off. For example, Cygwin main function
3131 /// contains stack pointer re-alignment code which requires FP.
32 bool ForceFramePointer;
32 bool ForceFramePointer = false;
3333
3434 /// RestoreBasePointerOffset - Non-zero if the function has base pointer
3535 /// and makes call to llvm.eh.sjlj.setjmp. When non-zero, the value is a
3636 /// displacement from the frame pointer to a slot where the base pointer
3737 /// is stashed.
38 signed char RestoreBasePointerOffset;
38 signed char RestoreBasePointerOffset = 0;
3939
4040 /// CalleeSavedFrameSize - Size of the callee-saved register portion of the
4141 /// stack frame in bytes.
42 unsigned CalleeSavedFrameSize;
42 unsigned CalleeSavedFrameSize = 0;
4343
4444 /// BytesToPopOnReturn - Number of bytes function pops on return (in addition
4545 /// to the space used by the return address).
4646 /// Used on windows platform for stdcall & fastcall name decoration
47 unsigned BytesToPopOnReturn;
47 unsigned BytesToPopOnReturn = 0;
4848
4949 /// ReturnAddrIndex - FrameIndex for return slot.
50 int ReturnAddrIndex;
50 int ReturnAddrIndex = 0;
5151
5252 /// \brief FrameIndex for return slot.
53 int FrameAddrIndex;
53 int FrameAddrIndex = 0;
5454
5555 /// TailCallReturnAddrDelta - The number of bytes by which return address
5656 /// stack slot is moved as the result of tail call optimization.
57 int TailCallReturnAddrDelta;
57 int TailCallReturnAddrDelta = 0;
5858
5959 /// SRetReturnReg - Some subtargets require that sret lowering includes
6060 /// returning the value of the returned struct in a register. This field
6161 /// holds the virtual register into which the sret argument is passed.
62 unsigned SRetReturnReg;
62 unsigned SRetReturnReg = 0;
6363
6464 /// GlobalBaseReg - keeps track of the virtual register initialized for
6565 /// use as the global base register. This is used for PIC in some PIC
6666 /// relocation models.
67 unsigned GlobalBaseReg;
67 unsigned GlobalBaseReg = 0;
6868
6969 /// VarArgsFrameIndex - FrameIndex for start of varargs area.
70 int VarArgsFrameIndex;
70 int VarArgsFrameIndex = 0;
7171 /// RegSaveFrameIndex - X86-64 vararg func register save area.
72 int RegSaveFrameIndex;
72 int RegSaveFrameIndex = 0;
7373 /// VarArgsGPOffset - X86-64 vararg func int reg offset.
74 unsigned VarArgsGPOffset;
74 unsigned VarArgsGPOffset = 0;
7575 /// VarArgsFPOffset - X86-64 vararg func fp reg offset.
76 unsigned VarArgsFPOffset;
76 unsigned VarArgsFPOffset = 0;
7777 /// ArgumentStackSize - The number of bytes on stack consumed by the arguments
7878 /// being passed on the stack.
79 unsigned ArgumentStackSize;
79 unsigned ArgumentStackSize = 0;
8080 /// NumLocalDynamics - Number of local-dynamic TLS accesses.
81 unsigned NumLocalDynamics;
81 unsigned NumLocalDynamics = 0;
8282 /// HasPushSequences - Keeps track of whether this function uses sequences
8383 /// of pushes to pass function parameters.
84 bool HasPushSequences;
84 bool HasPushSequences = false;
8585
8686 private:
8787 /// ForwardedMustTailRegParms - A list of virtual and physical registers
8989 SmallVector ForwardedMustTailRegParms;
9090
9191 public:
92 X86MachineFunctionInfo() : ForceFramePointer(false),
93 RestoreBasePointerOffset(0),
94 CalleeSavedFrameSize(0),
95 BytesToPopOnReturn(0),
96 ReturnAddrIndex(0),
97 FrameAddrIndex(0),
98 TailCallReturnAddrDelta(0),
99 SRetReturnReg(0),
100 GlobalBaseReg(0),
101 VarArgsFrameIndex(0),
102 RegSaveFrameIndex(0),
103 VarArgsGPOffset(0),
104 VarArgsFPOffset(0),
105 ArgumentStackSize(0),
106 NumLocalDynamics(0),
107 HasPushSequences(false) {}
92 X86MachineFunctionInfo() = default;
10893
109 explicit X86MachineFunctionInfo(MachineFunction &MF)
110 : ForceFramePointer(false),
111 RestoreBasePointerOffset(0),
112 CalleeSavedFrameSize(0),
113 BytesToPopOnReturn(0),
114 ReturnAddrIndex(0),
115 FrameAddrIndex(0),
116 TailCallReturnAddrDelta(0),
117 SRetReturnReg(0),
118 GlobalBaseReg(0),
119 VarArgsFrameIndex(0),
120 RegSaveFrameIndex(0),
121 VarArgsGPOffset(0),
122 VarArgsFPOffset(0),
123 ArgumentStackSize(0),
124 NumLocalDynamics(0),
125 HasPushSequences(false) {}
94 explicit X86MachineFunctionInfo(MachineFunction &MF) {};
12695
12796 bool getForceFramePointer() const { return ForceFramePointer;}
12897 void setForceFramePointer(bool forceFP) { ForceFramePointer = forceFP; }