[llvm] [LoopInterchange] Improve profitability check for vectorization (PR #133672)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 06:49:47 PDT 2025


kasuga-fj wrote:

Oops! You're right, I only considered the execution order within a BB and didn't take the order of BBs into account. Thanks for the detailed explanation, it is very helpful.

> Proposal: Instead of doublicating all dependencies, use the flag to mean "all dependencies of this vector are forward dependencies". It is reset whenever a dependency does not guarantee that the Dst is executed after Src (in the same loop iteration). This includes if Dst and Src are in different basic blocks (unless you can prove dominance).
> 
> You could go as for as to encode it as `<` and `*` in another trailing element of the dependence vector.

Thank you, this proposal makes sense to me. For now, I'll take a closer look at `LAA` and reconsider my approach.

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


More information about the llvm-commits mailing list