-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AMDGPU] Don't DEALLOC_VGPRS from callable functions #72245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ | |
define amdgpu_ps void @global_atomic() { ret void } | ||
define amdgpu_ps void @image_atomic() { ret void } | ||
define amdgpu_ps void @global_store_optnone() noinline optnone { ret void } | ||
define amdgpu_gfx void @gfx_function() { ret void } | ||
define void @ccc_function() { ret void } | ||
... | ||
|
||
--- | ||
|
@@ -556,3 +558,25 @@ body: | | |
S_WAITCNT_VSCNT undef $sgpr_null, 0 | ||
S_ENDPGM 0 | ||
... | ||
|
||
--- | ||
name: gfx_function | ||
body: | | ||
bb.0: | ||
; CHECK-LABEL: name: gfx_function | ||
; CHECK-NOT: S_SENDMSG 3 | ||
; CHECK: S_ENDPGM 0 | ||
GLOBAL_STORE_DWORD undef renamable $vgpr0_vgpr1, killed renamable $vgpr1, 0, 4, implicit $exec | ||
S_ENDPGM 0 | ||
... | ||
|
||
--- | ||
name: ccc_function | ||
body: | | ||
bb.0: | ||
; CHECK-LABEL: name: ccc_function | ||
; CHECK-NOT: S_SENDMSG 3 | ||
; CHECK: S_ENDPGM 0 | ||
GLOBAL_STORE_DWORD undef renamable $vgpr0_vgpr1, killed renamable $vgpr1, 0, 4, implicit $exec | ||
S_ENDPGM 0 | ||
... | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tangentially related but do we avoid inserting waits before unreachable in noreturn functions? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think unreachable exists in MIR does it? I would expect to see an MBB ending with a tail call, and SIInsertWaitcnts certainly should not insert any waits after the tail call. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe you end up with an MBB ending in nothing, which may or may not also happen to be at the end of the function There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if we have any special handling for this. How much do we care about it? Are you concerned about the code size? I'm guessing if we reach an unreachable then waiting a little extra isn't the biggest problem... |
Uh oh!
There was an error while loading. Please reload this page.