[llvm] [LoopInterchange] Enable it by default (PR #124911)
Ryotaro Kasuga via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 05:22:57 PDT 2025
kasuga-fj wrote:
> there can still be some opportunities left, but unless we quantify, we are not sure how much benefit it will offer. Some of the opportunities you mentioned are known to me, but I have not quantified the gain yet.
Have you tried them? As far as my quick experiment, at least delaying the calculation of `LoopCacheAnalysis` was effective in some cases. I believe all the ideas I listed are not very difficult to implement, so if you've not tried, I will try them.
> Tuning `MaxMemInstrCount` is another option, but that might limit the opportunities interchange has.
Since interchange fails in most cases anyway, I don’t think reducing the value would cause major practical issues (although I’m not sure whether it actually helps with compile-time). We can always raise it again after improving `LoopInterchange` and once having a too small value becomes a real problem.
> I feel we are doing quite well on the geomean as the benefits of enabling the pass outweigh the cost.
I think we also need to consider individual cases, not just the geomean. A compile-time increase of over 20% despite no changes is, at the very least, quite substantial.
Although I'm very interested in enabling `LoopInterchange` by default, after the recent discussions, I’ve come to the conclusion that it’s still not ready. In addition to the compile-time concerns, the issue of GEP-driven delinearization also remains.
https://github.com/llvm/llvm-project/pull/124911
More information about the llvm-commits
mailing list