MLIR  20.0.0git
Namespaces | Macros | Functions
LowerABIAttributesPass.cpp File Reference
#include "mlir/Dialect/SPIRV/Transforms/Passes.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/Dialect/SPIRV/Utils/LayoutUtils.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/SetVector.h"
#include "mlir/Dialect/SPIRV/Transforms/Passes.h.inc"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::spirv
 

Macros

#define GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS
 

Functions

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. More...
 
static LogicalResult getInterfaceVariables (spirv::FuncOp funcOp, SmallVectorImpl< Attribute > &interfaceVars)
 Gets the global variables that need to be specified as interface variable with an spirv.EntryPointOp. More...
 
static LogicalResult lowerEntryPointABIAttr (spirv::FuncOp funcOp, OpBuilder &builder)
 Lowers the entry point attribute. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS

#define GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS

Definition at line 29 of file LowerABIAttributesPass.cpp.

Function Documentation

◆ createGlobalVarForEntryPointArgument()

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

◆ getInterfaceVariables()

static LogicalResult getInterfaceVariables ( spirv::FuncOp  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 82 of file LowerABIAttributesPass.cpp.

References mlir::get().

Referenced by lowerEntryPointABIAttr().

◆ lowerEntryPointABIAttr()

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