summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-19 07:04:55 +0000
committerChris Lattner <sabre@nondot.org>2004-07-19 07:04:55 +0000
commit74de8b1b26b12fda3364382946e519a2e37b6709 (patch)
tree5d6549f8b0dd6a5c83ede1f90e22fb86e152360f /lib/CodeGen/LiveIntervalAnalysis.cpp
parent472405e0dc05f6fb8c09af00713ff893fff25b94 (diff)
downloadllvm-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 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index a20d23bb76..44f860c71d 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -311,11 +311,11 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock* mbb,
// two cases we have to handle here. The most common case is a vreg
// whose lifetime is contained within a basic block. In this case there
// will be a single kill, in MBB, which comes after the definition.
- if (vi.Kills.size() == 1 && vi.Kills[0].first == mbb) {
+ if (vi.Kills.size() == 1 && vi.Kills[0]->getParent() == mbb) {
// FIXME: what about dead vars?
unsigned killIdx;
- if (vi.Kills[0].second != mi)
- killIdx = getUseIndex(getInstructionIndex(vi.Kills[0].second))+1;
+ if (vi.Kills[0] != mi)
+ killIdx = getUseIndex(getInstructionIndex(vi.Kills[0]))+1;
else
killIdx = defIndex+1;
@@ -353,9 +353,9 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock* mbb,
// Finally, this virtual register is live from the start of any killing
// block to the 'use' slot of the killing instruction.
for (unsigned i = 0, e = vi.Kills.size(); i != e; ++i) {
- std::pair<MachineBasicBlock*, MachineInstr*> &Kill = vi.Kills[i];
- interval.addRange(getInstructionIndex(Kill.first->begin()),
- getUseIndex(getInstructionIndex(Kill.second))+1);
+ MachineInstr *Kill = vi.Kills[i];
+ interval.addRange(getInstructionIndex(Kill->getParent()->begin()),
+ getUseIndex(getInstructionIndex(Kill))+1);
}
} else {