[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
Tue Feb 7 07:52:52 PST 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:1178
 
+  // In case of indirect calls, callee Function may not be retrievable from the
+  // CallBase.
----------------
JanekvO wrote:
> arsenm wrote:
> > This also will fail for constexpr casts and aliases. You don’t need to give up on these cases. You should be going off the callee type you can get from the CallBase 
> I couldn't get `isArgPassedInSGPR` working with only the `CallBase`. Do indirect calls always pass args through VGPR?
The calling convention is always the same and can’t be different for direct or indirect calls. The ABI is fully determined by the call type, the calling convention and the attribute set. Is there just a missing attribute wrapper for inreg that checks callee and callsite attributes?


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