[llvm] [DependenceAnalysis] Extending SIV to handle fusable loops (PR #128782)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 18:55:08 PDT 2025


kasuga-fj wrote:

> If my understanding is correct this won't be a problem. Because the patch essentially says: let's assume the inner most loops are fused and then check the dependences

But they are not actually fused, and the client of DA is not only LoopFuse.

I didn't mean that the result is incorrect, but has changed due to the assumption of loop fusion. [This part](https://github.com/llvm/llvm-project/blob/4563cf607a25feabbaef6bb20076366437f01a2d/llvm/lib/Analysis/DependenceAnalysis.cpp#L4138-L4155) seems to attempt to split the result into two parts, with or without the assumption. However, the situation isn't that straightforward. The dependencies for `Levels < CommonLevels` would be affected by the assumption of loop-fusion. It might be noisy for clients other than LoopFuse, but I don't have a concrete example to illustrate it.

https://github.com/llvm/llvm-project/pull/128782


More information about the llvm-commits mailing list