aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
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 a20d23b..44f860c 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 {