llvm-project/polly
Michael Kruse bc633fe46b [Polly] Consider InvalidContext to determine partial READ.
MemoryAccess::setNewAccessRelation() in assert-builds checks whether the
access relation for a READ has a memory location for every instance of
the domain. Otherwise, we would not have value to load from. That check
already considered that instances outside the Scop's context do not
matter since they are never executed (or would be undefined behavior).
In this patch also take instances of the InvalidContext into account,
as these can also be assumed to never occur. InvalidContext was
introduced to avoid the computational complexity of subtracting
restrictions from the AssumedContext. However, this additional check in
setNewAccessRelation is only done in assert-builds.

The assertion case with an InvalidContext may occur with DeLICM on a
conditionally infinite loops, as it is the case in the following code:

    for (int i = 0; i < n; i+=b)
      vreg = ...;
    *Dest = vreg;

The loop is infinite when b=0, and [b] -> { : b = 0 }  is part of the
InvalidContext. When DeLICM tries to map the memory for %vreg to *Dest,
there is no store instance that uses the value of vreg when b = 0, hence
no location to map it to. However, the case is irrelevant since Polly's
runtime condition check ensures that this is never case.

Fixes llvm.org/PR48445
2020-12-10 22:25:19 -06:00
..
cmake [Windows][Polly] Disable LLVMPolly module for all compilers on Windows 2020-09-15 09:12:38 +03:00
docs Bump the trunk major version to 12 2020-07-15 12:05:05 +02:00
include/polly [Polly] Consider InvalidContext to determine partial READ. 2020-12-10 22:25:19 -06:00
lib [Polly] Consider InvalidContext to determine partial READ. 2020-12-10 22:25:19 -06:00
test [Polly] Consider InvalidContext to determine partial READ. 2020-12-10 22:25:19 -06:00
tools Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
unittests [Polly] Support linking ScopPassManager against LLVM dylib 2020-08-07 06:46:35 +02:00
utils Harmonize Python shebang 2020-07-16 21:53:45 +02:00
www [BasicAA] Replace -basicaa with -basic-aa in polly 2020-06-30 15:50:17 -07:00
.arclint
.gitattributes
.gitignore
CMakeLists.txt Remove .svn from exclude list as we moved to git 2020-10-21 16:09:21 +02:00
CREDITS.txt
LICENSE.txt Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README

README

Polly - Polyhedral optimizations for LLVM
-----------------------------------------
http://polly.llvm.org/

Polly uses a mathematical representation, the polyhedral model, to represent and
transform loops and other control flow structures. Using an abstract
representation it is possible to reason about transformations in a more general
way and to use highly optimized linear programming libraries to figure out the
optimal loop structure. These transformations can be used to do constant
propagation through arrays, remove dead loop iterations, optimize loops for
cache locality, optimize arrays, apply advanced automatic parallelization, drive
vectorization, or they can be used to do software pipelining.