[llvm-commits] patch: no stubs (to lazy resolver) when jit lazy compilation is disabled

Nick Lewycky nicholas at mxc.ca
Sun Oct 11 14:57:39 PDT 2009

Nate Begeman wrote:
> On Oct 11, 2009, at 11:03 AM, Nick Lewycky wrote:
>> The JIT still produces lazy function resolver stubs even when lazy 
>> compilation is disabled. It then goes back through and rewrites these 
>> stubs before considering the compilation completed. This patch changes 
>> that behaviour to make it compile the function but never create the stub.
> Hi Nick,
> I don't understand how this actually works; you're returning an address 
> of 0 for the GV instead of a stub, but there's no process by which the 
> call to address zero is rewritten to the actual address after the 
> pending function is emitted.  Can you explain how this would work in 
> non-lazy jitting if function C called A and B which call each other?

It doesn't, but thanks for explaining what's wrong. I thought the code 
was already returning NULL in certain cases and just assumed it knew how 
to handle that. I've coded up your example as a unit test and it does 
indeed end up calling null.


More information about the llvm-commits mailing list