[PATCH] D143498: Reapply "[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
Thu Feb 9 08:14:04 PST 2023
JanekvO added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:2488-2489
// Everything else is in VGPRs.
- return F->getAttributes().hasParamAttr(A->getArgNo(), Attribute::InReg) ||
- F->getAttributes().hasParamAttr(A->getArgNo(), Attribute::ByVal);
+ return Attrs.hasParamAttr(ArgNo, Attribute::InReg) ||
+ Attrs.hasParamAttr(ArgNo, Attribute::ByVal);
default:
----------------
arsenm wrote:
> JanekvO wrote:
> > arsenm wrote:
> > > You should go through CallBase::paramHasAttr rather than directly inspecting the AttributeList
> > I tried to retain existing API for `isArgPassedInSGPR(const Argument *A)` which doesn't have access to any `CallBase`. I think I could force something with `function_ref` but not sure if that's the way to go.
> Do we really need to retain the Argument version?
Looking into it, there seems to be a only 2 uses of `isArgPassedInSGPR(const Argument *A)`, however, I couldn't find a way to rewrite them to use a more `CallBase` friendly API.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143498/new/
https://reviews.llvm.org/D143498
More information about the llvm-commits
mailing list