[LLVMdev] Switch instruction lowering
hans at chromium.org
Tue Oct 28 17:52:38 PDT 2014
On Mon, Oct 27, 2014 at 2:54 AM, Paweł Bylica <chfast at gmail.com> wrote:
> I'm interested in any information about implementations of switch
> instruction and its runtime cost. If it's very target dependent, I'm mostly
> care about X86. Pointing some LLVM code is also good.
I don't think there's any documentation besides the comments in the
code, but switch lowering (to binary tree or jump table, etc.) happens
For switches which are used to select from a set of constant values,
SimplifyCFG will attempt to build a lookup table.
More information about the llvm-dev