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

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 12 10:21:29 PDT 2023


reames added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVFeatures.td:798
 
+def TuneDLenFactor2
+   : SubtargetFeature<"dlen-factor-2", "DLenFactor2", "true",
----------------
craig.topper wrote:
> reames wrote:
> > Can you add a comment here which defines DLEN?  
> > 
> > As an organizing principle, I was a bit surprised by the factor description.  I was expecting something more along the lines of VLEN (zvlNb) where we have specific sizes and then computed the factor from VLEN/DLEN if needed.  Not objecting, just commenting.
> Having it as a factor removes the possibility of DLEN > VLEN. It also avoids having one number come from march and one from mtune.
> 
> SiFive has 2 CPUs, x280 and p270l, base on the same microarchitecture with different VLEN and DLEN but the factor is 2 for both.
Both pieces make sense, the existence of the sole additional vector cpu with the same property was the context I was missing.

If you want to simply update the comments, I'm fine with the structure given the additional info.  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152421



More information about the llvm-commits mailing list