summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-04-18 02:30:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-04-18 02:30:19 +0000
commitb408e8f11d750dd7e9e565ecb5a1126f0e349689 (patch)
tree7f1c15c4031324752d50024dc4b34bbd30254792 /llvm/lib
parent883ff0767234333cee86db996f814cf79e2cfd26 (diff)
downloadbcm5719-llvm-b408e8f11d750dd7e9e565ecb5a1126f0e349689.tar.gz
bcm5719-llvm-b408e8f11d750dd7e9e565ecb5a1126f0e349689.zip
Don't populate TryAgainList when coalescing only physical registers with virtual registers.
llvm-svn: 36240
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index af2e19922d1..8b181150f64 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1473,7 +1473,7 @@ namespace {
void LiveIntervals::CopyCoallesceInMBB(MachineBasicBlock *MBB,
- std::vector<CopyRec> &TryAgain, bool PhysOnly) {
+ std::vector<CopyRec> *TryAgain, bool PhysOnly) {
DOUT << ((Value*)MBB->getBasicBlock())->getName() << ":\n";
for (MachineBasicBlock::iterator MII = MBB->begin(), E = MBB->end();
@@ -1484,8 +1484,8 @@ void LiveIntervals::CopyCoallesceInMBB(MachineBasicBlock *MBB,
unsigned SrcReg, DstReg;
if (!tii_->isMoveInstr(*Inst, SrcReg, DstReg)) continue;
- if (!JoinCopy(Inst, SrcReg, DstReg, PhysOnly))
- TryAgain.push_back(getCopyRec(Inst, SrcReg, DstReg));
+ if (TryAgain && !JoinCopy(Inst, SrcReg, DstReg, PhysOnly))
+ TryAgain->push_back(getCopyRec(Inst, SrcReg, DstReg));
}
}
@@ -1502,7 +1502,7 @@ void LiveIntervals::joinIntervals() {
// If there are no loops in the function, join intervals in function order.
for (MachineFunction::iterator I = mf_->begin(), E = mf_->end();
I != E; ++I)
- CopyCoallesceInMBB(I, TryAgainList);
+ CopyCoallesceInMBB(I, &TryAgainList);
} else {
// Otherwise, join intervals in inner loops before other intervals.
// Unfortunately we can't just iterate over loop hierarchy here because
@@ -1519,9 +1519,9 @@ void LiveIntervals::joinIntervals() {
// Finally, join intervals in loop nest order.
for (unsigned i = 0, e = MBBs.size(); i != e; ++i)
- CopyCoallesceInMBB(MBBs[i].second, TryAgainList, true);
+ CopyCoallesceInMBB(MBBs[i].second, NULL, true);
for (unsigned i = 0, e = MBBs.size(); i != e; ++i)
- CopyCoallesceInMBB(MBBs[i].second, TryAgainList, false);
+ CopyCoallesceInMBB(MBBs[i].second, &TryAgainList, false);
}
// Joining intervals can allow other intervals to be joined. Iteratively join
OpenPOWER on IntegriCloud