This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Refactor SOPC & SOPP .td for extension
ClosedPublic

Authored by Joe_Nash on Oct 19 2020, 2:07 PM.

Details

Summary

We use the Real vs Pseudo instruction abstraction for other
types of instructions to facilitate changes in opcode
between gpu generations.
This patch introduces that abstraction to SOPC and SOPP.

Diff Detail

Event Timeline

Joe_Nash created this revision.Oct 19 2020, 2:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2020, 2:07 PM
Joe_Nash requested review of this revision.Oct 19 2020, 2:07 PM

Are there hazards associated with SOP, where we have it lowered to real instructions?

Also please run PSDB for this change.

llvm/lib/Target/AMDGPU/SOPInstructions.td
954

Can you copy OtherPredicates too? We always missing it.

975–976

Please add a blank line.

1081

Also copy OtherPredicates.

Are there hazards associated with SOP, where we have it lowered to real instructions?

I'm not sure exactly what you mean, but there is a workaround for branch instructions, that operates on the real instructions. Original fix at https://github.com/llvm/llvm-project/commit/9ab812d4752b2a1442426db2ccc17dc95d12eb04

Also please run PSDB for this change.

Will do

Are there hazards associated with SOP, where we have it lowered to real instructions?

I'm not sure exactly what you mean, but there is a workaround for branch instructions, that operates on the real instructions. Original fix at https://github.com/llvm/llvm-project/commit/9ab812d4752b2a1442426db2ccc17dc95d12eb04

I mean is there anything needs to be accounted for in the GCNHazardRecognizer.cpp?

Joe_Nash updated this revision to Diff 299432.Oct 20 2020, 11:41 AM

add OtherPredicates and blank line for rampitec

Joe_Nash marked 3 inline comments as done.Oct 20 2020, 11:42 AM
rampitec added inline comments.Oct 20 2020, 11:56 AM
llvm/lib/Target/AMDGPU/SOPInstructions.td
1720

Remove this?

Joe_Nash updated this revision to Diff 299446.Oct 20 2020, 12:55 PM

remove accidental commented code

Joe_Nash marked an inline comment as done.Oct 20 2020, 12:55 PM
rampitec accepted this revision.Oct 20 2020, 12:56 PM

LGTM. PSDB run is still desirable.

This revision is now accepted and ready to land.Oct 20 2020, 12:56 PM
foad added a subscriber: foad.Oct 21 2020, 1:52 AM
This revision was automatically updated to reflect the committed changes.