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.<br>
<br>thanks<br><br><div class="gmail_quote">On Sun, Dec 12, 2010 at 10:25 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:reid.kleckner@gmail.com">reid.kleckner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Sat, Dec 11, 2010 at 4:19 PM, Maurice Marks <<a href="mailto:maurice.marks@gmail.com">maurice.marks@gmail.com</a>> wrote:<br>
</div><div><div></div><div class="h5">> In my llvm jit project I needed to lookup BB addresses at execution time and<br>
> then jump to the corresponding BB. A C++ routine called at runtime from IR<br>
> finds the right BB, gets its BlockAddress and returns it as an i8*. The IR<br>
> does an indirectbr on this value...<br>
> Well, not really. The routine returns the address of a BlockAddress node. Is<br>
> there any way to get the real runtime code address for the indirect jump at<br>
> runtime?<br>
<br>
</div></div>IIRC indirectbr isn't supported in the JIT:<br>
<a href="http://llvm.org/bugs/show_bug.cgi?id=6744" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=6744</a><br>
<br>
Our first cut for implementing Python generators was to simply put a<br>
switch in the entry block and number the re-entry points of the<br>
generator.  On exit, we update the next entrance to use.<br>
<font color="#888888"><br>
Reid<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Not sent from my Blackberry, Raspberry or Gooseberry!<br>