25class SPIRVABIInfo :
public ABIInfo {
27 SPIRVABIInfo(CIRGenTypes &cgt) : ABIInfo(cgt) {}
32 SPIRVTargetCIRGenInfo(CIRGenTypes &cgt)
33 : TargetCIRGenInfo(std::make_unique<SPIRVABIInfo>(cgt)) {}
35 void setTargetAttributes(
const clang::Decl *
decl, mlir::Operation *global,
36 CIRGenModule &cgm)
const override {
37 auto globalValue = mlir::cast<cir::CIRGlobalValueInterface>(global);
38 if (globalValue.isDeclaration())
41 const auto *fd = dyn_cast_or_null<FunctionDecl>(
decl);
46 DeviceKernelAttr::isOpenCLSpelling(fd->getAttr<DeviceKernelAttr>())) {
47 auto func = mlir::cast<cir::FuncOp>(global);
48 func.setCallingConv(cir::CallingConv::SpirKernel);
55std::unique_ptr<TargetCIRGenInfo>
57 return std::make_unique<SPIRVTargetCIRGenInfo>(cgt);
const clang::LangOptions & getLangOpts() const
This class organizes the cross-module state that is used while lowering AST types to CIR types.
std::unique_ptr< TargetCIRGenInfo > createSPIRVTargetCIRGenInfo(CIRGenTypes &cgt)
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
The JSON file list parser is used to communicate input to InstallAPI.