[PATCH] D37730: [PowerPC] eliminate unconditional branch to the next instruction
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 15:31:11 PDT 2017
hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.
In https://reviews.llvm.org/D37730#880248, @inouehrs wrote:
> In https://reviews.llvm.org/D37730#878470, @echristo wrote:
>
> > Seems like we might want to have block layout clean up this sort of branch rather than analyzeBranch since we could theoretically make the same change in every backend?
>
>
> I think this optimization should be machine dependent based on the following comment in MachineBlockPlacement.cpp. X86 backend already implements the same optimization.
>
> // Indeed, the target may be able to optimize the branches in a way we
> // cannot because all branches may not be analyzable.
> // E.g., the target may be able to remove an unconditional branch to
> // a fallthrough when it occurs after predicated terminators.
>
LGTM
https://reviews.llvm.org/D37730
More information about the llvm-commits
mailing list