[LLVMdev] Lowering switch statements with PGO
chandlerc at google.com
Mon Dec 15 18:40:35 PST 2014
On Mon, Dec 15, 2014 at 2:55 PM, Hans Wennborg <hans at chromium.org> wrote:
> I suspect that if the whole switch can be lowered to a jump table,
> that's the best lowering.
A well predicted branch can be better than even a well predicted indirect
branch in lots of cases. At the IR level it allows predicate based
simplification that may be harder. At the machine level, there are
different levels of prediction accuracy, and I think the branch is
essentially always likely to do better in terms of icache.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev