diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-19 07:04:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-19 07:04:55 +0000 |
commit | 74de8b1b26b12fda3364382946e519a2e37b6709 (patch) | |
tree | 5d6549f8b0dd6a5c83ede1f90e22fb86e152360f /include/llvm/CodeGen/LiveVariables.h | |
parent | 472405e0dc05f6fb8c09af00713ff893fff25b94 (diff) | |
download | llvm-74de8b1b26b12fda3364382946e519a2e37b6709.tar.gz llvm-74de8b1b26b12fda3364382946e519a2e37b6709.tar.bz2 llvm-74de8b1b26b12fda3364382946e519a2e37b6709.tar.xz |
There is no need to store the MBB along with the MI any more, we can now
ask instructions for their parent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveVariables.h')
-rw-r--r-- | include/llvm/CodeGen/LiveVariables.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index 80cbb41950..4eec1d6612 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -48,11 +48,10 @@ public: /// std::vector<bool> AliveBlocks; - /// Kills - List of MachineBasicblock's which contain the last use of this - /// virtual register (kill it). This also includes the specific instruction - /// which kills the value. + /// Kills - List of MachineInstruction's which are the last use of this + /// virtual register (kill it) in their basic block. /// - std::vector<std::pair<MachineBasicBlock*, MachineInstr*> > Kills; + std::vector<MachineInstr*> Kills; VarInfo() : DefInst(0) {} @@ -60,13 +59,12 @@ public: /// machine instruction. Returns true if there was a kill /// corresponding to this instruction, false otherwise. bool removeKill(MachineInstr *MI) { - for (std::vector<std::pair<MachineBasicBlock*, MachineInstr*> >::iterator - i = Kills.begin(); i != Kills.end(); ++i) { - if (i->second == MI) { + for (std::vector<MachineInstr*>::iterator i = Kills.begin(), + e = Kills.end(); i != e; ++i) + if (*i == MI) { Kills.erase(i); return true; } - } return false; } }; @@ -153,7 +151,7 @@ public: /// void addVirtualRegisterKilled(unsigned IncomingReg, MachineInstr *MI) { RegistersKilled.insert(std::make_pair(MI, IncomingReg)); - getVarInfo(IncomingReg).Kills.push_back(std::make_pair(MI->getParent(),MI)); + getVarInfo(IncomingReg).Kills.push_back(MI); } /// removeVirtualRegisterKilled - Remove the specified virtual @@ -189,7 +187,7 @@ public: /// void addVirtualRegisterDead(unsigned IncomingReg, MachineInstr *MI) { RegistersDead.insert(std::make_pair(MI, IncomingReg)); - getVarInfo(IncomingReg).Kills.push_back(std::make_pair(MI->getParent(),MI)); + getVarInfo(IncomingReg).Kills.push_back(MI); } /// removeVirtualRegisterDead - Remove the specified virtual |