[PATCH] D10386: [LAA] Merge memchecks for accesses separated by a constant offset
Adam Nemet
anemet at apple.com
Wed Jul 15 23:44:23 PDT 2015
anemet added a comment.
Hi Silviu,
In http://reviews.llvm.org/D10386#205474, @sbaranga wrote:
> Looking at the logic in analyzeLoops:
>
> In order to need memory checks, first we need Accesses.isDependencyCheckNeeded() to evaluate to true.
> Since we need an unknown dependence between two objects to get into the 'veto' case, it follows that areDepsSafe will return false (we have al least one unknown dependence).
>
> This causes us to take the "!CanVecMem && DepChecker.shouldRetryWithRuntimeCheck()" branch and reset the dependence checks, which in turn will cause us to not group pointers.
shouldRetry... should only be set if we didn't find a constant distance between the accesses. This is why I said earlier that:
The problem is that we can have unknown distance between pointers of the same underlying object also if the stride is unknown (look for the return Dependence::Unknown before the ShouldRetryWithRuntimeCheck in isDependent). In this case we don't give up on dependence analysis so your flag would still be true.
Was something unclear about this? I can help to come up with a testcase for this if that helps.
Adam
Repository:
rL LLVM
http://reviews.llvm.org/D10386
More information about the llvm-commits
mailing list