[PATCH] D61726: [Pass Pipeline] Run another round of reassociation after loop pipeline

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 05:40:24 PDT 2019


nemanjai created this revision.
nemanjai added reviewers: chandlerc, majnemer, spatel, echristo.
Herald added subscribers: jsji, dexonsmith, steven_wu, dmgreen, zzheng, eraman, nhaehnle, jvesely, mehdi_amini.
Herald added a project: LLVM.
nemanjai added a reviewer: tstellar.

Unrolling can create code that looks a little silly and InstCombine doesn't clean it up. The test case added in this patch ends up with a series of adds in the loop body rather than a shift and add. Reassociation cleans that type of code up, but we don't run it after unrolling.
This patch just adds another round of reassociation after loop unrolling (similarly to what we do with InstCombine).

Performance measurements on PPC show some improvements on a few benchmarks and no noticeable degradations.


Repository:
  rL LLVM

https://reviews.llvm.org/D61726

Files:
  lib/Passes/PassBuilder.cpp
  lib/Transforms/IPO/PassManagerBuilder.cpp
  test/CodeGen/AMDGPU/simplify-libcalls.ll
  test/Other/new-pm-defaults.ll
  test/Other/new-pm-thinlto-defaults.ll
  test/Other/opt-O2-pipeline.ll
  test/Other/opt-O3-pipeline.ll
  test/Other/opt-Os-pipeline.ll
  test/Transforms/LoopVectorize/X86/masked_load_store.ll
  test/Transforms/Reassociate/reassociate-after-unroll.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61726.198800.patch
Type: text/x-patch
Size: 59829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190509/9e01390c/attachment.bin>


More information about the llvm-commits mailing list