[PATCH] D117884: [RISCV] Add cost modelling for masked memory op
Kito Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 23 22:35:19 PST 2022
kito-cheng added a comment.
LGTM but I would like to let @frasercrmck did final approve.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:173
+
+ std::pair<InstructionCost, MVT> LT = TLI->getTypeLegalizationCost(DL, Src);
+ return LT.first;
----------------
alextsao1999 wrote:
> alextsao1999 wrote:
> > kito-cheng wrote:
> > > That seems like not included the memory access cost? how about `return getMemoryOpCost (Opcode, Src, Alignment, AddressSpace, CostKind)` here?
> > Thanks, I fixed it
> I'm not very familiar with these. Besides the memory access cost, are there any costs to take into account?
That's pretty HW implementation dependent, so I guess this implementation is good enough for now, and let other RISC-V vendor to fill up their cost in future.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117884/new/
https://reviews.llvm.org/D117884
More information about the llvm-commits
mailing list