diff options
| author | Tobias Grosser <tobias@grosser.es> | 2014-07-02 17:47:48 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2014-07-02 17:47:48 +0000 |
| commit | 5e6813d184558c72a49a830a5b56eae057c25ec4 (patch) | |
| tree | b5fece041dc2a41747a58a314e4592cb6627abfc /polly/lib/CodeGen/IslAst.cpp | |
| parent | c324b95c77f0e729801cbbcb1aa075300e48e5d1 (diff) | |
| download | bcm5719-llvm-5e6813d184558c72a49a830a5b56eae057c25ec4.tar.gz bcm5719-llvm-5e6813d184558c72a49a830a5b56eae057c25ec4.zip | |
Derive run-time conditions for delinearization
As our delinearization works optimistically, we need in some cases run-time
checks that verify our optimistic assumptions. A simple example is the
following code:
void foo(long n, long m, long o, double A[n][m][o]) {
for (long i = 0; i < 100; i++)
for (long j = 0; j < 150; j++)
for (long k = 0; k < 200; k++)
A[i][j][k] = 1.0;
}
After clang linearized the access to A and we delinearized it again to
A[i][j][k] we need to ensure that we do not access the delinearized array
out of bounds (this information is not available in LLVM-IR). Hence, we
need to verify the following constraints at run-time:
CHECK: Assumed Context:
CHECK: [o, m] -> { : m >= 150 and o >= 200 }
llvm-svn: 212198
Diffstat (limited to 'polly/lib/CodeGen/IslAst.cpp')
| -rw-r--r-- | polly/lib/CodeGen/IslAst.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index fd08be2850c..da4ef7b7056 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -341,7 +341,7 @@ void IslAst::buildRunCondition(__isl_keep isl_ast_build *Context) { PwZero = isl_pw_aff_intersect_domain( PwZero, isl_set_complement(S->getAssumedContext())); - isl_pw_aff *Cond = isl_pw_aff_union_max(PwZero, PwOne); + isl_pw_aff *Cond = isl_pw_aff_union_max(PwOne, PwZero); RunCondition = isl_ast_build_expr_from_pw_aff(Context, Cond); } |

