MLIR 22.0.0git
LowerABIAttributesPass.cpp File Reference

Go to the source code of this file.

Classes

class  mlir::spirv::impl::SPIRVLowerABIAttributesPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::spirv
namespace  mlir::spirv::impl

Macros

#define GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS

Functions

std::unique_ptr<::mlir::Passmlir::spirv::impl::createSPIRVLowerABIAttributesPass ()
std::unique_ptr<::mlir::Passmlir::spirv::createSPIRVLowerABIAttributesPass ()
static spirv::GlobalVariableOp createGlobalVarForEntryPointArgument (OpBuilder &builder, spirv::FuncOp funcOp, unsigned argIndex, spirv::InterfaceVarABIAttr abiInfo)
 Creates a global variable for an argument based on the ABI info.
static spirv::GlobalVariableOp createGlobalVarForGraphEntryPoint (OpBuilder &builder, spirv::GraphARMOp graphOp, unsigned index, bool isArg, spirv::InterfaceVarABIAttr abiInfo)
 Creates a global variable for an argument or result based on the ABI info.
static LogicalResult getInterfaceVariables (mlir::FunctionOpInterface funcOp, SmallVectorImpl< Attribute > &interfaceVars)
 Gets the global variables that need to be specified as interface variable with an spirv.EntryPointOp.
static LogicalResult lowerEntryPointABIAttr (spirv::FuncOp funcOp, OpBuilder &builder)
 Lowers the entry point attribute.

Macro Definition Documentation

◆ GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS

#define GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS

Definition at line 29 of file LowerABIAttributesPass.cpp.

Function Documentation

◆ createGlobalVarForEntryPointArgument()

spirv::GlobalVariableOp createGlobalVarForEntryPointArgument ( OpBuilder & builder,
spirv::FuncOp funcOp,
unsigned argIndex,
spirv::InterfaceVarABIAttr abiInfo )
static

◆ createGlobalVarForGraphEntryPoint()

spirv::GlobalVariableOp createGlobalVarForGraphEntryPoint ( OpBuilder & builder,
spirv::GraphARMOp graphOp,
unsigned index,
bool isArg,
spirv::InterfaceVarABIAttr abiInfo )
static

◆ getInterfaceVariables()

LogicalResult getInterfaceVariables ( mlir::FunctionOpInterface funcOp,
SmallVectorImpl< Attribute > & interfaceVars )
static

Gets the global variables that need to be specified as interface variable with an spirv.EntryPointOp.

Traverses the body of a entry function to do so.

Definition at line 118 of file LowerABIAttributesPass.cpp.

References mlir::spirv::TargetEnv::getVersion(), mlir::spirv::lookupTargetEnv(), and success().

Referenced by lowerEntryPointABIAttr().

◆ lowerEntryPointABIAttr()

LogicalResult lowerEntryPointABIAttr ( spirv::FuncOp funcOp,
OpBuilder & builder )
static