diff options
| author | Tobias Grosser <tobias@grosser.es> | 2017-06-25 06:32:00 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2017-06-25 06:32:00 +0000 |
| commit | 1b9d1bcc6d29399598d943b19e3adb7f98e1714d (patch) | |
| tree | 2abae6f08b29f0dfbbde4b7659307d8c072c4b78 /polly/lib/Analysis | |
| parent | c4a4d04717693478af99f28dd8333f2f9d76dcc9 (diff) | |
| download | bcm5719-llvm-1b9d1bcc6d29399598d943b19e3adb7f98e1714d.tar.gz bcm5719-llvm-1b9d1bcc6d29399598d943b19e3adb7f98e1714d.zip | |
[ScopInfo] Bound the number of array disjuncts in run-time bounds checks
This reduces the compilation time of one reduced test case from Android from
16 seconds to 100 mseconds (we bail out), without negatively impacting any
other test case we currently have.
We still saw occasionally compilation timeouts on the AOSP buildbot. Hopefully,
those will go away with this change.
llvm-svn: 306235
Diffstat (limited to 'polly/lib/Analysis')
| -rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 8c2294b34d2..3f6f1d9caa4 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -114,6 +114,12 @@ static cl::opt<bool> DisableMultiplicativeReductions( cl::desc("Disable multiplicative reductions"), cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::cat(PollyCategory)); +static cl::opt<int> RunTimeChecksMaxAccessDisjuncts( + "polly-rtc-max-array-disjuncts", + cl::desc("The maximal number of disjunts allowed in memory accesses to " + "to build RTCs."), + cl::Hidden, cl::ZeroOrMore, cl::init(8), cl::cat(PollyCategory)); + static cl::opt<unsigned> RunTimeChecksMaxParameters( "polly-rtc-max-parameters", cl::desc("The maximal number of parameters allowed in RTCs."), cl::Hidden, @@ -2447,6 +2453,9 @@ buildMinMaxAccess(isl::set Set, Scop::MinMaxVectorTy &MinMaxAccesses, Scop &S) { return isl::stat::error; } + if (isl_set_n_basic_set(Set.get()) > RunTimeChecksMaxAccessDisjuncts) + return isl::stat::error; + MinPMA = Set.lexmin_pw_multi_aff(); MaxPMA = Set.lexmax_pw_multi_aff(); |

