Changes in directory llvm/lib/VMCore:

BasicBlock.cpp updated: 1.70 -> 1.71
---
Log message:

When asked not to delete useless PHIs, really don't delete them, no matter how
redundant they are.


---
Diffs of the changes:  (+2 -1)

 BasicBlock.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/VMCore/BasicBlock.cpp
diff -u llvm/lib/VMCore/BasicBlock.cpp:1.70 llvm/lib/VMCore/BasicBlock.cpp:1.71
--- llvm/lib/VMCore/BasicBlock.cpp:1.70 Thu Jun  8 11:03:13 2006
+++ llvm/lib/VMCore/BasicBlock.cpp      Tue Jun 13 23:43:14 2006
@@ -213,7 +213,8 @@
       PN->removeIncomingValue(Pred, false);
       // If all incoming values to the Phi are the same, we can replace the Phi
       // with that value.
-      if (Value *PNV = PN->hasConstantValue()) {
+      Value* PNV = 0;
+      if (!DontDeleteUselessPHIs && (PNV = PN->hasConstantValue())) {
         PN->replaceAllUsesWith(PNV);
         PN->eraseFromParent();
       }



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to