[llvm] [Sink] Allow sinking of loads to distant blocks (PR #135986)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 18:30:45 PDT 2025
LU-JOHN wrote:
> What you're doing here looks like it will be extremely expensive even if you don't hit a degenerate case.
>
> You're performing AA queries on all stores in a potentially large number of blocks (and I think the block walk may not even stop at the origin block if there is a way past it), and you're doing that for every single potentially sinkable load.
>
> If you want to do something like this you probably need to make use of MemorySSA or similar.
The block walk must stop in the load block since the load block dominates the uses. I'll and a limit to the number of stores that are analyzed. Is a default of 6 okay?
https://github.com/llvm/llvm-project/pull/135986
More information about the llvm-commits
mailing list