diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-08-13 16:19:33 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2009-08-13 16:19:33 +0000 |
commit | 4a0f08c5fc14d840e4e411fade036f1cd815b795 (patch) | |
tree | b21035e01c4ffe07646bdf2e47a34f012edad944 /include/llvm/CodeGen/MachineFrameInfo.h | |
parent | 710461688bba935f0ad5c75da7fec2ad0f225c00 (diff) | |
download | llvm-4a0f08c5fc14d840e4e411fade036f1cd815b795.tar.gz llvm-4a0f08c5fc14d840e4e411fade036f1cd815b795.tar.bz2 llvm-4a0f08c5fc14d840e4e411fade036f1cd815b795.tar.xz |
Add MachineFrameInfo::getPristineRegisters(MBB) method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFrameInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineFrameInfo.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h index 83f7def0dd..2a9b458db7 100644 --- a/include/llvm/CodeGen/MachineFrameInfo.h +++ b/include/llvm/CodeGen/MachineFrameInfo.h @@ -14,6 +14,7 @@ #ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H #define LLVM_CODEGEN_MACHINEFRAMEINFO_H +#include "llvm/ADT/BitVector.h" #include "llvm/Support/DataTypes.h" #include <cassert> #include <iosfwd> @@ -25,6 +26,7 @@ class TargetRegisterClass; class Type; class MachineModuleInfo; class MachineFunction; +class MachineBasicBlock; class TargetFrameInfo; /// The CalleeSavedInfo class tracks the information need to locate where a @@ -166,7 +168,10 @@ class MachineFrameInfo { /// epilog code inserter, this data used for debug info and exception /// handling. std::vector<CalleeSavedInfo> CSInfo; - + + /// CSIValid - Has CSInfo been set yet? + bool CSIValid; + /// MMI - This field is set (via setMachineModuleInfo) by a module info /// consumer (ex. DwarfWriter) to indicate that frame layout information /// should be acquired. Typically, it's the responsibility of the target's @@ -185,6 +190,7 @@ public: HasCalls = false; StackProtectorIdx = -1; MaxCallFrameSize = 0; + CSIValid = false; MMI = 0; } @@ -389,6 +395,22 @@ public: CSInfo = CSI; } + /// isCalleeSavedInfoValid - Has the callee saved info been calculated yet? + bool isCalleeSavedInfoValid() const { return CSIValid; } + + void setCalleeSavedInfoValid(bool v) { CSIValid = v; } + + /// getPristineRegs - Return a set of physical registers that are pristine on + /// entry to the MBB. + /// + /// Pristine registers hold a value that is useless to the current function, + /// but that must be preserved - they are callee saved registers that have not + /// been saved yet. + /// + /// Before the PrologueEpilogueInserter has placed the CSR spill code, this + /// method always returns an empty set. + BitVector getPristineRegs(const MachineBasicBlock *MBB) const; + /// getMachineModuleInfo - Used by a prologue/epilogue /// emitter (TargetRegisterInfo) to provide frame layout information. MachineModuleInfo *getMachineModuleInfo() const { return MMI; } |