[LLVMdev] Possible bug in TCO?

Jeffrey Yasskin jyasskin at google.com
Sun Nov 29 09:03:33 PST 2009


On Sun, Nov 29, 2009 at 2:19 AM, Albert Graef <Dr.Graef at t-online.de> wrote:
> Jon Harrop wrote:
>> I've come up with the following minimal repro that segfaults on my machine:
>
> Jon, were you able to resolve this?
>
> FWIW, TOT is causing all kinds of weird segfaults related to tail calls
> in my Pure interpreter, too (at least on x86-64). In my case these seem
> to be limited to the JIT, however (batch-compiled Pure programs via
> opt+llc all work fine, even with TCO), so it's probably a different
> issue. When using JIT compilation, the Pure interpreter works fine with
> LLVM 2.3 thru 2.6, and also with early revisions of 2.7svn, but it fails
> most of my test suite with current TOT, even though the generated IR
> seems to be the same as before.
>
> Have there been any changes to the x86-64 backend of the JIT which might
> break tail call elimination? I didn't see any announcements about major
> changes in the JIT on the ml, so I have no idea what might be going
> wrong there.
>

Try batch compiling with the large code model. (llc -code-model=large)
If that also causes tail calls to break, then I did something wrong in
fixing far calls in the JIT.



More information about the llvm-dev mailing list