[PATCH] D152750: [RISCV] Enable SLP by default (when vectors are available)

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 13:45:33 PDT 2023


reames created this revision.
reames added reviewers: craig.topper, luke, ABataev, kito-cheng, frasercrmck.
Herald added subscribers: jobnoorman, vporpo, VincentWu, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, bollu, simoncook, johnrusso, rbar, asb, hiraditya, arichardson, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

I propose that we go ahead and enabled SLP by default.  Over the last few weeks, @luke and I have been working through codegen issues seen at small VLs from a couple of SPEC workloads.  We still have a ways to go to get optimal codegen, but we're at the point where having a single configuration we're all tuning against is probably the right default.

As a bit of history, I introduced this TTI hook back in a310637132 <https://reviews.llvm.org/rGa310637132e16ecb081528496b81ddfdcf3c6d7c> back in August of last year to unblock enabling LoopVectorizer.  At the time, we had a couple known issues: constant materialization, address generation, and a general lack of maturity of small fixed vector codegen.  By now, each of these has had significant investment.  I can't say any of them are completely fixed, but we're no longer seeing instances of them every place we look.

What we're mostly seeing at this point is a long tail of code gen opportunities, many involving build vectors, shuffles, and extract patterns.  I have a couple patches up to continue iterating on those issues, but I don't think they need to be blockers for enabling SLP.  The only debateable one is D152001 <https://reviews.llvm.org/D152001> , and I'm prepared to leave it up to which gets approved first.  :)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152750

Files:
  llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
  llvm/test/Transforms/SLPVectorizer/RISCV/floating-point.ll
  llvm/test/Transforms/SLPVectorizer/RISCV/load-binop-store.ll
  llvm/test/Transforms/SLPVectorizer/RISCV/load-store.ll
  llvm/test/Transforms/SLPVectorizer/RISCV/math-function.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152750.530657.patch
Type: text/x-patch
Size: 44850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230612/39865dc7/attachment.bin>


More information about the llvm-commits mailing list