[llvm] [TailDuplicator] Only duplicate the blocks containing computed gotos (PR #114990)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 13:57:07 PST 2024


efriedma-quic wrote:

> I think the current IR is already as you want: https://llvm.godbolt.org/z/o5YT191P9.
> There’s only a single merged indirectbr here.

Currently, taildup means we end up with O(N^2) edges, even in the indirectbr case.  This patch is just deciding that we're willing to pay that cost in the indirectbr case, because it's a strong hint that that the code is important for performance.  The question is, can we rework the backend representation to allow taildup without the explosion in the number of edges?

https://github.com/llvm/llvm-project/pull/114990


More information about the llvm-commits mailing list