[PATCH] D22639: Add flag to PassManagerBuilder to disable GVN Hoist Pass.
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 15:09:54 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL276479: Add flag to PassManagerBuilder to disable GVN Hoist Pass. (authored by asbirlea).
Changed prior to commit:
https://reviews.llvm.org/D22639?vs=65142&id=65173#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22639
Files:
llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/trunk/test/Feature/optnone-opt.ll
Index: llvm/trunk/test/Feature/optnone-opt.ll
===================================================================
--- llvm/trunk/test/Feature/optnone-opt.ll
+++ llvm/trunk/test/Feature/optnone-opt.ll
@@ -41,7 +41,6 @@
; OPT-O1-DAG: Skipping pass 'Combine redundant instructions'
; OPT-O1-DAG: Skipping pass 'Dead Store Elimination'
; OPT-O1-DAG: Skipping pass 'Early CSE'
-; OPT-O1-DAG: Skipping pass 'Early GVN Hoisting of Expressions'
; OPT-O1-DAG: Skipping pass 'Jump Threading'
; OPT-O1-DAG: Skipping pass 'MemCpy Optimization'
; OPT-O1-DAG: Skipping pass 'Reassociate expressions'
Index: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -134,6 +134,10 @@
cl::desc("Control the amount of inlining in pre-instrumentation inliner "
"(default = 75)"));
+static cl::opt<bool> EnableGVNHoist(
+ "enable-gvn-hoist", cl::init(false), cl::Hidden,
+ cl::desc("Enable the experimental GVN Hoisting pass"));
+
PassManagerBuilder::PassManagerBuilder() {
OptLevel = 2;
SizeLevel = 0;
@@ -232,7 +236,8 @@
FPM.add(createCFGSimplificationPass());
FPM.add(createSROAPass());
FPM.add(createEarlyCSEPass());
- FPM.add(createGVNHoistPass());
+ if(EnableGVNHoist)
+ FPM.add(createGVNHoistPass());
FPM.add(createLowerExpectIntrinsicPass());
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22639.65173.patch
Type: text/x-patch
Size: 1478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160722/3ebf6570/attachment-0001.bin>
More information about the llvm-commits
mailing list