clang 22.0.0git
SPIR.cpp File Reference
#include "ABIInfoImpl.h"
#include "HLSLBufferLayoutBuilder.h"
#include "TargetInfo.h"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
namespace  clang::CodeGen

Macros

#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
#define INTEL_SUBGROUP_AVC_TYPE(Name, Id)

Functions

void clang::CodeGen::computeSPIRKernelABIInfo (CodeGenModule &CGM, CGFunctionInfo &FI)
static llvm::Type * getSPIRVImageType (llvm::LLVMContext &Ctx, StringRef BaseType, StringRef OpenCLName, unsigned AccessQualifier)
 Construct a SPIR-V target extension type for the given OpenCL image type.
static llvm::Type * getInlineSpirvConstant (CodeGenModule &CGM, llvm::Type *IntegralType, llvm::APInt Value)
static llvm::Type * getInlineSpirvType (CodeGenModule &CGM, const HLSLInlineSpirvType *SpirvType)
static unsigned getImageFormat (const LangOptions &LangOpts, const HLSLAttributedResourceType::Attributes &attributes, llvm::Type *SampledType, QualType Ty, unsigned NumChannels)

Macro Definition Documentation

◆ IMAGE_TYPE

#define IMAGE_TYPE ( ImgType,
Id,
SingletonId,
Access,
Suffix )
Value:
case BuiltinType::Id: \
return getSPIRVImageType(Ctx, "spirv.Image", #ImgType, AQ_##Suffix);
static llvm::Type * getSPIRVImageType(llvm::LLVMContext &Ctx, StringRef BaseType, StringRef OpenCLName, unsigned AccessQualifier)
Construct a SPIR-V target extension type for the given OpenCL image type.
Definition SPIR.cpp:308

◆ INTEL_SUBGROUP_AVC_TYPE

#define INTEL_SUBGROUP_AVC_TYPE ( Name,
Id )
Value:
case BuiltinType::OCLIntelSubgroupAVC##Id: \
return llvm::TargetExtType::get(Ctx, "spirv.Avc" #Id "INTEL");

Function Documentation

◆ getImageFormat()

unsigned getImageFormat ( const LangOptions & LangOpts,
const HLSLAttributedResourceType::Attributes & attributes,
llvm::Type * SampledType,
QualType Ty,
unsigned NumChannels )
static

Definition at line 518 of file SPIR.cpp.

References clang::Type::isSignedIntegerType().

◆ getInlineSpirvConstant()

llvm::Type * getInlineSpirvConstant ( CodeGenModule & CGM,
llvm::Type * IntegralType,
llvm::APInt Value )
static

Definition at line 384 of file SPIR.cpp.

References clang::CodeGen::CodeGenModule::getLLVMContext().

Referenced by getInlineSpirvType().

◆ getInlineSpirvType()

◆ getSPIRVImageType()

llvm::Type * getSPIRVImageType ( llvm::LLVMContext & Ctx,
StringRef BaseType,
StringRef OpenCLName,
unsigned AccessQualifier )
static

Construct a SPIR-V target extension type for the given OpenCL image type.

Definition at line 308 of file SPIR.cpp.