This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Don't wait at end of block with a trivial successor
ClosedPublic

Authored by arsenm on Mar 6 2017, 9:04 AM.

Details

Reviewers
tstellar
Summary

If there is only one successor, and that successor only
has one predecessor the wait can obviously be delayed until
uses or the end of the next block. This avoids code quality
regressions when there are trivial fallthrough blocks inserted
for structurization.

Diff Detail

Event Timeline

arsenm created this revision.Mar 6 2017, 9:04 AM
tstellar accepted this revision.Mar 6 2017, 10:04 AM
This revision is now accepted and ready to land.Mar 6 2017, 10:04 AM
arsenm updated this revision to Diff 90725.Mar 6 2017, 11:29 AM

Make sure that it is the next block that will be visited

tstellar added inline comments.Mar 6 2017, 11:31 AM
lib/Target/AMDGPU/SIInsertWaits.cpp
537–538

MBB.isLayoutSuccessor() ?

arsenm updated this revision to Diff 90726.Mar 6 2017, 11:34 AM

Use isLayoutSuccessor

arsenm closed this revision.Mar 7 2017, 5:19 PM

r297251