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

Demikhovsky, Elena elena.demikhovsky at intel.com
Tue Oct 16 00:38:37 PDT 2012


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.





More information about the llvm-commits mailing list