aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit8344fa85a07e2df80c5bd7b9370d3baa5b7c4ea4 (patch)
tree75d574c6102bd42a081c8149f04bb7e181ecf921 /lib/CodeGen
parent40bd38ebb955c55a8ff7ea4ba252afbb093bc3d2 (diff)
downloadexternal_llvm-8344fa85a07e2df80c5bd7b9370d3baa5b7c4ea4.zip
external_llvm-8344fa85a07e2df80c5bd7b9370d3baa5b7c4ea4.tar.gz
external_llvm-8344fa85a07e2df80c5bd7b9370d3baa5b7c4ea4.tar.bz2
StrongPHIElimination doesn't support swapping live intervals like the coalescer does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/StrongPHIElimination.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/CodeGen/StrongPHIElimination.cpp b/lib/CodeGen/StrongPHIElimination.cpp
index ff5a9aa..f45c95f 100644
--- a/lib/CodeGen/StrongPHIElimination.cpp
+++ b/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;
}