[PATCH] D98116: [NPM] Add -enable-loopinterchange option to NPM
Ta-Wei Tu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 6 10:39:49 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8a003861a31a: [NPM] Add -enable-loopinterchange option to NPM (authored by TaWeiTu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98116/new/
https://reviews.llvm.org/D98116
Files:
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
Index: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -84,9 +84,9 @@
clEnumValN(::CFLAAType::Both, "both",
"Enable both variants of CFL-AA")));
-static cl::opt<bool> EnableLoopInterchange(
+cl::opt<bool> EnableLoopInterchange(
"enable-loopinterchange", cl::init(false), cl::Hidden,
- cl::desc("Enable the new, experimental LoopInterchange Pass"));
+ cl::desc("Enable the experimental LoopInterchange Pass"));
cl::opt<bool> EnableUnrollAndJam("enable-unroll-and-jam", cl::init(false),
cl::Hidden,
Index: llvm/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/lib/Passes/PassBuilder.cpp
+++ llvm/lib/Passes/PassBuilder.cpp
@@ -301,6 +301,7 @@
extern cl::opt<bool> EnableIROutliner;
extern cl::opt<bool> EnableOrderFileInstrumentation;
extern cl::opt<bool> EnableCHR;
+extern cl::opt<bool> EnableLoopInterchange;
extern cl::opt<bool> EnableUnrollAndJam;
extern cl::opt<bool> EnableLoopFlatten;
extern cl::opt<bool> RunNewGVN;
@@ -582,6 +583,10 @@
C(LPM2, Level);
LPM2.addPass(LoopDeletionPass());
+
+ if (EnableLoopInterchange)
+ LPM2.addPass(LoopInterchangePass());
+
// Do not enable unrolling in PreLinkThinLTO phase during sample PGO
// because it changes IR to makes profile annotation in back compile
// inaccurate. The normal unroller doesn't pay attention to forced full unroll
@@ -748,6 +753,10 @@
C(LPM2, Level);
LPM2.addPass(LoopDeletionPass());
+
+ if (EnableLoopInterchange)
+ LPM2.addPass(LoopInterchangePass());
+
// Do not enable unrolling in PreLinkThinLTO phase during sample PGO
// because it changes IR to makes profile annotation in back compile
// inaccurate. The normal unroller doesn't pay attention to forced full unroll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98116.328784.patch
Type: text/x-patch
Size: 2033 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210306/bf3683d0/attachment.bin>
More information about the llvm-commits
mailing list