[LLVMdev] Possible bug in TCO?

Dan Gohman gohman at apple.com
Mon Nov 30 13:21:52 PST 2009


On Nov 29, 2009, at 2:19 AM, Albert Graef wrote:

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

I haven't tested it, but the following pattern in X86Instr64bit.td
looks suspicious as it appears to attempt to support direct tailcalls
to arbitrary 64-bit immediates:

def : Pat<(X86tcret GR64:$dst, imm:$off),
          (TCRETURNri64 GR64:$dst, imm:$off)>;

Dan




More information about the llvm-dev mailing list