search for: __regcall

Displaying 10 results from an estimated 10 matches for "__regcall".

2019 Jun 10
2
[RFC] Expose user provided vector function for auto-vectorization.
...ectorizer should care about? For the case mentioned earlier: float MyAdd(float* a, int b) { return *a + b; } __declspec(vector_variant(implements(MyAdd(float *a, int b)), linear(a), vectorlength(8), nomask, processor(core_2nd_gen_avx))) __m256 __regcall MyAddVec(float* v_a, __m128i v_b1, __m128i v_b2) If FE emitted ;; Alwaysinline define <8 x float> @MyAddVec.abi_wrapper(float* %v_a, <8 x i32> %v_b) { ;; Not sure about the exact values in the mask parameter. %v_b1 = shufflevector <8 x i32> %v_b, <8 x i32> undef, <4...
2016 Sep 22
2
RFC: Adding Register Calling Convention Support
...ll, The Register Calling Convention (RegCall) was introduced by Intel to optimize parameter transfer on function call. This calling convention ensures that as many values as possible are passed or returned in registers. To use RegCall, place the keyword before a function declaration. For example: __regcall int foo (int i, int j); // Windows OS __attribute__((regcall)) foo (int I, int j); // Linux OS and Mac OS X) The calling convention is described in more details here: https://software.intel.com/en-us/node/693069 We are adding support for RegCall calling convention for Clang and LLVM IR. The first...
2017 Jan 09
5
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...llee function. All other registers should be saved by the caller. Some CCs use additional condition: If the register is used for passing/returning arguments - the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list. For example consider the following function: void __regcall func(int a, int b, int c, int d, int e); According to RegCall CC, parameters d and e should reside in registers EDI and ESI. The problem is that these registers also appear in the CSR list of RegCall calling convention. So, since the registers were used to pass arguments the callee doesn't have...
2019 Jun 10
2
[RFC] Expose user provided vector function for auto-vectorization.
...guide-and-reference-vector-variant: > > float MyAdd(float* a, int b) { return *a + b; } > __declspec(vector_variant(implements(MyAdd(float *a, int b)), > linear(a), vectorlength(8), > nomask, processor(core_2nd_gen_avx))) > __m256 __regcall MyAddVec(float* v_a, __m128i v_b1, __m128i v_b2) > > We need somehow communicate which lanes of widened "b" would map for the b1 parameter and which would go to the b2. If we only care about single ABI (like the one mandated by the OMP) than such things could be put to TTI, but what...
2017 Jan 12
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
Here in an example that explains the difference. // Only declaration – No implementation // Assume that the value is returned in EAX and the arguments are passed in EAX, ECX, EDX, ESI, EDI. int __regcall callee (int a, int b, int c, int d, int e); // implemented in a different module void caller() { … x = callee(1,2,3,4,5); … } What will be RegMask using IPRA register usage collector? Callee Saved Registers (from the static register mask) minus RAX. What should really be the RegMask? Callee Sav...
2017 Jan 12
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...entions "The proposed solution is to dynamically allocate the CSR lists”, which I thought is exactly what’s done in IPRA. Back to my point: outside of implementation details: my high-level impression is that it seems we need a "dynamic calling convention” mechanism in both case (IPRA and __regcall CC), and I’d approach this layer/feature independently as such (not just as the minimum ad-hoc structure to support one particular CC). Best, Mehdi Regarding immutable pass, I am not familiar with immutable passes that hold correctness information (can you share an example?). Thanks, Oren F...
2019 Jun 07
2
[RFC] Expose user provided vector function for auto-vectorization.
...pp-compiler-developer-guide-and-reference-vector-variant: float MyAdd(float* a, int b) { return *a + b; } __declspec(vector_variant(implements(MyAdd(float *a, int b)), linear(a), vectorlength(8), nomask, processor(core_2nd_gen_avx))) __m256 __regcall MyAddVec(float* v_a, __m128i v_b1, __m128i v_b2) We need somehow communicate which lanes of widened "b" would map for the b1 parameter and which would go to the b2. If we only care about single ABI (like the one mandated by the OMP) than such things could be put to TTI, but what about ot...
2017 Jan 12
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...llee function. All other registers should be saved by the caller. Some CCs use additional condition: If the register is used for passing/returning arguments – the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list. For example consider the following function: void __regcall func(int a, int b, int c, int d, int e); According to RegCall CC, parameters d and e should reside in registers EDI and ESI. The problem is that these registers also appear in the CSR list of RegCall calling convention. So, since the registers were used to pass arguments the callee doesn’t have to...
2017 Jan 11
2
RFC: Dynamically Allocated "Callee Saved Registers" Lists
...llee function. All other registers should be saved by the caller. Some CCs use additional condition: If the register is used for passing/returning arguments – the caller needs to save it - even if it is part of the Callee Saved Registers (CSR) list. For example consider the following function: void __regcall func(int a, int b, int c, int d, int e); According to RegCall CC, parameters d and e should reside in registers EDI and ESI. The problem is that these registers also appear in the CSR list of RegCall calling convention. So, since the registers were used to pass arguments the callee doesn’t have to...
2015 Jul 24
2
[LLVMdev] [lldb-dev] [3.7 Release] We have branched
On Fri, Jul 24, 2015 at 12:05 PM, Nico Weber <thakis at chromium.org> wrote: > On Thu, Jul 16, 2015 at 8:08 AM, Nico Weber <thakis at chromium.org> wrote: > >> On Wed, Jul 15, 2015 at 10:45 AM, Russell Wallace < >> russell.wallace at gmail.com> wrote: >> >>> Basic test results on Windows 7, visual studio 2013 (64 bit): >>> >>>