[PATCH] D96780: [NPM][LTO] Update buildLTODefaultPipeline to be more in-line with the old pass manager

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 10:44:32 PST 2021


dmgreen added a comment.

In D96780#2565858 <https://reviews.llvm.org/D96780#2565858>, @fhahn wrote:

> Thanks for putting up the patch! I am a bit surprised that all those optimizations were not run during LTO and that this did not pop up before the switch.

We didn't see any change in SPEC, surprisingly. I think it's much more important for certain code than others. We have some DPS routines where with LTO the loop range can be constant-propagated, allowing the whole loop to potentially be unrolled and greatly simplified. The largest increase I saw from this patch was a 1350% speed increase, with others in the 100-500% range.  This didn't get us exactly back to the old pass manager though, which is probably expected and what remained was some positives, some negatives.



================
Comment at: llvm/lib/Passes/PassBuilder.cpp:1740
   // Nuke dead stores.
   MainFPM.addPass(DSEPass());
+  // FIXME: once we provide support for enabling MLSM, add it here.
----------------
fhahn wrote:
> It looks like there are a few other passes missing here, like `LoopDeletion` and `MergedLoadStoreMotionPass`, and conditionally `LoopInterchange`/`ConstraintElimination`. Should they be added as well? 
I was trying to keep this simple, to fix the regressions sooner rather than later. I'll see what I can do to add a few others.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96780/new/

https://reviews.llvm.org/D96780



More information about the llvm-commits mailing list