MLIR  16.0.0git
Functions | Variables
GPUToSPIRV.cpp File Reference
#include "mlir/Conversion/GPUToSPIRV/GPUToSPIRV.h"
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVEnums.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/IR/TargetAndABI.h"
#include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Transforms/DialectConversion.h"
+ Include dependency graph for GPUToSPIRV.cpp:

Go to the source code of this file.

Functions

static spirv::FuncOp lowerAsEntryFunction (gpu::GPUFuncOp funcOp, TypeConverter &typeConverter, ConversionPatternRewriter &rewriter, spirv::EntryPointABIAttr entryPointInfo, ArrayRef< spirv::InterfaceVarABIAttr > argABIInfo)
 
static LogicalResult getDefaultABIAttrs (MLIRContext *context, gpu::GPUFuncOp funcOp, SmallVectorImpl< spirv::InterfaceVarABIAttr > &argABI)
 Populates argABI with spirv.interface_var_abi attributes for lowering gpu.func to spirv.func if no arguments have the attributes set already. More...
 

Variables

static constexpr const char kSPIRVModule [] = "__spv__"
 

Function Documentation

◆ getDefaultABIAttrs()

static LogicalResult getDefaultABIAttrs ( MLIRContext context,
gpu::GPUFuncOp  funcOp,
SmallVectorImpl< spirv::InterfaceVarABIAttr > &  argABI 
)
static

Populates argABI with spirv.interface_var_abi attributes for lowering gpu.func to spirv.func if no arguments have the attributes set already.

Returns failure if any argument has the ABI attribute set already.

Definition at line 256 of file GPUToSPIRV.cpp.

References mlir::failure(), mlir::spirv::getInterfaceVarABIAttr(), mlir::spirv::getInterfaceVarABIAttrName(), mlir::spirv::lookupTargetEnvOrDefault(), mlir::spirv::needsInterfaceVarABIAttrs(), and mlir::success().

◆ lowerAsEntryFunction()

static spirv::FuncOp lowerAsEntryFunction ( gpu::GPUFuncOp  funcOp,
TypeConverter typeConverter,
ConversionPatternRewriter rewriter,
spirv::EntryPointABIAttr  entryPointInfo,
ArrayRef< spirv::InterfaceVarABIAttr argABIInfo 
)
static

Variable Documentation

◆ kSPIRVModule

constexpr const char kSPIRVModule[] = "__spv__"
staticconstexpr

Definition at line 27 of file GPUToSPIRV.cpp.