diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-01 21:16:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-01 21:16:03 +0000 |
commit | 35f2705e3de4600c3621b883eed9b22e4607ddf4 (patch) | |
tree | 360b4e46bdc22b6b9d278e07848cbcd3a2d935e7 /lib/CodeGen/VirtRegMap.h | |
parent | a1e8a80b96d02c8667021049e7fba9050658f39b (diff) |
Remove previous patch, which wasn't quite right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r-- | lib/CodeGen/VirtRegMap.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index 343a4e066a..898677e8f9 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -26,7 +26,7 @@ namespace llvm { class VirtRegMap { public: - enum ModRef { isRef = 1, isMod = 2, isModRef = 3, isLiveOut = 4 }; + enum ModRef { isRef = 1, isMod = 2, isModRef = 3 }; typedef std::multimap<MachineInstr*, std::pair<unsigned, ModRef> > MI2VirtMapTy; @@ -128,7 +128,7 @@ namespace llvm { /// folded into newMI machine instruction. The OpNum argument indicates the /// operand number of OldMI that is folded. void virtFolded(unsigned VirtReg, MachineInstr *OldMI, unsigned OpNum, - MachineInstr *NewMI, bool LiveOut); + MachineInstr *NewMI); /// @brief returns the virtual registers' values folded in memory /// operands of this instruction @@ -136,6 +136,13 @@ namespace llvm { getFoldedVirts(MachineInstr* MI) const { return MI2VirtMap.equal_range(MI); } + + /// RemoveFromFoldedVirtMap - Given a machine instruction in the folded + /// instruction map, remove the entry in the folded instruction map. + void RemoveFromFoldedVirtMap(MachineInstr *MI) { + bool ErasedAny = MI2VirtMap.erase(MI); + assert(ErasedAny && "Machine instr not in folded vreg map!"); + } void print(std::ostream &OS) const; void dump() const; @@ -151,7 +158,7 @@ namespace llvm { struct Spiller { virtual ~Spiller(); virtual bool runOnMachineFunction(MachineFunction &MF, - const VirtRegMap &VRM) = 0; + VirtRegMap &VRM) = 0; }; /// createSpiller - Create an return a spiller object, as specified on the |