25class CommonSPIRABIInfo :
public ABIInfo {
27 CommonSPIRABIInfo(CIRGenTypes &cgt) : ABIInfo(cgt) {}
32 CommonSPIRTargetCIRGenInfo(CIRGenTypes &cgt)
33 : TargetCIRGenInfo(std::make_unique<CommonSPIRABIInfo>(cgt)) {}
35 mlir::ptr::MemorySpaceAttrInterface
36 getCIRAllocaAddressSpace()
const override {
37 return cir::LangAddressSpaceAttr::get(
38 &getABIInfo().cgt.getMLIRContext(),
39 cir::LangAddressSpace::OffloadPrivate);
42 cir::CallingConv getDeviceKernelCallingConv()
const override {
43 return cir::CallingConv::SpirKernel;
48 if (getABIInfo().cgt.getASTContext().getLangOpts().HIP)
49 ft = getABIInfo().cgt.getASTContext().adjustFunctionType(
56std::unique_ptr<TargetCIRGenInfo>
58 return std::make_unique<CommonSPIRTargetCIRGenInfo>(cgt);
static void setCUDAKernelCallingConvention(CanQualType &funcTy, CIRGenModule &cgm, const FunctionDecl *fd)
Set calling convention for CUDA/HIP kernel.
This class organizes the cross-module state that is used while lowering AST types to CIR types.
ExtInfo withCallingConv(CallingConv cc) const
ExtInfo getExtInfo() const
std::unique_ptr< TargetCIRGenInfo > createCommonSPIRTargetCIRGenInfo(CIRGenTypes &cgt)
Top level wrappers for InstallAPI frontend operations.