[LLVMdev] indirectbr/blockaddress question

Maurice Marks maurice.marks at gmail.com
Wed Dec 15 06:36:10 PST 2010


Thanks very to all of you much for your advice. I think I can use a switch
to do what I want, at least for now. I do like the idea of creating virtual
entry points to a function with a switch. That solves a problem for us.

thanks

On Sun, Dec 12, 2010 at 10:25 AM, Reid Kleckner <reid.kleckner at gmail.com>wrote:

> 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
>



-- 
Not sent from my Blackberry, Raspberry or Gooseberry!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101215/fde917b8/attachment.html>


More information about the llvm-dev mailing list