[PATCH] D124251: [SimpleLoopUnswitch] Run LICM for nested unswitching tests.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 05:07:01 PDT 2022


fhahn created this revision.
fhahn added reviewers: asbirlea, nikic, aeubanks, aqjune.
Herald added a project: All.
fhahn requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124251

Files:
  llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll
  llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll
  llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124251.424444.patch
Type: text/x-patch
Size: 8546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220422/f54caa6d/attachment.bin>


More information about the llvm-commits mailing list