-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AMDGPU] Combine or remove redundant waitcnts at the end of each MBB #87539
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 |
---|---|---|
|
@@ -131,8 +131,6 @@ define amdgpu_kernel void @is_private_sgpr(ptr %ptr) { | |
; GFX11-NEXT: global_store_b32 v[0:1], v0, off dlc | ||
; GFX11-NEXT: s_waitcnt_vscnt null, 0x0 | ||
; GFX11-NEXT: .LBB1_2: ; %bb1 | ||
; GFX11-NEXT: s_nop 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. Dont' understand this change, no waits changed? 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. SIInsertWaitcnts only inserts that s_nop/s_sendmsg sequence if it thinks that vscnt might be non-zero at the s_endpgm. I think what happened here is that the pass now takes notice of the "s_waitcnt_vscnt 0" at the end of the previous MBB. You're right that it didn't get changed, but the pass's bookkeeping got updated with the knowledge that vscnt must be zero after that. |
||
; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS) | ||
; GFX11-NEXT: s_endpgm | ||
%val = call i1 @llvm.amdgcn.is.private(ptr %ptr) | ||
br i1 %val, label %bb0, label %bb1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the variable "Wait" inside the if?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. It's used outside the if.