This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Disable forceful inline of non-kernel functions which use LDS.
AbandonedPublic

Authored by hsmhsm on Mar 18 2021, 6:51 AM.

Details

Summary

Since now, LDS uses within non-kernel functions are being handled in the
pass - LowerModuleLDS, we *NO* need to *forcefully* inline non-kernel
functions just because they use LDS. Do forceful inlining only when the
pass - LowerModuleLDS is not enabled. It is enabled by default.

Diff Detail

Event Timeline

hsmhsm created this revision.Mar 18 2021, 6:51 AM
hsmhsm requested review of this revision.Mar 18 2021, 6:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 6:51 AM
arsenm added inline comments.Mar 18 2021, 8:09 AM
llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
120

Having "Update" in a comment doesn't make sense. Just explain the current situation

hsmhsm updated this revision to Diff 331571.Mar 18 2021, 8:20 AM

Address the review comments by Matt.

hsmhsm marked an inline comment as done.Mar 18 2021, 8:20 AM

Looks good to me. This will presumably increase the uses of the lower module lds pass. Maybe prudent to run it through the gerrit CI infra before landing?

llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
196–199

Enable reads better than disable, thanks

hsmhsm marked an inline comment as done.Mar 18 2021, 9:42 AM
hsmhsm abandoned this revision.Mar 22 2021, 11:52 PM

The https://reviews.llvm.org/D91516 also includes changes in this current patch, hence this patch is no longer required. All the review discussions and comments can be taken care within https://reviews.llvm.org/D91516 itself.