Fix isl out-of-quota errors affecting later quota guards.
commit783ae411c28ae67dfa2c0e04bd74c8985f8e1f2b
authorMichael Kruse <llvm@meinersbur.de>
Fri, 22 Dec 2017 01:10:31 +0000 (22 01:10 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Fri, 22 Dec 2017 01:10:31 +0000 (22 01:10 +0000)
tree573943a29b8b649caa34757974e86cd2a5759fb6
parent58526a38a6349b66e0d2bf9066cf86e1b8b89078
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.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@321329 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/Support/GICHelper.h
test/DeLICM/reject_outofquota.ll