This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] gfx940 MAI hazard recognizer
ClosedPublic

Authored by rampitec on Mar 22 2022, 3:15 PM.

Diff Detail

Event Timeline

rampitec created this revision.Mar 22 2022, 3:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2022, 3:15 PM
rampitec requested review of this revision.Mar 22 2022, 3:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2022, 3:15 PM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec updated this revision to Diff 417418.Mar 22 2022, 3:53 PM
Joe_Nash added inline comments.
llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
139

Is this equivalent to isMAI? If not, perhaps you could use a GenericTable to create a lookup if an instruction is relevant here, and mark the instructions in tablegen. It would be more maintainable.

rampitec added inline comments.Mar 23 2022, 8:27 AM
llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
139

It is not the same. It selects a subset from MAI. The problem with marking it in the td is that the same instructions are executed on different ALUs depending on the subtarget, so it is not just a single bit.

rampitec updated this revision to Diff 417693.Mar 23 2022, 11:02 AM
rampitec marked an inline comment as done.

Added GenericTable instead of opcode list as suggested by Joe.

Joe_Nash accepted this revision.Mar 23 2022, 11:32 AM

Added GenericTable instead of opcode list as suggested by Joe.

Thanks!
I can't verify the particular cycles in the hazards, but in principle looks good to me.

This revision is now accepted and ready to land.Mar 23 2022, 11:32 AM
This revision was landed with ongoing or failed builds.Mar 24 2022, 1:00 PM
This revision was automatically updated to reflect the committed changes.