[all-commits] [llvm/llvm-project] 016022: Recommit "[LoopFlatten] Move it to a LoopPassManager"

sjoerdmeijer via All-commits all-commits at lists.llvm.org
Wed Jan 19 06:38:40 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 016022e5daa821cf22fe3bcfb89878a21fe88937
      https://github.com/llvm/llvm-project/commit/016022e5daa821cf22fe3bcfb89878a21fe88937
  Author: Sjoerd Meijer <sjoerd.meijer at arm.com>
  Date:   2022-01-19 (Wed, 19 Jan 2022)

  Changed paths:
    M llvm/lib/Passes/PassBuilderPipelines.cpp

  Log Message:
  -----------
  Recommit "[LoopFlatten] Move it to a LoopPassManager"

This was reverted because of a performance regression, which is fixed by
D116612 that I will commit directly after this change.

This reverts commit e92d63b467e13227408f9726fbd66d07cc58811c.


  Commit: f269ec230e2b65df165009b85f1e8cae2aeb1bba
      https://github.com/llvm/llvm-project/commit/f269ec230e2b65df165009b85f1e8cae2aeb1bba
  Author: Sjoerd Meijer <sjoerd.meijer at arm.com>
  Date:   2022-01-19 (Wed, 19 Jan 2022)

  Changed paths:
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    A llvm/test/Transforms/PhaseOrdering/AArch64/loopflatten.ll

  Log Message:
  -----------
  [LoopFlatten] Move it from LPM2 to LPM1

In D110057 we moved LoopFlatten to a LoopPassManager. This caused a performance
regression for our 64-bit targets (the 32-bit were unaffected), the pass is no
longer triggering for a motivating example. The reason is that the IR is just
very different than expected; we try to match loop statements and particular
uses of induction variables. The easiest is to just move LoopFlatten to a place
in the pipeline where the IR is as expected, which is just before
IndVarSimplify. This means we move it from LPM2 to LPM1, so that it actually
runs just a bit earlier from where it was running before. IndVarSimplify is
responsible for significant rewrites that are difficult to "look through" in
LoopFlatten.

Differential Revision: https://reviews.llvm.org/D116612


Compare: https://github.com/llvm/llvm-project/compare/c740a07863b4...f269ec230e2b


More information about the All-commits mailing list