summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis/ScopInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/Analysis/ScopInfo.cpp')
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 64f3b472689..174160ff259 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -104,6 +104,11 @@ static cl::opt<bool>
cl::desc("Abort if an isl error is encountered"),
cl::init(true), cl::cat(PollyCategory));
+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));
+
//===----------------------------------------------------------------------===//
// Create a sequence of two schedules. Either argument may be null and is
@@ -3650,7 +3655,7 @@ bool Scop::isProfitable() const {
ContainsScalarAccs |= MA->isScalarKind();
}
- if (ContainsArrayAccs && !ContainsScalarAccs)
+ if (!UnprofitableScalarAccs || (ContainsArrayAccs && !ContainsScalarAccs))
OptimizableStmtsOrLoops += Stmt.getNumIterators();
}
OpenPOWER on IntegriCloud