aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86MachineFunctionInfo.h
diff options
context:
space:
mode:
authorArnold Schwaighofer <arnold.schwaighofer@gmail.com>2007-10-11 19:40:01 +0000
committerArnold Schwaighofer <arnold.schwaighofer@gmail.com>2007-10-11 19:40:01 +0000
commitc85e1716f0e45e4c18a9ef2fbe431a51ac3a4252 (patch)
treee6e745a81699085d757db166e645f8a6639cde7a /lib/Target/X86/X86MachineFunctionInfo.h
parent68c8411ef591818d89c6a81098a328fcd75be72a (diff)
downloadexternal_llvm-c85e1716f0e45e4c18a9ef2fbe431a51ac3a4252.tar.gz
external_llvm-c85e1716f0e45e4c18a9ef2fbe431a51ac3a4252.tar.bz2
external_llvm-c85e1716f0e45e4c18a9ef2fbe431a51ac3a4252.zip
Added tail call optimization to the x86 back end. It can be
enabled by passing -tailcallopt to llc. The optimization is performed if the following conditions are satisfied: * caller/callee are fastcc * elf/pic is disabled OR elf/pic enabled + callee is in module + callee has visibility protected or hidden git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42870 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86MachineFunctionInfo.h')
-rw-r--r--lib/Target/X86/X86MachineFunctionInfo.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Target/X86/X86MachineFunctionInfo.h b/lib/Target/X86/X86MachineFunctionInfo.h
index e50a104f21..05972c66c2 100644
--- a/lib/Target/X86/X86MachineFunctionInfo.h
+++ b/lib/Target/X86/X86MachineFunctionInfo.h
@@ -47,18 +47,26 @@ class X86MachineFunctionInfo : public MachineFunctionInfo {
// FrameIndex for return slot.
int ReturnAddrIndex;
+
+ // Delta the ReturnAddr stack slot is moved
+ // Used for creating an area before the register spill area on the stack
+ // the returnaddr can be savely move to this area
+ int TailCallReturnAddrDelta;
+
public:
X86MachineFunctionInfo() : ForceFramePointer(false),
CalleeSavedFrameSize(0),
BytesToPopOnReturn(0),
DecorationStyle(None),
- ReturnAddrIndex(0) {}
+ ReturnAddrIndex(0),
+ TailCallReturnAddrDelta(0){}
X86MachineFunctionInfo(MachineFunction &MF) : ForceFramePointer(false),
CalleeSavedFrameSize(0),
BytesToPopOnReturn(0),
DecorationStyle(None),
- ReturnAddrIndex(0) {}
+ ReturnAddrIndex(0),
+ TailCallReturnAddrDelta(0) {}
bool getForceFramePointer() const { return ForceFramePointer;}
void setForceFramePointer(bool forceFP) { ForceFramePointer = forceFP; }
@@ -74,6 +82,9 @@ public:
int getRAIndex() const { return ReturnAddrIndex; }
void setRAIndex(int Index) { ReturnAddrIndex = Index; }
+
+ int getTCReturnAddrDelta() const { return TailCallReturnAddrDelta; }
+ void setTCReturnAddrDelta(int delta) {TailCallReturnAddrDelta = delta;}
};
} // End llvm namespace