MLIR
20.0.0git
|
#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... | |
#define GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS |
Definition at line 29 of file LowerABIAttributesPass.cpp.
|
static |
Creates a global variable for an argument based on the ABI info.
Definition at line 38 of file LowerABIAttributesPass.cpp.
References mlir::OpBuilder::create(), mlir::VulkanLayoutUtils::decorateType(), mlir::spirv::StructType::get(), mlir::spirv::PointerType::get(), mlir::spirv::InterfaceVarABIAttr::getBinding(), mlir::spirv::InterfaceVarABIAttr::getDescriptorSet(), mlir::spirv::InterfaceVarABIAttr::getStorageClass(), and mlir::OpBuilder::setInsertionPoint().
|
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().
|
static |
Lowers the entry point attribute.
Definition at line 118 of file LowerABIAttributesPass.cpp.
References mlir::spirv::TargetEnv::allows(), mlir::OpBuilder::create(), mlir::get(), mlir::spirv::getEntryPointABIAttrName(), mlir::spirv::getExecutionModel(), getInterfaceVariables(), mlir::spirv::lookupTargetEnv(), and mlir::OpBuilder::setInsertionPointToEnd().