Page MenuHomePhabricator

[AMDGPU] Merge SIRemoveShortExecBranches into SIPreEmitPeephole
ClosedPublic

Authored by critson on Mar 18 2021, 8:25 PM.

Details

Summary

SIRemoveShortExecBranches is an optimisation so fits well in the
context of SIPreEmitPeephole.

Test changes relate to early termination from kills which have now
been lowered prior to considering branches for removal.
As these use s_cbranch the execz skips are now retained instead.
Currently either behaviour is valid as kill with EXEC=0 is a nop;
however, if early termination is used differently in future then
the new behaviour is the correct one.

Diff Detail

Event Timeline

critson created this revision.Mar 18 2021, 8:25 PM
critson requested review of this revision.Mar 18 2021, 8:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 8:25 PM
foad accepted this revision.Mar 19 2021, 2:08 AM

I thought it was a bit odd to optimize branches in a "peephole" pass. But given that we already handle vccz branches, handling execz branches here too seems like a good fit.

This revision is now accepted and ready to land.Mar 19 2021, 2:08 AM
This revision was landed with ongoing or failed builds.Mar 19 2021, 7:27 PM
This revision was automatically updated to reflect the committed changes.