[all-commits] [llvm/llvm-project] 2fee8d: [SimpleLoopUnswitch] Run LICM for nested unswitchi...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Apr 25 04:49:38 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2fee8dd621bb11204451371f7ecbe40bfc71b282
      https://github.com/llvm/llvm-project/commit/2fee8dd621bb11204451371f7ecbe40bfc71b282
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-04-25 (Mon, 25 Apr 2022)

  Changed paths:
    M llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll
    M llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll
    M llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll

  Log Message:
  -----------
  [SimpleLoopUnswitch] Run LICM for nested unswitching tests.

When enabling freeze-loop-unswitch-cond the inserted freeze instruction
may block unswitching of parent loops if they get inserted in a block in
the parent loop (as the llvm::Loop-based invariance check only checks
 whether an instruction is in a loop block or not).

In the optimization pipeline, LICM is responsible to hoist out loop
invariant instructions to enable further unswitching. Also run LICM for
nested unswitching tests in preparation for flipping the default of
freeze-loop-unswitch-cond.

Reviewed By: nikic

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




More information about the All-commits mailing list