[polly] r298081 - [ScopInfo/PruneUnprofitable] Move default profitability check.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 06:10:06 PDT 2017


Author: meinersbur
Date: Fri Mar 17 08:10:05 2017
New Revision: 298081

URL: http://llvm.org/viewvc/llvm-project?rev=298081&view=rev
Log:
[ScopInfo/PruneUnprofitable] Move default profitability check.

In the previous default ScopInfo applied the profitability heuristic for
scalar accesses (-polly-unprofitable-scalar-accs=true) and the
-polly-prune-unprofitable was disabled by default
(-polly-enable-prune-unprofitable=false) as that pruning was already done.

This changes switches the defaults to -polly-unprofitable-scalar-accs=true
-polly-enable-prune-unprofitable=false such that the scalar access
heuristic check is done by the pass. This allows passes between ScopInfo
and PruneUnprofitable to optimize away scalar accesses.

Without enabling such intermediate passes, there is no change in
behaviour of profitability checks in a PassManagerBuilder built
pass chain, but it allows us to cover this configuration with the
buildbots.

Suggested-by: Tobias Grosser <tobias at grosser.es>

Modified:
    polly/trunk/lib/Analysis/ScopInfo.cpp
    polly/trunk/lib/Support/RegisterPasses.cpp

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=298081&r1=298080&r2=298081&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Fri Mar 17 08:10:05 2017
@@ -135,7 +135,7 @@ static cl::opt<bool>
 static cl::opt<bool> UnprofitableScalarAccs(
     "polly-unprofitable-scalar-accs",
     cl::desc("Count statements with scalar accesses as not optimizable"),
-    cl::Hidden, cl::init(true), cl::cat(PollyCategory));
+    cl::Hidden, cl::init(false), cl::cat(PollyCategory));
 
 static cl::opt<bool> PollyPreciseInbounds(
     "polly-precise-inbounds",

Modified: polly/trunk/lib/Support/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/RegisterPasses.cpp?rev=298081&r1=298080&r2=298081&view=diff
==============================================================================
--- polly/trunk/lib/Support/RegisterPasses.cpp (original)
+++ polly/trunk/lib/Support/RegisterPasses.cpp Fri Mar 17 08:10:05 2017
@@ -197,7 +197,7 @@ static cl::opt<bool>
 static cl::opt<bool> EnablePruneUnprofitable(
     "polly-enable-prune-unprofitable",
     cl::desc("Bail out on unprofitable SCoPs before rescheduling"), cl::Hidden,
-    cl::init(false), cl::cat(PollyCategory));
+    cl::init(true), cl::cat(PollyCategory));
 
 namespace polly {
 void initializePollyPasses(PassRegistry &Registry) {




More information about the llvm-commits mailing list