[DeLICM] Fortify against exceeding isl's max operations counter.
commit0890c3ae3c48d17ef10203d4a7c847a7c986daa1
authorMichael Kruse <llvm@meinersbur.de>
Thu, 23 Feb 2017 21:58:20 +0000 (23 21:58 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Thu, 23 Feb 2017 21:58:20 +0000 (23 21:58 +0000)
treea3974a1f6a44775eda5d4e2be358b181e83fc263
parent4f405687833b4f70bd248eafeac875db2dc31b75
[DeLICM] Fortify against exceeding isl's max operations counter.

Control flow would flow-through after the check whether the operations
quota exceeded, with the intention that it would later be caught by
Knowledge::isUsable(). However, the Knowledge constructor has its own
assertions to check consistency which would fail if its fields have only
been initialized partially because some sets have been computed correctly
before the operations quota takes effect.

Fix by erroring-out early instead of falling-throught into the code that
might expect that everything has been computed correctly. For robustness,
also bail-out if any of the fields contain nullptr values instead of
relying on isl always setting exactly this error code if something went
wrong.

This should fix the
perf-x86_64-penryn-O3-polly-before-vectorizer-unprofitable
(-polly-process-unprofitable -polly-position=before-vectorizer
-polly-enable-delicm) buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@296022 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transform/DeLICM.cpp