[PATCH] D89896: Add loop distribution to the LTO pipeline

Sanne Wouda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 10:12:31 PDT 2020


sanwou01 created this revision.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls, inglorion.
Herald added a project: LLVM.
sanwou01 requested review of this revision.

The LoopDistribute pass is missing from the LTO pipeline, so
-enable-loop-distribute has no effect during post-link. The pre-link
loop distribution doesn't seem to survive the LTO pipeline either.

With this patch (and -flto -mllvm -enable-loop-distribute) we see a 43%
uplift on SPEC 2006 hmmer for AArch64. The rest of SPECINT 2006 is
unaffected.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89896

Files:
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp


Index: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -1052,6 +1052,7 @@
   // Unroll small loops
   PM.add(createSimpleLoopUnrollPass(OptLevel, DisableUnrollLoops,
                                     ForgetAllSCEVInLoopUnroll));
+  PM.add(createLoopDistributePass());
   PM.add(createLoopVectorizePass(true, !LoopVectorize));
   // The vectorizer may have significantly shortened a loop body; unroll again.
   PM.add(createLoopUnrollPass(OptLevel, DisableUnrollLoops,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89896.299736.patch
Type: text/x-patch
Size: 643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201021/90d65de8/attachment.bin>


More information about the llvm-commits mailing list