Пример #1
0
 llvm::CallingConv::ID callingConv(LINK l, TypeFunction *tf = nullptr,
                                   FuncDeclaration *fdecl = nullptr) override {
   assert(fdecl);
   if (hasKernelAttr(fdecl))
       return llvm::CallingConv::PTX_Kernel;
   else
       return llvm::CallingConv::PTX_Device;
 }
Пример #2
0
 llvm::CallingConv::ID callingConv(LINK l, TypeFunction *tf = nullptr,
                                   FuncDeclaration *fdecl = nullptr) override {
   assert(fdecl);
   if (hasKernelAttr(fdecl))
     return llvm::CallingConv::SPIR_KERNEL;
   else
     return llvm::CallingConv::SPIR_FUNC;
 }