[PATCH] D127831: BasicBlockUtils: Add a new way for CreateControlFlowHub()
Ruiling, Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 19:56:19 PDT 2022
ruiling added a comment.
In D127831#3887582 <https://reviews.llvm.org/D127831#3887582>, @foad wrote:
> Why do we still need the "old way"? Does the "new way" generate worse code in some cases?
The "old way" uses one boolean value to record whether an outgoing block would be taken, we need `N` boolean values when we have `N` outgoing blocks. But the "new way" just needs one 32bits variable to record the outgoing target, meanwhile it needs some additional compare instructions to generate the block prediction. So, this is a tradeoff between the register usage and number of instructions.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127831/new/
https://reviews.llvm.org/D127831
More information about the llvm-commits
mailing list