This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix debug info handling in post-RA bundler
ClosedPublic

Authored by arsenm on Feb 15 2021, 6:03 AM.

Details

Summary

This was allowing debug instructions to break the bundling, which
would change scheduling behavior. Bundle debug info / kills inside
the bundle. This seems to work OK, although the asm printer doesn't
understand these in a bundle. This implicitly expects the memory
legalizer to unbundle. It would probably be slightly nicer to move
these after.

Rewrite the loop to be clearer and make sure we don't end a bundle on
a meta instruction, only allow them in between other valid bundle
instructions.

Diff Detail

Event Timeline

arsenm created this revision.Feb 15 2021, 6:03 AM
arsenm requested review of this revision.Feb 15 2021, 6:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 15 2021, 6:03 AM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec added inline comments.Feb 15 2021, 10:54 AM
llvm/lib/Target/AMDGPU/SIPostRABundler.cpp
136

Can you make it a single

else if (!I->isMetaInstruction())
  break;

?

arsenm updated this revision to Diff 323828.Feb 15 2021, 1:27 PM

Reformat

rampitec accepted this revision.Feb 15 2021, 1:28 PM
This revision is now accepted and ready to land.Feb 15 2021, 1:28 PM