| /llvm-project-15.0.7/mlir/lib/Dialect/MemRef/Transforms/ |
| H A D | MultiBuffer.cpp | 81 LogicalResult mlir::memref::multiBuffer(memref::AllocOp allocOp, in multiBuffer() argument 83 DominanceInfo dom(allocOp->getParentOp()); in multiBuffer() 85 for (Operation *user : allocOp->getUsers()) { in multiBuffer() 90 if (!overrideBuffer(user, allocOp.getResult())) in multiBuffer() 113 ArrayRef<int64_t> oldShape = allocOp.getType().getShape(); in multiBuffer() 118 builder.setInsertionPoint(allocOp); in multiBuffer() 119 Location loc = allocOp->getLoc(); in multiBuffer() 124 AffineExpr init = getAffineDimExpr(1, allocOp.getContext()); in multiBuffer() 125 AffineExpr step = getAffineDimExpr(2, allocOp.getContext()); in multiBuffer() 143 replaceUsesAndPropagateType(allocOp, subview, builder); in multiBuffer() [all …]
|
| H A D | NormalizeMemRefs.cpp | 158 .walk([&](memref::AllocOp allocOp) -> WalkResult { in areMemRefsNormalizable() argument 159 Value oldMemRef = allocOp.getResult(); in areMemRefsNormalizable() 333 for (memref::AllocOp allocOp : allocOps) in normalizeFuncOpMemRefs() local 334 (void)normalizeMemRef(&allocOp); in normalizeFuncOpMemRefs()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/NVGPU/Transforms/ |
| H A D | OptimizeSharedMemory.cpp | 252 op->walk([&](memref::AllocOp allocOp) { in runOnOperation() argument 253 if (allocOp.getMemref() in runOnOperation() 259 shmAllocOps.push_back(allocOp); in runOnOperation() 261 for (auto allocOp : shmAllocOps) { in runOnOperation() local 263 allocOp.getMemref()))) in runOnOperation()
|
| /llvm-project-15.0.7/mlir/test/lib/Analysis/ |
| H A D | TestMemRefStrideCalculation.cpp | 34 getOperation().walk([&](memref::AllocOp allocOp) { in runOnOperation() argument 35 auto memrefType = allocOp.getResult().getType().cast<MemRefType>(); in runOnOperation()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/Transforms/ |
| H A D | BufferOptimizations.cpp | 346 Operation *allocOp = alloc.getDefiningOp(); in promote() local 349 allocOp->getOperands()); in promote() 352 allocOp->replaceAllUsesWith(alloca); in promote() 353 allocOp->erase(); in promote()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Affine/Utils/ |
| H A D | Utils.cpp | 1629 memref::AllocOp *allocOp, OpBuilder b, in createNewDynamicSizes() argument 1638 inAffineApply.emplace_back(allocOp->getDynamicSizes()[dynIdx]); in createNewDynamicSizes() 1645 b.create<arith::ConstantOp>(allocOp->getLoc(), constantAttr)); in createNewDynamicSizes() 1677 LogicalResult mlir::normalizeMemRef(memref::AllocOp *allocOp) { in normalizeMemRef() argument 1678 MemRefType memrefType = allocOp->getType(); in normalizeMemRef() 1679 OpBuilder b(*allocOp); in normalizeMemRef() 1690 Value oldMemRef = allocOp->getResult(); in normalizeMemRef() 1692 SmallVector<Value, 4> symbolOperands(allocOp->getSymbolOperands()); in normalizeMemRef() 1706 b.create<memref::AllocOp>(allocOp->getLoc(), newMemRefType, in normalizeMemRef() 1710 allocOp->getAlignmentAttr()); in normalizeMemRef() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Affine/Transforms/ |
| H A D | PipelineDataTransfer.cpp | 276 if (auto *allocOp = oldMemRef.getDefiningOp()) { in runOnAffineForOp() local 278 allocOp->erase(); in runOnAffineForOp() 283 allocOp->erase(); in runOnAffineForOp()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/GPUCommon/ |
| H A D | GPUToLLVMConversion.cpp | 218 matchAndRewrite(gpu::AllocOp allocOp, OpAdaptor adaptor, 446 gpu::AllocOp allocOp, OpAdaptor adaptor, in matchAndRewrite() argument 448 MemRefType memRefType = allocOp.getType(); in matchAndRewrite() 450 if (failed(areAllLLVMTypes(allocOp, adaptor.getOperands(), rewriter)) || in matchAndRewrite() 452 failed(isAsyncWithOneDependency(rewriter, allocOp))) in matchAndRewrite() 455 auto loc = allocOp.getLoc(); in matchAndRewrite() 481 rewriter.replaceOp(allocOp, {memRefDescriptor, stream}); in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/MemRef/Transforms/ |
| H A D | Passes.h | 83 LogicalResult multiBuffer(memref::AllocOp allocOp, unsigned multiplier);
|
| /llvm-project-15.0.7/mlir/lib/Conversion/MemRefToLLVM/ |
| H A D | MemRefToLLVM.cpp | 51 memref::AllocOp allocOp = cast<memref::AllocOp>(op); in allocateBuffer() local 52 MemRefType memRefType = allocOp.getType(); in allocateBuffer() 55 if (auto alignmentAttr = allocOp.getAlignment()) { in allocateBuffer() 73 auto allocFuncOp = getAllocFn(allocOp->getParentOfType<ModuleOp>()); in allocateBuffer() 134 int64_t getAllocationAlignment(memref::AllocOp allocOp) const { in getAllocationAlignment() 135 if (Optional<uint64_t> alignment = allocOp.getAlignment()) in getAllocationAlignment() 141 auto eltSizeBytes = getMemRefEltSizeInBytes(allocOp.getType(), allocOp); in getAllocationAlignment() 159 memref::AllocOp allocOp = cast<memref::AllocOp>(op); in allocateBuffer() local 160 MemRefType memRefType = allocOp.getType(); in allocateBuffer() 161 int64_t alignment = getAllocationAlignment(allocOp); in allocateBuffer() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Conversion/MemRefToSPIRV/ |
| H A D | MemRefToSPIRV.cpp | 91 static bool isAllocationSupported(Operation *allocOp, MemRefType type) { in isAllocationSupported() argument 92 if (isa<memref::AllocOp, memref::DeallocOp>(allocOp)) { in isAllocationSupported() 96 } else if (isa<memref::AllocaOp>(allocOp)) { in isAllocationSupported()
|
| /llvm-project-15.0.7/mlir/docs/Tutorials/ |
| H A D | UnderstandingTheIRStructure.md | 206 WalkResult result = getFunction().walk([&](AllocOp allocOp) { 207 if (!isValid(allocOp))
|
| /llvm-project-15.0.7/mlir/lib/Dialect/MemRef/IR/ |
| H A D | MemRefOps.cpp | 2832 AllocOp allocOp = allocOperand.getDefiningOp<AllocOp>(); in matchAndRewrite() local 2833 if (!allocOp) in matchAndRewrite()
|