summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StrongPHIElimination.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2009-09-09 20:14:17 +0000
committerLang Hames <lhames@gmail.com>2009-09-09 20:14:17 +0000
commit6b81770040ee2b25a5ede5a51206dc1dba98b28a (patch)
tree0eca13fa11121dcaf49a50d5b4738e4c52f0ba54 /llvm/lib/CodeGen/StrongPHIElimination.cpp
parent3df0459149bf8e8d44699d849ad7f7e3bcc4bf30 (diff)
downloadbcm5719-llvm-6b81770040ee2b25a5ede5a51206dc1dba98b28a.tar.gz
bcm5719-llvm-6b81770040ee2b25a5ede5a51206dc1dba98b28a.zip
Removed static qualifier from a few index related methods. These methods may require a LiveIntervals instance in future.
llvm-svn: 81374
Diffstat (limited to 'llvm/lib/CodeGen/StrongPHIElimination.cpp')
-rw-r--r--llvm/lib/CodeGen/StrongPHIElimination.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp
index 32e6d799176..d2f93fc4d32 100644
--- a/llvm/lib/CodeGen/StrongPHIElimination.cpp
+++ b/llvm/lib/CodeGen/StrongPHIElimination.cpp
@@ -785,15 +785,14 @@ void StrongPHIElimination::ScheduleCopies(MachineBasicBlock* MBB,
if (RegHandled.insert(I->first).second) {
LiveInterval& Int = LI.getOrCreateInterval(I->first);
MachineInstrIndex instrIdx = LI.getInstructionIndex(I->second);
- if (Int.liveAt(LiveIntervals::getDefIndex(instrIdx)))
- Int.removeRange(LiveIntervals::getDefIndex(instrIdx),
+ if (Int.liveAt(LI.getDefIndex(instrIdx)))
+ Int.removeRange(LI.getDefIndex(instrIdx),
LI.getNextSlot(LI.getMBBEndIdx(I->second->getParent())),
true);
LiveRange R = LI.addLiveRangeToEndOfBlock(I->first, I->second);
R.valno->setCopy(I->second);
- R.valno->def =
- LiveIntervals::getDefIndex(LI.getInstructionIndex(I->second));
+ R.valno->def = LI.getDefIndex(LI.getInstructionIndex(I->second));
}
}
}
@@ -819,7 +818,7 @@ void StrongPHIElimination::InsertCopies(MachineDomTreeNode* MDTN,
// Remove the live range for the old vreg.
LiveInterval& OldInt = LI.getInterval(I->getOperand(i).getReg());
LiveInterval::iterator OldLR = OldInt.FindLiveRangeContaining(
- LiveIntervals::getUseIndex(LI.getInstructionIndex(I)));
+ LI.getUseIndex(LI.getInstructionIndex(I)));
if (OldLR != OldInt.end())
OldInt.removeRange(*OldLR, true);
@@ -832,7 +831,7 @@ void StrongPHIElimination::InsertCopies(MachineDomTreeNode* MDTN,
FirstVN->setHasPHIKill(false);
if (I->getOperand(i).isKill())
FirstVN->addKill(
- LiveIntervals::getUseIndex(LI.getInstructionIndex(I)));
+ LI.getUseIndex(LI.getInstructionIndex(I)));
LiveRange LR (LI.getMBBStartIdx(I->getParent()),
LI.getNextSlot(LI.getUseIndex(LI.getInstructionIndex(I))),
@@ -970,14 +969,14 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction &Fn) {
LiveInterval& Int = LI.getOrCreateInterval(I->first);
MachineInstrIndex instrIdx =
LI.getInstructionIndex(--SI->second->getFirstTerminator());
- if (Int.liveAt(LiveIntervals::getDefIndex(instrIdx)))
- Int.removeRange(LiveIntervals::getDefIndex(instrIdx),
+ if (Int.liveAt(LI.getDefIndex(instrIdx)))
+ Int.removeRange(LI.getDefIndex(instrIdx),
LI.getNextSlot(LI.getMBBEndIdx(SI->second)), true);
LiveRange R = LI.addLiveRangeToEndOfBlock(I->first,
--SI->second->getFirstTerminator());
R.valno->setCopy(--SI->second->getFirstTerminator());
- R.valno->def = LiveIntervals::getDefIndex(instrIdx);
+ R.valno->def = LI.getDefIndex(instrIdx);
DEBUG(errs() << "Renaming failed: " << SI->first << " -> "
<< I->first << "\n");
OpenPOWER on IntegriCloud