IslAst: always use the context during ast generation
authorTobias Grosser <tobias@grosser.es>
Thu, 10 Nov 2016 09:39:58 +0000 (09:39 +0000)
committerTobias Grosser <tobias@grosser.es>
Thu, 10 Nov 2016 09:39:58 +0000 (09:39 +0000)
commitd0b9173caa30cb29ecbcd047901fbb450e4f0e70
treeaf343f64d84888c9cf480d7ae240271fd64f0a6e
parent1fbb48292888e6609b481aa0b1d1f4c2928fd0e7
IslAst: always use the context during ast generation

Providing the context to the ast generator allows for additional simplifcations
and -- more importantly -- allows to generate loops with only partially bounded
domains, assuming the domains are bounded for all parameter configurations
that are valid as defined by the context.

This change fixes the crash reported in http://llvm.org/PR30956

The original reason why we did not include the context when generating an
AST was that CLooG and later isl used to sometimes transfer some of the
constraints that bound the size of parameters from the context into the
generated AST. This resulted in operations with very large constants, which
sometimes introduced problematic integer overflows. The latest versions of
the isl AST generator are careful to not introduce such constants.

Reported-by: Eli Friedman <efriedma@codeaurora.org>
llvm-svn: 286442
polly/lib/CodeGen/IslAst.cpp
polly/test/Isl/Ast/domain_bounded_only_with_context.ll [new file with mode: 0644]
polly/test/Isl/Ast/simple-run-time-condition.ll
polly/test/Isl/CodeGen/exprModDiv.ll
polly/test/ScheduleOptimizer/full_partial_tile_separation.ll