This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Avoid inserting noops during scheduling
ClosedPublic

Authored by kerbowa on Oct 19 2020, 5:14 PM.

Details

Summary

Passes that are run after the post-RA scheduler may insert instructions like
waitcnt which eliminate the need for certain noops. After this patch the
scheduler is still aware of possible latency from hazards but noops will
not be inserted until the dedicated hazard recognizer pass is run.

Depends on D89753.

Diff Detail

Event Timeline

kerbowa created this revision.Oct 19 2020, 5:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2020, 5:14 PM
kerbowa requested review of this revision.Oct 19 2020, 5:14 PM
foad accepted this revision.Oct 20 2020, 2:04 AM

Looks good to me.

llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
605–633

Shouldn't this be part of the previous patch?

This revision is now accepted and ready to land.Oct 20 2020, 2:04 AM
kerbowa added inline comments.Oct 20 2020, 10:01 AM
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
605–633

The scheduler still emits noops one at a time. So we cannot remove this in the earlier patch.

foad added inline comments.Oct 20 2020, 10:50 AM
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
605–633

Fair enough.

This revision was landed with ongoing or failed builds.Oct 20 2020, 5:12 PM
This revision was automatically updated to reflect the committed changes.
llvm/test/CodeGen/AMDGPU/memory_clause.ll