This is an archive of the discontinued LLVM Phabricator instance.

BranchRelaxation: Expand unconditional branches first
ClosedPublic

Authored by arsenm on Oct 12 2016, 4:41 AM.

Details

Reviewers
tstellarAMD
Summary

It's likely if a conditional branch needs to be expanded, the following
unconditional branch will also need expansion. By expanding the
unconditional branch first, the conditional branch can be simply
inverted to jump over the inserted indirect branch block. If the
conditional branch is expanded first, it results in an additional
branch.

This avoids test regressions in future commits.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 74361.Oct 12 2016, 4:41 AM
arsenm retitled this revision from to BranchRelaxation: Expand unconditional branches first.
arsenm updated this object.
arsenm added a subscriber: llvm-commits.
This revision is now accepted and ready to land.Nov 1 2016, 11:23 AM
arsenm closed this revision.Nov 1 2016, 11:43 AM

r285722