[PATCH] D80236: [VectorCombine] position pass after SLP in the optimization pipeline rather than before

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 11:44:28 PDT 2020


dmgreen added a comment.

In D80236#2052034 <https://reviews.llvm.org/D80236#2052034>, @spatel wrote:

> I added the EarlyCSE cleanup as part of D75145 <https://reviews.llvm.org/D75145>. And it was noted there as causing perf regressions for ARM code (cc @dmgreen), so it was not ideal from the start.


Yeah, We did see some performance changes from this patch, and will do from 57bb4787d72f <https://reviews.llvm.org/rG57bb4787d72f1ae64f877b05c98d506602ac5958> again I think. They were much larger for when we were running under lto than without. We are currently in the process of moving those benchmarks over to not run under lto, so I happened to have both. Without LTO the changes were all just +-2%, so not anything to worry about. It suggests something funny might be going on with LTO where we run the entire pass pipeline twice.

It feels quite common in the pass pipeline to want to write:

  MPM.add(createLowerMatrixIntrinsicsPass());
  MPM.add(createEarlyCSEPass(false)); // cleanup

(That's just an example I noticed. I've wanted similar things for loop unrolling in the past.) It's a shame to run the cleanup passes on all the code you compile, just because one fairly rare thing needed it. Perhaps it would make sense to make some of these things utilities as opposed to running them as passes, in order to target them at the code we know has changed and would benefit from it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80236





More information about the llvm-commits mailing list