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

Owen Anderson resistor at mac.com
Fri Jul 25 14:08:42 PDT 2008


Author: resistor
Date: Fri Jul 25 16:08:41 2008
New Revision: 54062

URL: http://llvm.org/viewvc/llvm-project?rev=54062&view=rev
Log:
Remove live interval entries for an interval if we're eliminating its only VN.

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=54062&r1=54061&r2=54062&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp (original)
+++ llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp Fri Jul 25 16:08:41 2008
@@ -794,7 +794,12 @@
                                    LI.getVNInfoAllocator());
   NewVN->hasPHIKill = true;
   LiveRange NewRange(RangeMergingIn->start, RangeMergingIn->end, NewVN);
-  RHS.removeRange(RangeMergingIn->start, RangeMergingIn->end, true);
+  
+  if (RHS.containsOneValue())
+    LI.removeInterval(RHS.reg);
+  else
+    RHS.removeRange(RangeMergingIn->start, RangeMergingIn->end, true);
+  
   LHS.addRange(NewRange);
 }
 





More information about the llvm-commits mailing list