summaryrefslogtreecommitdiffstats
path: root/polly/include
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2017-12-22 01:10:31 +0000
committerMichael Kruse <llvm@meinersbur.de>2017-12-22 01:10:31 +0000
commit5c2441901f760d35d86f793c1c2014ca52660332 (patch)
tree766e01fc487a43addb60e1b8a31635ef30cf4b88 /polly/include
parenta22e923106a8faabff9cfe5ab6d73f5eddfcfa71 (diff)
downloadbcm5719-llvm-5c2441901f760d35d86f793c1c2014ca52660332.tar.gz
bcm5719-llvm-5c2441901f760d35d86f793c1c2014ca52660332.zip
Fix isl out-of-quota errors affecting later quota guards.
If an out-of-quota error occurred, the last error would be isl_error_quota unless a different error occured. We typically check whether the max-operations occured by comparing to that error value after leaving the quota guard. This would check whether there ever was a quota-error, not just in the last quota guards. The observable bug occurred if the max-operations limit was reached in DeLICM, and if -polly-dependences-computout=0, DependenceInfo would think that the quota for computing dependencies was the reason, i.e., fail the operation even if the calculation itself was successful. Fix by reseting the last error to isl_error_none when entering a quota guard, signaling that no quota error occured unless in the guard's scope. llvm-svn: 321329
Diffstat (limited to 'polly/include')
-rw-r--r--polly/include/polly/Support/GICHelper.h6
1 files changed, 6 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;
OpenPOWER on IntegriCloud