X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FXCore%2FXCoreMachineFunctionInfo.h;h=078ffde18fb9cbde962dbab8a4d1fd427db32fbc;hb=7521964d28c5ccb28431aed23334638138d9bd0a;hp=f1777a87e114171cd318d11c407eb1e0eb218210;hpb=9409825b57cec078a2a90910978622073d31813d;p=oota-llvm.git diff --git a/lib/Target/XCore/XCoreMachineFunctionInfo.h b/lib/Target/XCore/XCoreMachineFunctionInfo.h index f1777a87e11..078ffde18fb 100644 --- a/lib/Target/XCore/XCoreMachineFunctionInfo.h +++ b/lib/Target/XCore/XCoreMachineFunctionInfo.h @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef XCOREMACHINEFUNCTIONINFO_H -#define XCOREMACHINEFUNCTIONINFO_H +#ifndef LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H +#define LLVM_LIB_TARGET_XCORE_XCOREMACHINEFUNCTIONINFO_H #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" @@ -33,15 +33,19 @@ class XCoreFunctionInfo : public MachineFunctionInfo { int FPSpillSlot; bool EHSpillSlotSet; int EHSpillSlot[2]; + unsigned ReturnStackOffset; + bool ReturnStackOffsetSet; int VarArgsFrameIndex; mutable int CachedEStackSize; - std::vector > SpillLabels; + std::vector> + SpillLabels; public: XCoreFunctionInfo() : LRSpillSlotSet(false), FPSpillSlotSet(false), EHSpillSlotSet(false), + ReturnStackOffsetSet(false), VarArgsFrameIndex(0), CachedEStackSize(-1) {} @@ -49,6 +53,7 @@ public: LRSpillSlotSet(false), FPSpillSlotSet(false), EHSpillSlotSet(false), + ReturnStackOffsetSet(false), VarArgsFrameIndex(0), CachedEStackSize(-1) {} @@ -78,12 +83,24 @@ public: return EHSpillSlot; } + void setReturnStackOffset(unsigned value) { + assert(!ReturnStackOffsetSet && "Return stack offset set twice"); + ReturnStackOffset = value; + ReturnStackOffsetSet = true; + } + + unsigned getReturnStackOffset() const { + assert(ReturnStackOffsetSet && "Return stack offset not set"); + return ReturnStackOffset; + } + bool isLargeFrame(const MachineFunction &MF) const; - std::vector > &getSpillLabels() { + std::vector> & + getSpillLabels() { return SpillLabels; } }; } // End llvm namespace -#endif // XCOREMACHINEFUNCTIONINFO_H +#endif