[llvm] [CodeGen][AArch64] Set min jump table entries to 13 for AArch64 targets (PR #71166)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 06:29:18 PST 2023


davemgreen wrote:

> How does this affect performance in cases where the last switch case is usually taken?

If I understand what you are saying, it should generate a tree of branches so the positions of the cases shouldn't matter a huge amount. It can depend on the differences between the cases and the branch targets though, they might not match.

Let us know if you have reason to think this would be worse in some way, it's not a very easy thing to measure accurately. A load from a constant pool into an indirect jump can be worse than a series of branches that can each be independently branch predicted.

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


More information about the llvm-commits mailing list