3 Commits

Author SHA1 Message Date
Janek van Oirschot
e3515ba381 Reapply "[AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function arguments through the stack"
Reapplies 142c28ffa1323e9a8d53200a22c80d5d778e0d0f as part of D140242 which got reverted due to amdgpu openmp test failures.

This diff fixes said failures by eliding most of `adjustInliningThresholdUsingCallee` for indirect calls as the callee function is unavailable for indirect calls.

Reviewed By: arsenm, #amdgpu

Differential Revision: https://reviews.llvm.org/D143498
2023-02-13 12:17:43 +00:00
Janek van Oirschot
1beba44526 Revert "[AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function arguments through the stack"
This reverts commit 142c28ffa1323e9a8d53200a22c80d5d778e0d0f.
2023-02-03 19:13:57 +00:00
Janek van Oirschot
142c28ffa1 [AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function arguments through the stack
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.

Reviewed By: #amdgpu, arsenm

Differential Revision: https://reviews.llvm.org/D140242
2023-02-03 15:31:24 +00:00