This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Don't flush vmcnt for loops with use/def pairs
ClosedPublic

Authored by kerbowa on May 22 2023, 10:50 AM.

Details

Summary

Conditions for hoisting vmcnt with flat instructions should be similar to VMEM.
If there are use/def pairs in a loop body we cannot guarantee that hosting the
waitcnt will be profitable. Better heuristics are needed to analyse whether
gains from avoiding waitcnt in loop bodys outweighs waiting for loads in the
preheader.

Diff Detail

Event Timeline

kerbowa created this revision.May 22 2023, 10:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 10:50 AM
kerbowa requested review of this revision.May 22 2023, 10:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 10:50 AM
foad added inline comments.May 22 2023, 1:30 PM
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
1707

Please make this a member function.

kerbowa updated this revision to Diff 525940.May 25 2023, 9:45 PM

Use member function.

foad accepted this revision.May 26 2023, 1:18 AM

LGTM

This revision is now accepted and ready to land.May 26 2023, 1:18 AM
This revision was landed with ongoing or failed builds.Jun 2 2023, 11:05 PM
This revision was automatically updated to reflect the committed changes.