MLIR
20.0.0git
|
#include "mlir/Conversion/MemRefToSPIRV/MemRefToSPIRVPass.h"
#include "mlir/Conversion/MemRefToSPIRV/MemRefToSPIRV.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/TargetAndABI.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Visitors.h"
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "llvm/ADT/SmallVectorExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Debug.h"
#include <optional>
#include "mlir/Conversion/Passes.h.inc"
Go to the source code of this file.
Namespaces | |
mlir | |
Include the generated interface declarations. | |
Macros | |
#define | GEN_PASS_DEF_MAPMEMREFSTORAGECLASS |
#define | DEBUG_TYPE "mlir-map-memref-storage-class" |
#define | VULKAN_STORAGE_SPACE_MAP_LIST(MAP_FN) |
Mapping between SPIR-V storage classes to memref memory spaces. More... | |
#define | STORAGE_SPACE_MAP_FN(storage, space) |
#define | STORAGE_SPACE_MAP_FN(storage, space) |
#define | OPENCL_STORAGE_SPACE_MAP_LIST(MAP_FN) |
#define | STORAGE_SPACE_MAP_FN(storage, space) |
#define | STORAGE_SPACE_MAP_FN(storage, space) |
Functions | |
static bool | isLegalType (Type type) |
Returns true if the given type is considered as legal for SPIR-V conversion. More... | |
static bool | isLegalAttr (Attribute attr) |
Returns true if the given attr is considered as legal for SPIR-V conversion. More... | |
static bool | isLegalOp (Operation *op) |
Returns true if the given op is considered as legal for SPIR-V conversion. More... | |
#define DEBUG_TYPE "mlir-map-memref-storage-class" |
Definition at line 37 of file MapMemRefStorageClassPass.cpp.
#define GEN_PASS_DEF_MAPMEMREFSTORAGECLASS |
Definition at line 33 of file MapMemRefStorageClassPass.cpp.
#define OPENCL_STORAGE_SPACE_MAP_LIST | ( | MAP_FN | ) |
Definition at line 109 of file MapMemRefStorageClassPass.cpp.
#define STORAGE_SPACE_MAP_FN | ( | storage, | |
space | |||
) |
#define STORAGE_SPACE_MAP_FN | ( | storage, | |
space | |||
) |
#define STORAGE_SPACE_MAP_FN | ( | storage, | |
space | |||
) |
#define STORAGE_SPACE_MAP_FN | ( | storage, | |
space | |||
) |
#define VULKAN_STORAGE_SPACE_MAP_LIST | ( | MAP_FN | ) |
Mapping between SPIR-V storage classes to memref memory spaces.
Note: memref does not have a defined semantics for each memory space; it depends on the context where it is used. There are no particular reasons behind the number assignments; we try to follow NVVM conventions and largely give common storage classes a smaller number.
Definition at line 51 of file MapMemRefStorageClassPass.cpp.
|
static |
Returns true if the given attr
is considered as legal for SPIR-V conversion.
Definition at line 217 of file MapMemRefStorageClassPass.cpp.
References isLegalType().
Referenced by isLegalOp().
|
static |
Returns true if the given op
is considered as legal for SPIR-V conversion.
Definition at line 224 of file MapMemRefStorageClassPass.cpp.
References mlir::Operation::getAttrs(), mlir::Operation::getOperandTypes(), mlir::Operation::getResultTypes(), isLegalAttr(), and isLegalType().
Referenced by mlir::spirv::getMemorySpaceToStorageClassTarget().
|
static |
Returns true if the given type
is considered as legal for SPIR-V conversion.
Definition at line 207 of file MapMemRefStorageClassPass.cpp.
Referenced by isLegalAttr(), and isLegalOp().