summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-06-23 08:05:27 +0000
committerTobias Grosser <tobias@grosser.es>2017-06-23 08:05:27 +0000
commit57a1d36d9858bf0dfbba205cabf7fd33316a85f7 (patch)
tree41c361d23efa48a5f164e2085ccfdb499972c63c
parent8f23fb8486c89b261c65a16ddcb51a0d50810c7e (diff)
downloadbcm5719-llvm-57a1d36d9858bf0dfbba205cabf7fd33316a85f7.tar.gz
bcm5719-llvm-57a1d36d9858bf0dfbba205cabf7fd33316a85f7.zip
Hoist buildMinMaxAccess computeout to cover full alias-group
This allows us to bail out both in case the lexmin/max computation is too expensive, but also in case the commulative cost across an alias group is too expensive. This is an improvement of r303404, which did not seem to be sufficient to keep the Android Buildbot quiet. llvm-svn: 306087
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 2d2d9a1adab..71b4f09ffcb 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -98,7 +98,7 @@ static cl::opt<int>
OptComputeOut("polly-analysis-computeout",
cl::desc("Bound the scop analysis by a maximal amount of "
"computational steps (0 means no bound)"),
- cl::Hidden, cl::init(600000), cl::ZeroOrMore,
+ cl::Hidden, cl::init(800000), cl::ZeroOrMore,
cl::cat(PollyCategory));
static cl::opt<bool> PollyRemarksMinimal(
@@ -2447,16 +2447,11 @@ buildMinMaxAccess(isl::set Set, Scop::MinMaxVectorTy &MinMaxAccesses, Scop &S) {
return isl::stat::error;
}
- {
- IslMaxOperationsGuard MaxOpGuard(Ctx.get(), OptComputeOut);
- MinPMA = Set.lexmin_pw_multi_aff();
- MaxPMA = Set.lexmax_pw_multi_aff();
- }
+ MinPMA = Set.lexmin_pw_multi_aff();
+ MaxPMA = Set.lexmax_pw_multi_aff();
- if (isl_ctx_last_error(Ctx.get()) == isl_error_quota) {
- S.invalidate(COMPLEXITY, DebugLoc());
+ if (isl_ctx_last_error(Ctx.get()) == isl_error_quota)
return isl::stat::error;
- }
MinPMA = MinPMA.coalesce();
MaxPMA = MaxPMA.coalesce();
@@ -2500,7 +2495,6 @@ static bool calculateMinMaxAccess(Scop::AliasGroupTy AliasGroup, Scop &S,
isl::union_set Locations = Accesses.range();
Locations = Locations.coalesce();
Locations = Locations.detect_equalities();
- ;
auto Lambda = [&MinMaxAccesses, &S](isl::set Set) -> isl::stat {
return buildMinMaxAccess(Set, MinMaxAccesses, S);
@@ -3332,9 +3326,16 @@ bool Scop::buildAliasGroups(AliasAnalysis &AA) {
splitAliasGroupsByDomain(AliasGroups);
for (AliasGroupTy &AG : AliasGroups) {
- bool Valid = buildAliasGroup(AG, HasWriteAccess);
- if (!Valid)
+ {
+ IslMaxOperationsGuard MaxOpGuard(getIslCtx(), OptComputeOut);
+ bool Valid = buildAliasGroup(AG, HasWriteAccess);
+ if (!Valid)
+ return false;
+ }
+ if (isl_ctx_last_error(getIslCtx()) == isl_error_quota) {
+ invalidate(COMPLEXITY, DebugLoc());
return false;
+ }
}
return true;
OpenPOWER on IntegriCloud