diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-09-26 19:48:35 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-09-26 19:48:35 +0000 |
commit | 36a55023c1daae86afedf6e6672c0adad7bbe5ea (patch) | |
tree | c68c32e0d9f0dadb805a6e07fe7e2544b57de222 /include/llvm/CodeGen | |
parent | dbc2e856fce973243d2dfba88d573d3c88f06020 (diff) | |
download | external_llvm-36a55023c1daae86afedf6e6672c0adad7bbe5ea.zip external_llvm-36a55023c1daae86afedf6e6672c0adad7bbe5ea.tar.gz external_llvm-36a55023c1daae86afedf6e6672c0adad7bbe5ea.tar.bz2 |
Fix @llvm.frameaddress codegen. FP elimination optimization should be disabled when frame address is desired. Also add support for depth > 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/MachineFrameInfo.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h index 6c49eaf..363f206 100644 --- a/include/llvm/CodeGen/MachineFrameInfo.h +++ b/include/llvm/CodeGen/MachineFrameInfo.h @@ -118,6 +118,10 @@ class MachineFrameInfo { /// bool HasVarSizedObjects; + /// FrameAddressTaken - This boolean keeps track of whether there is a call + /// to builtin @llvm.frameaddress. + bool FrameAddressTaken; + /// StackSize - The prolog/epilog code inserter calculates the final stack /// offsets for all of the fixed size objects, updating the Objects list /// above. It then updates StackSize to contain the number of bytes that need @@ -174,6 +178,7 @@ public: MachineFrameInfo(const TargetFrameInfo &tfi) : TFI(tfi) { StackSize = NumFixedObjects = OffsetAdjustment = MaxAlignment = 0; HasVarSizedObjects = false; + FrameAddressTaken = false; HasCalls = false; MaxCallFrameSize = 0; MMI = 0; @@ -190,6 +195,12 @@ public: /// bool hasVarSizedObjects() const { return HasVarSizedObjects; } + /// isFrameAddressTaken - This method may be called any time after instruction + /// selection is complete to determine if there is a call to + /// @llvm.frameaddress in this function. + bool isFrameAddressTaken() const { return FrameAddressTaken; } + void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; } + /// getObjectIndexBegin - Return the minimum frame object index... /// int getObjectIndexBegin() const { return -NumFixedObjects; } |