[llvm] LCA: migrate from DA to LAA; fix cost computation (PR #107691)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 03:53:00 PDT 2024
artagnon wrote:
> A possible reason for this could be that we now have to compute _both_ LAA and DA.
I also think this is the reason.
> Do you think it will be possible to change LoopInterchange to use LAA as well in the future, so only one will have to be computed?
I investigated this thoroughly, and the remaining callers of DA after this patch are LoopInterchange and LoopUnrollAndJam. However, I think it is _impossible_ to migrate them to LAA, without doing months of work on LAA first. The reason is that LAA seems to be fundamentally less powerful than DA, and cannot analyze dependencies in loop nests: it can only analyze dependencies in a loop that is determined to be the innermost one. This is also the reason outer-loop vectorization is a non-starter.
Even if we were to go for a full rewrite, I think LoopInterchange and LoopUnrollAndJam fundamentally require a more powerful analysis than LAA. I think my conclusion is correct, but I would be more comfortable if @fhahn could also confirm this.
https://github.com/llvm/llvm-project/pull/107691
More information about the llvm-commits
mailing list