diff options
-rw-r--r-- | polly/include/polly/Support/GICHelper.h | 6 | ||||
-rw-r--r-- | polly/test/DeLICM/reject_outofquota.ll | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/polly/include/polly/Support/GICHelper.h b/polly/include/polly/Support/GICHelper.h index a30d1d01ee5..3c0fe40bb9c 100644 --- a/polly/include/polly/Support/GICHelper.h +++ b/polly/include/polly/Support/GICHelper.h @@ -396,6 +396,12 @@ public: assert(isl_ctx_get_max_operations(IslCtx) == 0 && "Nested max operations not supported"); + // Users of this guard may check whether the last error was isl_error_quota. + // Reset the last error such that a previous out-of-quota error is not + // mistaken to have occurred in the in this quota, even if the max number of + // operations is set to infinite (LocalMaxOps == 0). + isl_ctx_reset_error(IslCtx); + if (LocalMaxOps == 0) { // No limit on operations; also disable restoring on_error/max_operations. this->IslCtx = nullptr; diff --git a/polly/test/DeLICM/reject_outofquota.ll b/polly/test/DeLICM/reject_outofquota.ll index eac194354b8..95ac67acab9 100644 --- a/polly/test/DeLICM/reject_outofquota.ll +++ b/polly/test/DeLICM/reject_outofquota.ll @@ -1,4 +1,5 @@ ; RUN: opt %loadPolly -polly-delicm -analyze -pass-remarks-analysis=polly-delicm -polly-delicm-max-ops=1 < %s 2>&1 | FileCheck %s +; RUN: opt %loadPolly -polly-delicm -polly-dependences -analyze -polly-delicm-max-ops=1 -polly-dependences-computeout=0 < %s | FileCheck %s -check-prefix=DEP ; ; void func(double *A) { ; for (int j = 0; j < 2; j += 1) { /* outer */ @@ -63,3 +64,16 @@ return: ; CHECK: maximal number of operations exceeded during zone analysis + +; Check that even if the quota was exceeded in DeLICM, DependenceInfo is still +; successfull since it uses a different operations counter. +; +; DEP: RAW dependences: +; DEP-NOT: n/a +; DEP: WAR dependences: +; DEP-NOT: n/a +; DEP: WAW dependences: +; DEP-NOT: n/a +; DEP: Reduction dependences: +; DEP-NOT: n/a +; DEP: Transitive closure of reduction dependences: |