[PATCH] Add two new calling conventions for runtime calls

Juergen Ributzka juergen at apple.com
Thu Jan 16 11:23:13 PST 2014


Hi Philip,

thanks for looking at this. I am definitely open for better names for the calling conventions. Although I would prefer not to use GPR or XMM in them, because they are not only meant for X86. Also on a different architecture with different standard calling conventions a different mix of registers might make more sense. ObjC is currently the initial use for this, but we don’t want to limit it to just this one particular runtime. The more people can use this the better.

What about CPreservesMost and CPreservesAll?

How different is your special calling convention?

Thanks

Cheers,
Juergen

 
On Jan 16, 2014, at 10:45 AM, Philip Reames <listmail at philipreames.com> wrote:

> On 1/16/14 10:39 AM, Philip Reames wrote:
>> My only objection to this patch is the naming.  We also have runtime calls with special calling conventions, but ours aren't the same as the ones specified here. Could we rename these?
>> 
>> A few random ideas for names:
>> CPreserveGPR
>> CPreserveGPRXMM
>> WebKitRuntimeCC
> Correction: ObjCRuntime.  It helps if I read the original email more closely.
>> 
>> Also, should these be prefixed with X86_?
>> 
>> Philip
>> 
>> On 1/15/14 10:41 AM, Lang Hames wrote:
>>> Hi Juergen,
>>> 
>>> If these calling conventions are intended to be generic, should a
>>> description be added to the LangRef?
>>> 
>>> Otherwise LGTM.
>>> 
>>> - Lang.
>>> 
>>> On Tue, Jan 14, 2014 at 3:11 PM, Juergen Ributzka <juergen at apple.com> wrote:
>>>> ping
>>>> 
>>>> On Jan 10, 2014, at 7:45 PM, Juergen Ributzka <juergen at apple.com> wrote:
>>>> 
>>>>> New rebased patch and a small fix to the label check in the unit test.
>>>>> 
>>>>> Cheers,
>>>>> Juergen
>>>>> 
>>>>> <0002-Add-two-new-calling-conventions-for-runtime-calls.patch>
>>>>> On Jan 10, 2014, at 3:47 PM, Juergen Ributzka <juergen at apple.com> wrote:
>>>>> 
>>>>>> Hi @ll,
>>>>>> 
>>>>>> this patch adds two new target-independent calling conventions for runtime calls - Runtime and FastRuntime.
>>>>>> 
>>>>>> The target-specific implementation for X86-64 is defined as following:
>>>>>>      - Arguments are passed as for the default C calling convention
>>>>>>      - The same applies for the return value(s)
>>>>>>      - for runtimecc the callee preserves all GPRs - except R11
>>>>>>      - for fastruntimecc the callee preserves all GPRs and all XMMs - except R11
>>>>>> 
>>>>>> The idea is to provide calling conventions for calls to very hot runtime functions that are normally just a few lines of assembly code and don’t require a lot of registers. This could be used by the ObjectiveC runtime, or any other runtime that provides performance critical functions.
>>>>>> 
>>>>>> The FastRuntime CC is intended to be used for small codes that don’t call any other functions at all.
>>>>>> The Runtime CC is also intended for small codes that usually don’t call other functions on the fast path, but might have to on the slow path.
>>>>>> 
>>>>>> Cheers,
>>>>>> Juergen
>>>>>> 
>>>>>> <0001-Add-two-new-calling-conventions-for-runtime-calls.patch>
>>>>>> 
>>>>>> _______________________________________________
>>>>>> 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
>>> _______________________________________________
>>> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140116/770e829f/attachment.html>


More information about the llvm-commits mailing list