[llvm] [TailDuplicator] Only duplicate the blocks containing computed gotos (PR #114990)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 17:51:31 PST 2024
DianQK wrote:
> > can we simplify the CFG while still keeping the benefit of taildup? Maybe introduce a fake BB into the CFG or something.
>
> The idea sounds good. Maybe outlined as
>
> ```
> bb.0:
> succ: bb.0, bb.1, bb.2
> indirectbr %0
> bb.1:
> succ: bb.0, bb.1, bb.2
> indirectbr %1
> bb.2:
> succ: bb.0, bb.1, bb.2
> indirectbr %2
> ```
>
> =>
>
> ```
> bb.0:
> succ: bb.3
> indirectbr %0
> bb.1:
> succ: bb.3
> indirectbr %1
> bb.2:
> succ: bb.3
> indirectbr %2
> bb.3:
> succ: bb.0, bb.1, bb.2
> %3 = phi(%0, %1, %2)
> PSEUDO_INDIRECT_BR %3
> ```
I don't fully understand the details of this improvement yet, but it shouldn't block this PR.
So.. ping
https://github.com/llvm/llvm-project/pull/114990
More information about the llvm-commits
mailing list