llvm-project/polly/lib
Tobias Grosser f67433abd9 SCEVAffinator: pass parameter-only set to addRestriction if BB=nullptr
Assumptions can either be added for a given basic block, in which case the set
describing the assumptions is expected to match the dimensions of its domain.
In case no basic block is provided a parameter-only set is expected to describe
the assumption.

The piecewise expressions that are generated by the SCEVAffinator sometimes
have a zero-dimensional domain (e.g., [p] -> { [] : p <= -129 or p >= 128 }),
which looks similar to a parameter-only domain, but is still a set domain.

This change adds an assert that checks that we always pass parameter domains to
addAssumptions if BB is empty to make mismatches here fail early.

We also change visitTruncExpr to always convert to parameter sets, if BB is
null. This change resolves http://llvm.org/PR30941

Another alternative to this change would have been to inspect all code to make
sure we directly generate in the SCEV affinator parameter sets in case of empty
domains. However, this would likely complicate the code which combines parameter
and non-parameter domains when constructing a statement domain. We might still
consider doing this at some point, but as this likely requires several non-local
changes this should probably be done as a separate refactoring.

Reported-by: Eli Friedman <efriedma@codeaurora.org>
llvm-svn: 286444
2016-11-10 11:44:10 +00:00
..
Analysis SCEVAffinator: pass parameter-only set to addRestriction if BB=nullptr 2016-11-10 11:44:10 +00:00
CodeGen IslAst: always use the context during ast generation 2016-11-10 09:39:58 +00:00
Exchange Perform copying to created arrays according to the packing transformation 2016-09-14 06:26:09 +00:00
External Update isl to isl-0.17.1-243-g24c0339 2016-11-04 11:56:48 +00:00
JSON Fix spacing around variable initializations and for-loops. NFC. 2016-08-09 17:49:24 +00:00
Support SCEVAffinator: pass parameter-only set to addRestriction if BB=nullptr 2016-11-10 11:44:10 +00:00
Transform Perform copying to created arrays according to the packing transformation 2016-09-14 06:26:09 +00:00
CMakeLists.txt Add -polly-flatten-schedule pass. 2016-09-08 15:02:36 +00:00
Polly.cpp Drop '@brief' from doxygen comments 2016-09-02 06:33:33 +00:00