llvm-project/polly/lib/Analysis
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
..
DependenceInfo.cpp [DependenceInfo] Compute WAR dependence info using ISL kills. NFC. 2019-08-29 18:55:55 +00:00
PolyhedralInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
PruneUnprofitable.cpp Apply include-what-you-use #include removal suggestions. NFC. 2019-03-28 20:19:49 +00:00
ScopBuilder.cpp [Polly][ScopBuilder] Use only modeled instructions to compute statement granularity. 2020-11-10 15:30:16 -06:00
ScopDetection.cpp [AA] Split up LocationSize::unknown() 2020-11-26 18:39:55 +01:00
ScopDetectionDiagnostic.cpp Fix polly build after StringRef change. 2020-01-28 19:44:20 -08:00
ScopGraphPrinter.cpp [CFGPrinter][CallPrinter][polly] Adding distinct structure for CFGDOTInfo 2020-04-06 17:42:54 +00:00
ScopInfo.cpp [Polly] Consider InvalidContext to determine partial READ. 2020-12-10 22:25:19 -06:00
ScopPass.cpp Apply include-what-you-use #include removal suggestions. NFC. 2019-03-28 20:19:49 +00:00