[LLVMdev] jump table ?

Simon Burton simon at arrowtheory.com
Wed Jun 28 08:51:29 PDT 2006


Is it possible to take the address
of a basic block ?
I'd like to put a whole bunch of these
addresses into an array, and then select
one to branch to. Eg. like a switch statement.
(i'm thinking also of GCC's computed goto's)

I'm finding the code generated by an llvm switch
is a big bunch of compares and jump instructions,
which i'm not sure is the most efficent way of 
doing this.

GCC generates jump tables for big switches.

Simon.



More information about the llvm-dev mailing list