Now that the profitable bits of EnableFullLoadPRE have been enabled by default, rip...
authorOwen Anderson <resistor@mac.com>
Fri, 1 Oct 2010 20:02:55 +0000 (20:02 +0000)
committerOwen Anderson <resistor@mac.com>
Fri, 1 Oct 2010 20:02:55 +0000 (20:02 +0000)
Anyone interested in more general PRE would be better served by implementing it separately, to get real
anticipation calculation, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115337 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/2010-03-31-RedundantPHIs.ll

index f1272d4956d8d34716b2bfe7d5d45b0ff15ca29b..dc75342b4050302d98e463da3df5c5e3691cd30b 100644 (file)
@@ -61,7 +61,6 @@ STATISTIC(NumPRELoad,   "Number of loads PRE'd");
 static cl::opt<bool> EnablePRE("enable-pre",
                                cl::init(true), cl::Hidden);
 static cl::opt<bool> EnableLoadPRE("enable-load-pre", cl::init(true));
-static cl::opt<bool> EnableFullLoadPRE("enable-full-load-pre", cl::init(false));
 
 //===----------------------------------------------------------------------===//
 //                         ValueTable Class
@@ -1604,14 +1603,13 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
   unsigned NumUnavailablePreds = PredLoads.size();
   assert(NumUnavailablePreds != 0 &&
          "Fully available value should be eliminated above!");
-  if (!EnableFullLoadPRE) {
-    // If this load is unavailable in multiple predecessors, reject it.
-    // FIXME: If we could restructure the CFG, we could make a common pred with
-    // all the preds that don't have an available LI and insert a new load into
-    // that one block.
-    if (NumUnavailablePreds != 1)
+  
+  // If this load is unavailable in multiple predecessors, reject it.
+  // FIXME: If we could restructure the CFG, we could make a common pred with
+  // all the preds that don't have an available LI and insert a new load into
+  // that one block.
+  if (NumUnavailablePreds != 1)
       return false;
-  }
 
   // Check if the load can safely be moved to all the unavailable predecessors.
   bool CanDoPRE = true;
index 066e3038b08776a3493cbf772025614d18d38ca6..504004763d0cd832fdd70c2855470d9280f4cabf 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s -gvn -enable-full-load-pre -S | FileCheck %s
+; RUN: opt < %s -gvn -S | FileCheck %s
 
 define i8* @cat(i8* %s1, ...) nounwind {
 entry: