[all-commits] [llvm/llvm-project] 3099b7: [Passes] Move LoopInterchange into optimization pi...

Ryotaro Kasuga via All-commits all-commits at lists.llvm.org
Fri Jul 4 04:07:14 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3099b7eb5da7605995ab89695353866189e06ac3
      https://github.com/llvm/llvm-project/commit/3099b7eb5da7605995ab89695353866189e06ac3
  Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
  Date:   2025-07-04 (Fri, 04 Jul 2025)

  Changed paths:
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    A llvm/test/Transforms/LoopInterchange/position-in-pipeline.ll

  Log Message:
  -----------
  [Passes] Move LoopInterchange into optimization pipeline (#145503)

As mentioned in https://github.com/llvm/llvm-project/pull/145071,
LoopInterchange should be part of the optimization pipeline rather than
the simplification pipeline. This patch moves LoopInterchange into the
optimization pipeline.

More contexts:

- By default, LoopInterchange attempts to improve data locality,
however, it also takes increasing vectorization opportunities into
account. Given that, it is reasonable to run it as close to
vectorization as possible.
- I looked into previous changes related to the placement of
LoopInterchange, but couldn’t find any strong motivation suggesting that
it benefits other simplifications.
- As far as I tried some tests (including llvm-test-suite), removing
LoopInterchange from the simplification pipeline does not affect other
simplifications. Therefore, there doesn't seem to be much value in
keeping it there.
- The new position reduces compile-time for ThinLTO, probably because it
only runs once per function in post-link optimization, rather than both
in pre-link and post-link optimization.

I haven't encountered any cases where the positional difference affects
optimization results, so please feel free to revert if you run into any issues.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list