llvm.org GIT mirror llvm / 3591955
With r160248 in place this code is no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160293 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 8 years ago
2 changed file(s) with 1 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
935935 BuildMI(MBB, MBBI, DL, TII.get(Opc), BasePtr)
936936 .addReg(StackPtr)
937937 .setMIFlag(MachineInstr::FrameSetup);
938
939 X86FI->setBasePtrStackAdjustment(NumBytes);
940938 }
941939
942940 if (( (!HasFP && NumBytes) || PushedRegs) && needsFrameMoves) {
6868 /// NumLocalDynamics - Number of local-dynamic TLS accesses.
6969 unsigned NumLocalDynamics;
7070
71 /// After the stack pointer has been restore from the base pointer we
72 /// use a cached adjusment.
73 int64_t BPAdj;
74
7571 public:
7672 X86MachineFunctionInfo() : ForceFramePointer(false),
7773 CalleeSavedFrameSize(0),
10096 VarArgsGPOffset(0),
10197 VarArgsFPOffset(0),
10298 ArgumentStackSize(0),
103 NumLocalDynamics(0),
104 BPAdj(0) {}
99 NumLocalDynamics(0) {}
105100
106101 bool getForceFramePointer() const { return ForceFramePointer;}
107102 void setForceFramePointer(bool forceFP) { ForceFramePointer = forceFP; }
142137 unsigned getNumLocalDynamicTLSAccesses() const { return NumLocalDynamics; }
143138 void incNumLocalDynamicTLSAccesses() { ++NumLocalDynamics; }
144139
145 /// setBasePtrStackAdjustment - If we're restoring the stack pointer from the
146 /// base pointer, due to dynamic stack realignment + VLAs, we cache the
147 /// number of bytes initially allocated for the stack frame. In obscure
148 /// cases (e.g., tail calls with byval argument and no stack protector), the
149 /// stack gets adjusted outside of the prolog, but these shouldn't be
150 /// considered when restoring from the base pointer. Currently, this is only
151 /// needed for x86.
152 void setBasePtrStackAdjustment(int64_t adj) { BPAdj = adj; }
153 int64_t getBasePtrStackAdjustment() const { return BPAdj; }
154140 };
155141
156142 } // End llvm namespace