diff options
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 14 | ||||
-rw-r--r-- | test/Transforms/GVN/2010-03-31-RedundantPHIs.ll | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index f1272d4956..dc75342b40 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -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; diff --git a/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll b/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll index 066e3038b0..504004763d 100644 --- a/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll +++ b/test/Transforms/GVN/2010-03-31-RedundantPHIs.ll @@ -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: |