[PATCH] D23269: AArch64: Move remaining target specific BranchRelaxation bits to TII

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 12:38:12 PDT 2016


arsenm added a comment.

In https://reviews.llvm.org/D23269#516875, @t.p.northover wrote:

> Sorry I dropped this last week. It doesn't seem unreasonable to add KnownOffset arguments to InsertBranch's interface, and the return value really doesn't seem like a blocker to using InsertBranch.
>
> In fact, I've just noticed that ReverseBranchCondition already exists. So I think all that'd be needed is the getUnconditionalCondition.
>
> Would you like me to put together an alternative patch, and we can see if it'll fit your needs too?


I think it might be just a question of naming. I think it would make sense to use InsertBranch when expanding unconditional branches. The main use for insertUnconditionalBranch (at least for my purposes) is insertIndirectBranch. I can switch the branch insertion for expanding conditional branches to use the regular InsertBranch, and rename it for expanding unconditionals.


https://reviews.llvm.org/D23269





More information about the llvm-commits mailing list