|
MLIR 24.0.0git
|
#include "mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.h"#include "mlir/Analysis/DataLayoutAnalysis.h"#include "mlir/Conversion/LLVMCommon/TypeConverter.h"#include "mlir/Dialect/Affine/IR/AffineOps.h"#include "mlir/Dialect/Arith/IR/Arith.h"#include "mlir/Dialect/MemRef/IR/MemRef.h"#include "mlir/Dialect/MemRef/Transforms/Passes.h"#include "mlir/Dialect/MemRef/Transforms/Transforms.h"#include "mlir/Dialect/MemRef/Utils/MemRefUtils.h"#include "mlir/Dialect/NVGPU/IR/NVGPUDialect.h"#include "mlir/Dialect/SCF/IR/SCF.h"#include "mlir/Dialect/Transform/IR/TransformDialect.h"#include "mlir/Dialect/Transform/IR/TransformTypes.h"#include "mlir/Dialect/Transform/Interfaces/TransformInterfaces.h"#include "mlir/Dialect/Vector/IR/VectorOps.h"#include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"#include "mlir/Interfaces/LoopLikeInterface.h"#include "llvm/Support/Debug.h"#include "mlir/Dialect/MemRef/TransformOps/MemRefTransformOps.cpp.inc"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "memref-transforms" |
| #define | DBGS() |
| #define | GET_OP_LIST |
| #define | GET_OP_CLASSES |
Functions | |
| template<typename AllocLikeOp> | |
| static DiagnosedSilenceableFailure | checkAllocToGlobalPreconditions (AllocLikeOp allocLikeOp) |
| Checks whether an allocation operation can be converted to a memref.global. | |
| template<typename AllocLikeOp> | |
| static DiagnosedSilenceableFailure | allocLikeToGlobal (transform::TransformRewriter &rewriter, AllocLikeOp allocLikeOp, StringRef globalName, memref::GlobalOp &globalOp, memref::GetGlobalOp &getGlobalOp) |
| Converts an allocation operation (memref.alloca or memref.alloc) to a memref.global operation in the nearest symbol table, and replaces the allocation with a memref.get_global operation. | |
| #define DBGS | ( | ) |
Definition at line 32 of file MemRefTransformOps.cpp.
| #define DEBUG_TYPE "memref-transforms" |
Definition at line 31 of file MemRefTransformOps.cpp.
| #define GET_OP_CLASSES |
Definition at line 447 of file MemRefTransformOps.cpp.
| #define GET_OP_LIST |
|
static |
Converts an allocation operation (memref.alloca or memref.alloc) to a memref.global operation in the nearest symbol table, and replaces the allocation with a memref.get_global operation.
Any memref.dealloc operations referencing the allocation are erased.
Definition at line 175 of file MemRefTransformOps.cpp.
References checkAllocToGlobalPreconditions(), mlir::RewriterBase::eraseOp(), mlir::Builder::getContext(), mlir::SymbolTable::getNearestSymbolTable(), mlir::SymbolTable::insert(), mlir::RewriterBase::replaceOpWithNewOp(), mlir::OpBuilder::setInsertionPoint(), mlir::DiagnosedSilenceableFailure::succeeded(), and mlir::DiagnosedSilenceableFailure::success().
|
static |
Checks whether an allocation operation can be converted to a memref.global.
Definition at line 136 of file MemRefTransformOps.cpp.
References mlir::emitSilenceableFailure(), and mlir::DiagnosedSilenceableFailure::success().
Referenced by allocLikeToGlobal().