[LLVMdev] indirectbr/blockaddress question

Reid Kleckner reid.kleckner at gmail.com
Sun Dec 12 08:25:49 PST 2010


On Sat, Dec 11, 2010 at 4:19 PM, Maurice Marks <maurice.marks at gmail.com> wrote:
> In my llvm jit project I needed to lookup BB addresses at execution time and
> then jump to the corresponding BB. A C++ routine called at runtime from IR
> finds the right BB, gets its BlockAddress and returns it as an i8*. The IR
> does an indirectbr on this value...
> Well, not really. The routine returns the address of a BlockAddress node. Is
> there any way to get the real runtime code address for the indirect jump at
> runtime?

IIRC indirectbr isn't supported in the JIT:
http://llvm.org/bugs/show_bug.cgi?id=6744

Our first cut for implementing Python generators was to simply put a
switch in the entry block and number the re-entry points of the
generator.  On exit, we update the next entrance to use.

Reid



More information about the llvm-dev mailing list