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

Owen Anderson resistor at mac.com
Fri May 30 11:38:27 PDT 2008


Author: resistor
Date: Fri May 30 13:38:26 2008
New Revision: 51780

URL: http://llvm.org/viewvc/llvm-project?rev=51780&view=rev
Log:
Preserve the register coallescer, and update live intervals more correctly by triggering a renumbering after phi elimination.

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=51780&r1=51779&r2=51780&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp (original)
+++ llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp Fri May 30 13:38:26 2008
@@ -27,6 +27,7 @@
 #include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/CodeGen/MachineLoopInfo.h"
 #include "llvm/CodeGen/MachineRegisterInfo.h"
+#include "llvm/CodeGen/RegisterCoalescer.h"
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/ADT/DepthFirstIterator.h"
@@ -34,7 +35,6 @@
 #include "llvm/Support/Compiler.h"
 using namespace llvm;
 
-
 namespace {
   struct VISIBILITY_HIDDEN StrongPHIElimination : public MachineFunctionPass {
     static char ID; // Pass identification, replacement for typeid
@@ -74,6 +74,7 @@
       
       // TODO: Actually make this true.
       AU.addPreserved<LiveIntervals>();
+      AU.addPreserved<RegisterCoalescer>();
       MachineFunctionPass::getAnalysisUsage(AU);
     }
     
@@ -921,5 +922,7 @@
     PInstr->eraseFromParent();
   }
   
+  LI.computeNumbering();
+  
   return true;
 }





More information about the llvm-commits mailing list