diff options
Diffstat (limited to 'lib/Target/PowerPC/PPCMachineFunctionInfo.h')
| -rw-r--r-- | lib/Target/PowerPC/PPCMachineFunctionInfo.h | 31 | 
1 files changed, 30 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/lib/Target/PowerPC/PPCMachineFunctionInfo.h index 24caffa3f0f2..ee18eadf6e5f 100644 --- a/lib/Target/PowerPC/PPCMachineFunctionInfo.h +++ b/lib/Target/PowerPC/PPCMachineFunctionInfo.h @@ -37,9 +37,19 @@ class PPCFunctionInfo : public MachineFunctionInfo {    /// PEI.    bool MustSaveLR; +  /// Does this function have any stack spills. +  bool HasSpills; + +  /// Does this function spill using instructions with only r+r (not r+i) +  /// forms. +  bool HasNonRISpills; +    /// SpillsCR - Indicates whether CR is spilled in the current function.    bool SpillsCR; +  /// Indicates whether VRSAVE is spilled in the current function. +  bool SpillsVRSAVE; +    /// LRStoreRequired - The bool indicates whether there is some explicit use of    /// the LR/LR8 stack slot that is not obvious from scanning the code.  This    /// requires that the code generator produce a store of LR to the stack on @@ -71,11 +81,17 @@ class PPCFunctionInfo : public MachineFunctionInfo {    /// register for parameter passing.    unsigned VarArgsNumFPR; +  /// CRSpillFrameIndex - FrameIndex for CR spill slot for 32-bit SVR4. +  int CRSpillFrameIndex; +  public:    explicit PPCFunctionInfo(MachineFunction &MF)       : FramePointerSaveIndex(0),        ReturnAddrSaveIndex(0), +      HasSpills(false), +      HasNonRISpills(false),        SpillsCR(false), +      SpillsVRSAVE(false),        LRStoreRequired(false),        MinReservedArea(0),        TailCallSPDelta(0), @@ -83,7 +99,8 @@ public:        VarArgsFrameIndex(0),        VarArgsStackOffset(0),        VarArgsNumGPR(0), -      VarArgsNumFPR(0) {} +      VarArgsNumFPR(0), +      CRSpillFrameIndex(0) {}    int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }    void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; } @@ -105,9 +122,18 @@ public:    void setMustSaveLR(bool U) { MustSaveLR = U; }    bool mustSaveLR() const    { return MustSaveLR; } +  void setHasSpills()      { HasSpills = true; } +  bool hasSpills() const   { return HasSpills; } + +  void setHasNonRISpills()    { HasNonRISpills = true; } +  bool hasNonRISpills() const { return HasNonRISpills; } +    void setSpillsCR()       { SpillsCR = true; }    bool isCRSpilled() const { return SpillsCR; } +  void setSpillsVRSAVE()       { SpillsVRSAVE = true; } +  bool isVRSAVESpilled() const { return SpillsVRSAVE; } +    void setLRStoreRequired() { LRStoreRequired = true; }    bool isLRStoreRequired() const { return LRStoreRequired; } @@ -125,6 +151,9 @@ public:    unsigned getVarArgsNumFPR() const { return VarArgsNumFPR; }    void setVarArgsNumFPR(unsigned Num) { VarArgsNumFPR = Num; } + +  int getCRSpillFrameIndex() const { return CRSpillFrameIndex; } +  void setCRSpillFrameIndex(int idx) { CRSpillFrameIndex = idx; }  };  } // end of namespace llvm  | 
