[PATCH] D38584: Changes to Polly enable interprocedural loop fusion on libquantum
Tobias Grosser via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 5 07:25:58 PDT 2017
grosser created this revision.
This should give a 2x - 2.5x speedup on libquantum.
Use maximal loop fusion
Enable Polly
Dump the isl ast structure
Allow more time in dependence info
Allow invariant load hoisting
Make scop detection slightly more permissive
https://reviews.llvm.org/D38584
Files:
lib/Analysis/DependenceInfo.cpp
lib/Analysis/ScopDetection.cpp
lib/CodeGen/IslAst.cpp
lib/Support/RegisterPasses.cpp
lib/Transform/ScheduleOptimizer.cpp
Index: lib/Transform/ScheduleOptimizer.cpp
===================================================================
--- lib/Transform/ScheduleOptimizer.cpp
+++ lib/Transform/ScheduleOptimizer.cpp
@@ -110,7 +110,7 @@
static cl::opt<std::string> FusionStrategy(
"polly-opt-fusion", cl::desc("The fusion strategy to choose (min/max)"),
- cl::Hidden, cl::init("min"), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::init("max"), cl::ZeroOrMore, cl::cat(PollyCategory));
static cl::opt<std::string>
MaximizeBandDepth("polly-opt-maximize-bands",
Index: lib/Support/RegisterPasses.cpp
===================================================================
--- lib/Support/RegisterPasses.cpp
+++ lib/Support/RegisterPasses.cpp
@@ -56,7 +56,7 @@
static cl::opt<bool>
PollyEnabled("polly", cl::desc("Enable the polly optimizer (only at -O3)"),
- cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::init(true), cl::ZeroOrMore, cl::cat(PollyCategory));
static cl::opt<bool> PollyDetectOnly(
"polly-only-scop-detection",
Index: lib/CodeGen/IslAst.cpp
===================================================================
--- lib/CodeGen/IslAst.cpp
+++ lib/CodeGen/IslAst.cpp
@@ -814,7 +814,7 @@
Ast.reset(new IslAstInfo(Scop, D));
- DEBUG(printScop(dbgs(), Scop));
+ printScop(errs(), Scop);
return false;
}
Index: lib/Analysis/ScopDetection.cpp
===================================================================
--- lib/Analysis/ScopDetection.cpp
+++ lib/Analysis/ScopDetection.cpp
@@ -237,7 +237,7 @@
static cl::opt<bool, true> XPollyInvariantLoadHoisting(
"polly-invariant-load-hoisting", cl::desc("Hoist invariant loads."),
cl::location(PollyInvariantLoadHoisting), cl::Hidden, cl::ZeroOrMore,
- cl::init(false), cl::cat(PollyCategory));
+ cl::init(true), cl::cat(PollyCategory));
/// The minimal trip count under which loops are considered unprofitable.
static const unsigned MIN_LOOP_TRIP_COUNT = 8;
@@ -1185,11 +1185,11 @@
continue;
if (isErrorBlock(*OpInst->getParent(), Context.CurRegion, LI, DT)) {
- auto *PHI = dyn_cast<PHINode>(OpInst);
+ auto *PHI = dyn_cast<PHINode>(&Inst);
if (PHI) {
for (User *U : PHI->users()) {
if (!isa<TerminatorInst>(U))
- return false;
+ return true;
}
} else {
return false;
Index: lib/Analysis/DependenceInfo.cpp
===================================================================
--- lib/Analysis/DependenceInfo.cpp
+++ lib/Analysis/DependenceInfo.cpp
@@ -45,7 +45,7 @@
"polly-dependences-computeout",
cl::desc("Bound the dependence analysis by a maximal amount of "
"computational steps (0 means no bound)"),
- cl::Hidden, cl::init(500000), cl::ZeroOrMore, cl::cat(PollyCategory));
+ cl::Hidden, cl::init(0), cl::ZeroOrMore, cl::cat(PollyCategory));
static cl::opt<bool> LegalityCheckDisabled(
"disable-polly-legality", cl::desc("Disable polly legality check"),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38584.117815.patch
Type: text/x-patch
Size: 3050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171005/fbd8848b/attachment.bin>
More information about the llvm-commits
mailing list