[llvm-commits] [PATCH] Reduce number of stubs used in 64bit code

Evan Phoenix evan at fallingsnow.net
Tue Sep 22 14:45:47 PDT 2009


On Sep 22, 2009, at 2:43 PM, Chris Lattner wrote:

>
> On Sep 22, 2009, at 2:36 PM, Evan Phoenix wrote:
>
>> Anyone have a comment on this? If not, it would be great to make it
>> into 2.6 if possible.
>
> I don't have an opinion, but it is too late for 2.6, sorry.
>

Darn, well, trunk is better than nothin'!

  - Evan

> -Chris
>
>>
>> Thanks!
>>
>> - Evan
>>
>> On Sep 1, 2009, at 2:34 PM, Evan Phoenix wrote:
>>
>>> Currently the JIT running on a x86_64 platform can only call an
>>> external function through a stub. This is because of a conservative
>>> decision about how the encoding of a pc-relative address would
>>> should up in the machine code stream. These stubs incur a penalty,
>>> so any stubs that can be eliminated should be.
>>>
>>> The attached patch allows the JITEmitter to override the CodeGen's
>>> decision to use a stub by validating if a stub is actually needed.
>>> Thus any calling functions who's pc-relative offset fits directly in
>>> a call instruction are used the same as they would on a 32bit
>>> platform.
>>>
>>> "Long" calls are still done via the stub mechanism.
>>>
>>> This only effects the calling of externally defined functions. It
>>> changes nothing with regard to lazy/future JIT'd LLVM functions.
>>>
>>> Thanks,
>>>
>>> - Evan Phoenix
>>>
>>>
>>> <llvm-64bit-
>>> stubs5.diff>_______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>




More information about the llvm-commits mailing list