[PATCH] D140242: [AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function arguments through the stack
Janek van Oirschot via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 07:35:55 PST 2023
JanekvO added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:1193-1194
+ for (const Argument &A : Callee->args()) {
+ MVT ArgType = MVT::getVT(A.getType());
+ if (A.getType()->isPointerTy()) {
+ ArgType =
----------------
arsenm wrote:
> JanekvO wrote:
> > arsenm wrote:
> > > Can you just go through EVT? This is going to not work for vectors of pointers. You shouldn't have to consider any of these details
> > > This is going to not work for vectors of pointers.
> > Sorry, is there a way to get vector of pointers working with EVT that I'm missing?
> You should be performing no logic on the type. You should pass the raw type to getEVT (i.e. remove the isPointerTy check, that doesn't cover vectors of pointers)
Ah, the reason I put some type logic here is because `getNumRegistersForCallingConv` calls `EVT::getSizeInBits` which is target dependent and will hit an unreachable error (`EVT::getEVT` also doesn't allow vector of pointers).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140242/new/
https://reviews.llvm.org/D140242
More information about the llvm-commits
mailing list