[PATCH] D129205: [BasicBlockUtils] Allow splitting predecessors with callbr terminators
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 7 06:42:00 PDT 2022
jyknight added a comment.
In D129205#3633528 <https://reviews.llvm.org/D129205#3633528>, @efriedma wrote:
> If we don't support using arbitrary blockaddresses as destinations, can we stop using blockaddress to represent the destinations? The presence of blockaddress blocks optimizations even if we aren't imposing the full control flow restrictions.
Just to be clear: the original intent of the LLVM IR design here was that it would be valid to store a blockaddress into some memory, and then call that stored address inside a callbr asm. Thus the callbr asm might or might not even have _any_ blockaddress inputs itself -- that a blockaddress was an argument to the callbr had no special significance vs the blockaddress anywhere else. All possible destinations the callbr could jump to must be listed as indirect labels, however.
I do think that was a reasonable design choice to make, but we've already moved halfway away from it in a sort of ad-hoc fashion...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129205/new/
https://reviews.llvm.org/D129205
More information about the llvm-commits
mailing list