[llvm-commits] [PATCH][Review Request]Alternative Calling Convention

Demikhovsky, Elena elena.demikhovsky at intel.com
Thu Oct 18 00:48:00 PDT 2012


Hi all,

I'd like to commit the patch and I already have LGTM from Jacob except the name for the new calling conventions.
I can change it to "Intel_OCL_BI" - Intel OpenCL Built-ins , but it does not look good because everybody can use these conventions.
Does anyone have an opinion on this?

Thanks.

- Elena
-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Demikhovsky, Elena
Sent: Tuesday, October 16, 2012 09:39
To: Jakob Stoklund Olesen
Cc: Commit Messages and Patches for LLVM
Subject: Re: [llvm-commits] [PATCH][Review Request]Alternative Calling Convention

We are calling AVX function from AVX code and pass parameters in YMM. And SSE from SSE and pass parameters in XMM.
There are some differences from standard C conventions that described in LLVM today, but not cross architecture.
That's why we call it "Alternative SIMD".

- Elena

-----Original Message-----
From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk] 
Sent: Monday, October 15, 2012 19:01
To: Demikhovsky, Elena
Cc: Commit Messages and Patches for LLVM; Nadav Rotem
Subject: Re: [llvm-commits] [PATCH][Review Request]Alternative Calling Convention


On Oct 14, 2012, at 6:00 AM, "Demikhovsky, Elena" <elena.demikhovsky at intel.com> wrote:

> Hi Jacob,
> 
> Thank you for the review.
> 
> I removed CALL_ALT_SIMD, changed CalleeSavedRegs and added a test for prolog-epilog.
> I specified CSR_64_Alt_SIMD_AVX and CSR_64_Alt_SIMD separately, 
> otherwise, if I specify YMM only, I see correct code on AVX and the 
> both YMM and XMM spill/fill on SSE architecture.

Thanks, Elena.

The code looks good to me now.

Please use a different name for the calling convention, though. "Alt" is not very descriptive.

Since this calling convention causes subtle miscompilations when calling non-AVX code from AVX code, I think it would be a good idea to mention that in the comment.

/jakob

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-commits mailing list