[PATCH] D126644: [llvm/CodeGen] Add ExpandLargeDivRem pass

Matthias Gehre via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 01:55:45 PDT 2022


mgehre-amd added a comment.

In D126644#3580139 <https://reviews.llvm.org/D126644#3580139>, @efriedma wrote:

> My primary concern here is that we're unconditionally iterating over every instruction in the module, even if the pass has nothing to do.  In the grand scheme of things, it isn't *that* expensive, but it's still not cheap, and we seem to have grown a number of passes doing similar walks.  Can we merge this with some other walk over the module?

Hey, thanks for taking the time to look into this PR.
I looked around the pipeline to find passes that look relevant. I saw a few that didn't work because they are only enabled above -O0.
Then I found others that in principle would work, but all of those are so focused (`createGCLoweringPass`, `createLowerConstantIntrinsicsPass`, `createExpandMemCmpPass`, `createPreISelIntrinsicLoweringPass`, ...) that it felt wrong
to dilute their focus by adding the div/rem transformation.
Under -O2, we currently run 454 passes in the middle end and the backend combined.

Do you have a concrete proposal how I could address your concern?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126644



More information about the llvm-commits mailing list