[PATCH] D149889: [TTI] Use users of GEP to guess access type in getGEPCost
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 07:26:40 PDT 2023
ABataev added inline comments.
================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:1057
+
+ return IsFoldable ? TTI::TCC_Free : TTI::TCC_Basic;
}
----------------
luke wrote:
> ABataev wrote:
> > Same question, cost of int add instead of basic?
> I agree we should use getArithmeticInstrCost here, but I have some ideas about adding a new target hook to control this and was wondering if I could defer it to that patch?
> On RISC-V if `Scale != 1` then we will need an extra `mul` instruction, as opposed to aarch64 which can perform both an add and multiply in one. I think this would make sense to expose the address calculation cost as a hook since it's target dependent, and we already have all the information available here to pass onto TTI.
>
Add FIXME/TODOs here then
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149889/new/
https://reviews.llvm.org/D149889
More information about the llvm-commits
mailing list