Anastasia added inline comments.
================
Comment at: clang/test/CodeGenSYCL/device-functions.cpp:24
+}
+// CHECK: define spir_func void @{{.*}}foo
+// CHECK: define linkonce_odr spir_func i32 @{{.*}}bar
----------------
Fznamznon wrote:
> Anastasia wrote:
> > Fznamznon wrote:
> > > Anastasia wrote:
> > > > I can't see where the SPIR calling convention is currently set for SYCL?
> > > If I understand correct it's set automatically on AST level because we
> > > use SPIR-based triple for device code. Only in case of C++ methods clang
> > > doesn't set SPIR calling convention. We did a modification in our
> > > codebase to get SPIR calling convention for C++ methods too (available [[
> > > https://github.com/intel/llvm/blob/c13cb8df84418cb5d682f3bbee89090ebb0d00be/clang/lib/AST/ASTContext.cpp#L10015
> > > | here ]] )
> > >
> > Ok and what happens if some other target is used - not SPIR?
> There will be no SPIR calling convention for device functions.
Just FYI at some point we generalized SPIR calling convention to be used for
kernels irrespective from target by default (see
`TargetCodeGenInfo::getOpenCLKernelCallingConv`). Not sure if it might make
sense to do for SYCL device functions too. I am not saying it belongs to this
patch though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60455/new/
https://reviews.llvm.org/D60455
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits