<br><br><div class="gmail_quote">On 3 February 2010 01:15, Garrison Venn <span dir="ltr"><<a href="mailto:gvenn.cfe.dev@gmail.com">gvenn.cfe.dev@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;">
Hi James,<br>
<br>
Just wanted to update you. As you implied the problem here is that<br>
the personality function has to be jitted before the code that contains<br>
the corresponding llvm.eh.selector intrinsic instruction is jitted. I verified<br>
this by creating a generated version of the personality function which unless<br>
I jitted first, gave me the same error when running the code. Since you are using<br>
tools versus the API, and therefore do not have direct control of JIT order, I<br>
was wondering if there is not another way to create this same outcome without<br>
having to resort to calling the personality function directly before referencing<br>
it in the llvm.eh.selector intrinsic (build order?). Anyway I know from your<br>
posts that you are way beyond this. Have you already solved this issue<br>
without a preliminary call?<br>
<br>
Garrison<br></blockquote><div><br>Hi Garrison,<br><br>No, I'm afraid I'm just marking the relevant functions in my runtime library as 'noinline' and then my runtime calls them on startup to ensure they're JIT'ed before any exceptions can be thrown.<br>
<br>I don't understand the internals of the LLVM JIT and DWARF exception handling well enough to known what the correct fix is but I'm concerned that what I'm doing is a band-aid only - I haven't seen this yet but I'm kind of expecting to encounter the recursive compilation issue again if some variable of the build and/or startup sequence causes other non-JIT'ed functions to be called during DWARF unwind process. This stuff is all a bit over my head though - last time I implemented exception handling I wrote my own stuff to avoid having to get to grips with DWARF + unwind...<br>
<br>Thanks again for your help and for the exception handling example by the way - it's been very useful.<br>-- James Williams<br></div><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"><br>
On Jan 25, 2010, at 8:09, James Williams wrote:<br>
<br>
> I think so. It also fails the same way on LLVM trunk from last week.<br>
> The full backtrace is below. It appears that frame #3 is a compilation<br>
> of __l_personality() and frame #14 is a compilation of f(). The<br>
> compilation of __l_personality appears to have been triggered by the<br>
> need to output DWARF information for f().<br>
><br>
> -- James<br>
><br>
><br>
</div>[snip]<br>
<div class="im">><br>
> On 22/01/2010, Garrison Venn <<a href="mailto:gvenn.cfe.dev@gmail.com">gvenn.cfe.dev@gmail.com</a>> wrote:<br>
>> Interesting. Was this the reason you were getting the recursive compilation<br>
>> error in JIT::runJITOnFunctionUnlocked(...) (isAlreadyCodeGenerating)?<br>
>> Do you have the time to try your test with 2.7?<br>
>><br>
>> Garrison<br>
>><br>
<br>
</div>[snip]<br>
</blockquote></div><br>