[llvm] [TailDuplicator] Add a limit on the number of indirect branch successors (PR #78582)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 16:29:57 PST 2024


efriedma-quic wrote:

The general pattern that's supposed to be targeted by TailDupIndirectBranchSize is something like an interpreter loop.  The program executes one interpreter opcode, then jumps to the next opcode.  Interpreters tend to have sequences of opcodes where, given an opcode, the next opcode is somewhat predictable.  If we merge all the indirect branches of every opcode together, the indirect branch predictor loses the information about the previous opcode.  So we want to be a bit more generous in this case.  At least, that was the goal when this heuristic was originally added back in 2009.  Indirect branch predictors today are probably smarter.

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


More information about the llvm-commits mailing list