[PATCH] D91800: [PassManager] Run nduction Variable Simplification pass *after* Recognize loop idioms pass, not before

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 08:48:33 PST 2020


lebedev.ri created this revision.
lebedev.ri added reviewers: mkazantsev, fhahn.
lebedev.ri added a project: LLVM.
Herald added subscribers: wenlei, nikic, steven_wu, hiraditya.
lebedev.ri requested review of this revision.

Currently, `-indvars` runs first, and then immediately after `-loop-idiom` does.
I'm not really sure if `-loop-idiom` requires `-indvars` to run beforehand,
but i'm *very* sure that `-indvars` requires `-indvars` to run afterwards,
as it can be seen in the phase-ordering test.

While this is quite likely beneficial in-the-wild already,
it's a required part for the full motivational pattern
behind `left-shift-until-bittest` loop idiom (D91038 <https://reviews.llvm.org/D91038>).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91800

Files:
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-thinlto-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
  llvm/test/Other/opt-O2-pipeline.ll
  llvm/test/Other/opt-O3-pipeline-enable-matrix.ll
  llvm/test/Other/opt-O3-pipeline.ll
  llvm/test/Other/opt-Os-pipeline.ll
  llvm/test/Transforms/PhaseOrdering/X86/loop-idiom-vs-indvars.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91800.306426.patch
Type: text/x-patch
Size: 13853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201119/9bcae760/attachment.bin>


More information about the llvm-commits mailing list