[LLVMdev] JIT stubs for functions with external linkage

Chris Lattner sabre at nondot.org
Fri Dec 3 13:42:15 PST 2004


On Fri, 3 Dec 2004, Morten Ofstad wrote:

> Before I go ahead and remove the generation of stubs for external
> functions, is there any good reason why they get generated?

It depends on the target.  On PPC, for example, calls have limited
displacement.  By using stubs, we can ensure it's possible to reach the
external function.

They should not be generated on X86.

> I can understand that the JIT wants to make stubs for the functions it
> compiles itself - it enables selective recompilation and replacement -

And lazy compilation.

> but functions which are defined in a library (or in my case by the
> application using the JIT) can't be changed anyway. For me the extra jmp
> instruction for each call is significant, so I want to remove it...

Sounds good.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list