summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-03-25 22:25:27 +0000
committerOwen Anderson <resistor@mac.com>2008-03-25 22:25:27 +0000
commit1d46d45e35dc44ab3c4b0aaf2136db5278d85634 (patch)
tree1f4365289d1557cf423b37f083691269d27d3b9e /llvm/lib/CodeGen
parentc60c67fc3748af13abeb6c14dbbc8eb0c9b87a09 (diff)
downloadbcm5719-llvm-1d46d45e35dc44ab3c4b0aaf2136db5278d85634.tar.gz
bcm5719-llvm-1d46d45e35dc44ab3c4b0aaf2136db5278d85634.zip
StrongPHIElimination doesn't support swapping live intervals like the coalescer does.
llvm-svn: 48802
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/StrongPHIElimination.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp
index ff5a9aa1b87..f45c95fdd35 100644
--- a/llvm/lib/CodeGen/StrongPHIElimination.cpp
+++ b/llvm/lib/CodeGen/StrongPHIElimination.cpp
@@ -866,15 +866,9 @@ void StrongPHIElimination::mergeLiveIntervals(unsigned primary,
// If we get here, we know that we can coalesce the live ranges. Ask the
// intervals to coalesce themselves now.
- if ((RHS.ranges.size() > LHS.ranges.size() &&
- TargetRegisterInfo::isVirtualRegister(LHS.reg)) ||
- TargetRegisterInfo::isPhysicalRegister(RHS.reg)) {
- RHS.join(LHS, &RHSValNoAssignments[0], &LHSValNoAssignments[0], NewVNInfo);
- LI.removeInterval(primary);
- } else {
- LHS.join(RHS, &LHSValNoAssignments[0], &RHSValNoAssignments[0], NewVNInfo);
- LI.removeInterval(secondary);
- }
+
+ LHS.join(RHS, &LHSValNoAssignments[0], &RHSValNoAssignments[0], NewVNInfo);
+ LI.removeInterval(secondary);
}
bool StrongPHIElimination::runOnMachineFunction(MachineFunction &Fn) {
@@ -921,5 +915,8 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction &Fn) {
(*I)->eraseFromParent();
}
+ for (LiveIntervals::iterator I = LI.begin(), E = LI.end(); I != E; ++I)
+ I->second.dump();
+
return false;
}
OpenPOWER on IntegriCloud