[PATCH] D116890: [RISCV] Add initial support for getRegUsageForType and getNumberOfRegisters
Kito Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 10 19:52:59 PST 2022
kito-cheng added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:292
+
+ unsigned FLen = ST->getFLen();
+ if (FLen && Ty->isFloatingPointTy())
----------------
craig.topper wrote:
> 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.
Oh, I got that, I thought the default one is this, which is always return 1:
https://llvm.org/doxygen/TargetTransformInfoImpl_8h_source.html#l00305
But it should be this one:
https://llvm.org/doxygen/BasicTTIImpl_8h_source.html#l00365
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