[CodeGen] Detect empty domain because of parameters context.
commit0e2b9ca3a321850167aaf59fb0d1a1b69bdb805c
authorMichael Kruse <llvm@meinersbur.de>
Tue, 21 Nov 2017 22:11:10 +0000 (21 22:11 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 21 Nov 2017 22:11:10 +0000 (21 22:11 +0000)
tree77dbff33b6d54fc3446979825f19b81178b52506
parent4fe186c6df3bd685ca3962ac46dcfe2f4dcb8cfb
[CodeGen] Detect empty domain because of parameters context.

Isl does not allow generating isl_ast_expr from an isl_pw_aff that has an
empty domain (i.e. has no pieces). We already detected the case if the
isl_pw_aff comes with an empty domain.

isl_ast_build also considers the domain empty if it is disjoint with the
parameter context (e.g. parameters values that we exclude by runtime
versioning).

Intersect the access relation domain with the parameter context to
also detect such practically empty access domains. The effective
pointer used in the generated code is unimportand because it will never
be executed.

This fixes llvm.org/PR35362

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@318806 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/IslNodeBuilder.cpp
test/Isl/CodeGen/empty_domain_in_context.ll [new file with mode: 0644]