[llvm-commits] [llvm] r61177 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp

Chris Lattner sabre at nondot.org
Wed Dec 17 16:51:32 PST 2008


Author: lattner
Date: Wed Dec 17 18:51:32 2008
New Revision: 61177

URL: http://llvm.org/viewvc/llvm-project?rev=61177&view=rev
Log:
reapply this hunk from Bill's reversion in r61169, it is conservative
and safe and orthogonal from turning off load pre.

Modified:
    llvm/trunk/lib/Transforms/Scalar/GVN.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=61177&r1=61176&r2=61177&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Dec 17 18:51:32 2008
@@ -956,6 +956,11 @@
   // it will be too expensive.
   if (Deps.size() > 100)
     return false;
+
+  // If we had a phi translation failure, we'll have a single entry which is a
+  // clobber in the current block.  Reject this early.
+  if (Deps.size() == 1 && Deps[0].second.isClobber())
+    return false;
   
   // Filter out useless results (non-locals, etc).  Keep track of the blocks
   // where we have a value available in repl, also keep track of whether we see





More information about the llvm-commits mailing list