summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2016-11-10 11:44:10 +0000
committerTobias Grosser <tobias@grosser.es>2016-11-10 11:44:10 +0000
commitf67433abd9e9a07f030806397d7ef831537fabf4 (patch)
tree260b6fb24caa596826f369c9aebbaf5384abfde9 /clang/lib/Parse/ParseDecl.cpp
parent41ca327b5e8c36156c9a39c4f833a8db3a37d3ec (diff)
downloadbcm5719-llvm-f67433abd9e9a07f030806397d7ef831537fabf4.tar.gz
bcm5719-llvm-f67433abd9e9a07f030806397d7ef831537fabf4.zip
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
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud