[llvm-commits] [llvm] r60202 - /llvm/trunk/lib/Transforms/Utils/Local.cpp

Chris Lattner sabre at nondot.org
Thu Nov 27 16:58:15 PST 2008


Author: lattner
Date: Thu Nov 27 18:58:15 2008
New Revision: 60202

URL: http://llvm.org/viewvc/llvm-project?rev=60202&view=rev
Log:
remove some weirdness that came from the LSR code that has
nothing to do with dead instruction elimination.  No tests in
dejagnu depend on this, so I don't know what it was needed for.

Modified:
    llvm/trunk/lib/Transforms/Utils/Local.cpp

Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=60202&r1=60201&r2=60202&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/Local.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/Local.cpp Thu Nov 27 18:58:15 2008
@@ -190,14 +190,7 @@
   while (!Insts.empty()) {
     I = *Insts.begin();
     Insts.erase(I);
-    
-    // If this is a PHI node, we may be able to make it dead if we know all the
-    // input values are the same.
-    if (PHINode *PN = dyn_cast<PHINode>(I)) {
-      if (Value *PNV = PN->hasConstantValue())
-        PN->replaceAllUsesWith(PNV);
-    }
-    
+
     // Okay, if the instruction is dead, delete it.
     if (!isInstructionTriviallyDead(I))
       continue;





More information about the llvm-commits mailing list