[PATCH] D152421: [RISCV] Introduce the concept of DLEN(data path width) into getLMULCost.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 22:24:11 PDT 2023


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

SiFive's x280 CPU has a vector unit that VLEN/2 bits wide. This
means that LMUL=1 operations take 2 to process all VLEN bits.

This patch adds a DLenFactor tuning parameter and applies it to
TuneSiFive7. getLMULCost has been updated to use this factor in
its calculations. I've added an x280 command line to one cost
model test to demonstrate the effect.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152421

Files:
  llvm/lib/Target/RISCV/RISCVFeatures.td
  llvm/lib/Target/RISCV/RISCVSubtarget.h
  llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
  llvm/test/Analysis/CostModel/RISCV/arith-int.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152421.529504.patch
Type: text/x-patch
Size: 51664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230608/3600f8de/attachment-0001.bin>


More information about the llvm-commits mailing list