diff options
Diffstat (limited to 'lib/Target/X86/X86MachineFunctionInfo.h')
-rw-r--r-- | lib/Target/X86/X86MachineFunctionInfo.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/Target/X86/X86MachineFunctionInfo.h b/lib/Target/X86/X86MachineFunctionInfo.h index 78d20ce..79a51b3 100644 --- a/lib/Target/X86/X86MachineFunctionInfo.h +++ b/lib/Target/X86/X86MachineFunctionInfo.h @@ -11,10 +11,12 @@ // //===----------------------------------------------------------------------===// -#ifndef X86MACHINEFUNCTIONINFO_H -#define X86MACHINEFUNCTIONINFO_H +#ifndef LLVM_LIB_TARGET_X86_X86MACHINEFUNCTIONINFO_H +#define LLVM_LIB_TARGET_X86_X86MACHINEFUNCTIONINFO_H #include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineValueType.h" +#include <vector> namespace llvm { @@ -70,6 +72,22 @@ class X86MachineFunctionInfo : public MachineFunctionInfo { unsigned NumLocalDynamics; public: + /// Describes a register that needs to be forwarded from the prologue to a + /// musttail call. + struct Forward { + Forward(unsigned VReg, MCPhysReg PReg, MVT VT) + : VReg(VReg), PReg(PReg), VT(VT) {} + unsigned VReg; + MCPhysReg PReg; + MVT VT; + }; + +private: + /// ForwardedMustTailRegParms - A list of virtual and physical registers + /// that must be forwarded to every musttail call. + std::vector<Forward> ForwardedMustTailRegParms; + +public: X86MachineFunctionInfo() : ForceFramePointer(false), CalleeSavedFrameSize(0), BytesToPopOnReturn(0), @@ -138,6 +156,9 @@ public: unsigned getNumLocalDynamicTLSAccesses() const { return NumLocalDynamics; } void incNumLocalDynamicTLSAccesses() { ++NumLocalDynamics; } + std::vector<Forward> &getForwardedMustTailRegParms() { + return ForwardedMustTailRegParms; + } }; } // End llvm namespace |