forked from swiftlang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LAA] Refine stride checks for SCEVs during dependence analysis.
NOTE: This PR contains 1debdc1, which introduces a helper to get the stride as SCEV expression and is NFC. This can be submitted separately once we converge on the final version of the PR. Update getDependenceDistanceStrideAndSize to reason about different combinations of strides directly and explicitly. Instead of getting the constant strides for both source and sink of a dependence, start by getting the SCEV for their strides, if the SCEVs are non-wrapping AddRecs or nullopt otherwise. Then proceed by checking the strides. If either source or sink are not strided (i.e. not a non-wrapping AddRec), we check if either is not loop invariant and not strided. In that case, the accesses may overlap with earlier or later iterations and we cannot generate runtime checks to disambiguate them. Otherwise they are either loop invariant or strided. In that case, we can generate a runtime check to disambiguate them. If both are strided but either is not strided by a constant, we cannot analyze them further currently, but may be able to disambiguate them with a runtime check. Reasoning about non-constant strides can be extended as follow-up. If both are strided by constants, we proceed as previously. This is an alternative to llvm#99239 and also replaces additional checks if the underlying object is loop-invariant. Fixes llvm#87189.
- Loading branch information
Showing
7 changed files
with
89 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters