[PATCH] D116890: [RISCV] Add initial support for getRegUsageForType and getNumberOfRegisters

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 10 19:45:15 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:292
+
+  unsigned FLen = ST->getFLen();
+  if (FLen && Ty->isFloatingPointTy())
----------------
kito-cheng wrote:
> craig.topper wrote:
> > Can we fall back to the default implementation for non-vector?
> Although I think the default one is not good, but we didn't find good way to testing those part yet, so OK to me.
It's calling getTypeLegalizationCost which should say how many pieces a GPR splits into. I'm not sure what the right answer for FP is because FP can't be split.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116890



More information about the llvm-commits mailing list