[PATCH] D143498: Reapply "[AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function arguments through the stack"

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 06:27:46 PST 2023


arsenm 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:
----------------
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?


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