[llvm-commits] [llvm] r48802 - /llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp

Owen Anderson resistor at mac.com
Tue Mar 25 15:25:28 PDT 2008


Author: resistor
Date: Tue Mar 25 17:25:27 2008
New Revision: 48802

URL: http://llvm.org/viewvc/llvm-project?rev=48802&view=rev
Log:
StrongPHIElimination doesn't support swapping live intervals like the coalescer does.


Modified:
    llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp

Modified: llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp?rev=48802&r1=48801&r2=48802&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp (original)
+++ llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp Tue Mar 25 17:25:27 2008
@@ -866,15 +866,9 @@
 
   // 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 @@
     (*I)->eraseFromParent();
   }
   
+  for (LiveIntervals::iterator I = LI.begin(), E = LI.end(); I != E; ++I)
+    I->second.dump();
+  
   return false;
 }





More information about the llvm-commits mailing list