[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
Fri Dec 16 12:10:19 PST 2022


JanekvO created this revision.
Herald added subscribers: kosarev, foad, ChuanqiXu, kerbowa, haicheng, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
JanekvO requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

A regression from when new PM got enabled as default. Functions with a big number of instructions will elide getting inlined but do not consider the cost of passing arguments over stack if there are a lot of function arguments. This patch attempts to add a heuristic for AMDGPU's function calling convention that also considers function arguments passed through the stack.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140242

Files:
  llvm/lib/Analysis/InlineCost.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  llvm/test/Transforms/Inline/AMDGPU/amdgpu-inline-stack-argument.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140242.483632.patch
Type: text/x-patch
Size: 94347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221216/e35f70a0/attachment-0001.bin>


More information about the llvm-commits mailing list