r226548 - Introduce SPIR calling conventions.

Sameer Sahasrabuddhe sameer.sahasrabuddhe at amd.com
Tue Jan 20 02:54:45 PST 2015


On 1/20/2015 4:16 PM, Alexander Kornienko wrote:
> On Tue, Jan 20, 2015 at 11:33 AM, Alexander Kornienko 
> <alexfh at google.com <mailto:alexfh at google.com>> wrote:
>
>
>     On Tue, Jan 20, 2015 at 7:44 AM, Sameer Sahasrabuddhe
>     <sameer.sahasrabuddhe at amd.com
>     <mailto:sameer.sahasrabuddhe at amd.com>> wrote:
>
>
>         Added: cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl
>         <http://spir-calling-conv.cl>
>         URL:
>         http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl?rev=226548&view=auto
>         ==============================================================================
>         --- cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl
>         <http://spir-calling-conv.cl> (added)
>         +++ cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl
>         <http://spir-calling-conv.cl> Tue Jan 20 00:44:32 2015
>         @@ -0,0 +1,18 @@
>         +// RUN: %clang_cc1 %s -triple "spir-unknown-unknown"
>         -emit-llvm -o - | FileCheck %s
>         +
>         +int get_dummy_id(int D);
>         +
>         +kernel void bar(global int *A);
>         +
>         +kernel void foo(global int *A)
>         +// CHECK: define spir_kernel void @foo(i32 addrspace(1)* %A)
>         +{
>         +  int id = get_dummy_id(0);
>         +  // CHECK: %call = tail call spir_func i32 @get_dummy_id(i32 0)
>
>
>     This test fails
>     <http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/1183/>.
>     Please fix or revert.
>
>
> Clarification: this test fails only in some configurations, thus it 
> doesn't look like a trivial typo in the test which I could fix myself.
>
> This is blocking us, so I'm going to revert the revision.

Okay, go ahead, then. Looking into it.

Sameer.

>
>
>     Thanks!
>
>         +  A[id] = id;
>         +  bar(A);
>         +  // CHECK: tail call spir_kernel void @bar(i32 addrspace(1)* %A)
>         +}
>         +
>         +// CHECK: declare spir_func i32 @get_dummy_id(i32)
>         +// CHECK: declare spir_kernel void @bar(i32 addrspace(1)*)
>
>         Modified: cfe/trunk/tools/libclang/CXType.cpp
>         URL:
>         http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXType.cpp?rev=226548&r1=226547&r2=226548&view=diff
>         ==============================================================================
>         --- cfe/trunk/tools/libclang/CXType.cpp (original)
>         +++ cfe/trunk/tools/libclang/CXType.cpp Tue Jan 20 00:44:32 2015
>         @@ -527,6 +527,9 @@ CXCallingConv clang_getFunctionTypeCalli
>                TCALLINGCONV(AAPCS_VFP);
>                TCALLINGCONV(PnaclCall);
>                TCALLINGCONV(IntelOclBicc);
>         +    case CC_SpirFunction: return CXCallingConv_Unexposed;
>         +    case CC_SpirKernel: return CXCallingConv_Unexposed;
>         +      break;
>              }
>          #undef TCALLINGCONV
>            }
>
>
>         _______________________________________________
>         cfe-commits mailing list
>         cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
>         http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150120/e074f462/attachment.html>


More information about the cfe-commits mailing list