[llvm] [LoopInterchange] Remove 'I' dependency (PR #140709)
Ryotaro Kasuga via llvm-commits
llvm-commits at lists.llvm.org
Tue May 20 04:22:38 PDT 2025
kasuga-fj wrote:
It is out-of-scope of this PR, however, I personally think we should fix DependenceAnalysis side.
https://github.com/llvm/llvm-project/blob/48a2836b4de7998018ee4f2b8c8171f7151aebf5/llvm/include/llvm/Analysis/DependenceAnalysis.h#L151-L153
I think the description "Returns the number of common loops surrounding the source and destination of the dependence" is inconsistent with the current implementation, which always returns 0. We should return the proper value, or change the return type to something like `std::optional<unsigned>` to distinguish between cases where the number of common loops is 0 and cases where it is unknown.
The current implementation is confusing, e.g., AliasAnalysis returns `MayAlias` for a given pair of instructions.
https://github.com/llvm/llvm-project/blob/48a2836b4de7998018ee4f2b8c8171f7151aebf5/llvm/lib/Analysis/DependenceAnalysis.cpp#L3619-L3625
https://github.com/llvm/llvm-project/pull/140709
More information about the llvm-commits
mailing list