This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Don't wait for counters in chain function prologues
AbandonedPublic

Authored by rovka on Aug 23 2023, 5:29 AM.

Details

Reviewers
arsenm
Group Reviewers
Restricted Project
Summary

All counters (lgkmcnt, vmcnt, storecnt, etc.) are presumed in an unknown
state at function entry, so we needn't insert waits for them in the
prologue.

Diff Detail

Event Timeline

rovka created this revision.Aug 23 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 5:29 AM
rovka requested review of this revision.Aug 23 2023, 5:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 5:29 AM
rovka added a reviewer: Restricted Project.
arsenm accepted this revision.Aug 23 2023, 4:56 PM
This revision is now accepted and ready to land.Aug 23 2023, 4:56 PM

I don't quite understand the change, now that the counters are in unknown state, shouldn't we wait for their arrival so that we can access the registers for the arguments (which may be loaded from memory in the caller)? I think we definitely need these waits at the entry of cs_chain* function.

foad added a comment.Sep 21 2023, 10:00 AM

now that the counters are in unknown state, shouldn't we wait for their arrival so that we can access the registers for the arguments (which may be loaded from memory in the caller)?

Agreed. The patch description does not make sense to me.

rovka abandoned this revision.Sep 22 2023, 12:24 AM

Sorry, I think I misunderstood the docs.