/llvm-project/mlir/lib/Dialect/MemRef/Transforms/ |
H A D | MultiBuffer.cpp | 99 mlir::memref::multiBuffer(RewriterBase &rewriter, memref::AllocOp allocOp, in multiBuffer() argument 102 LLVM_DEBUG(DBGS() << "Start multibuffering: " << allocOp << "\n"); in multiBuffer() 103 DominanceInfo dom(allocOp->getParentOp()); in multiBuffer() 105 for (Operation *user : allocOp->getUsers()) { in multiBuffer() 120 if (!overrideBuffer(user, allocOp.getResult())) { in multiBuffer() 125 if (llvm::any_of(allocOp->getUsers(), [&](Operation *otherUser) { in multiBuffer() 133 if (llvm::any_of(allocOp->getUsers(), [&](Operation *otherUser) { in multiBuffer() 161 if (!dom.dominates(allocOp.getOperation(), candidateLoop)) { in multiBuffer() 169 ArrayRef<int64_t> originalShape = allocOp.getType().getShape(); in multiBuffer() 172 LLVM_DEBUG(DBGS() << "--original type: " << allocOp.getType() << "\n"); in multiBuffer() [all …]
|
H A D | NormalizeMemRefs.cpp | 167 .walk([&](memref::AllocOp allocOp) -> WalkResult { in areMemRefsNormalizable() argument 168 Value oldMemRef = allocOp.getResult(); in areMemRefsNormalizable() 169 if (!allocOp.getType().getLayout().isIdentity() && in areMemRefsNormalizable() 358 for (memref::AllocOp allocOp : allocOps) in normalizeFuncOpMemRefs() 359 (void)normalizeMemRef(&allocOp); in normalizeFuncOpMemRefs() 347 for (memref::AllocOp allocOp : allocOps) normalizeFuncOpMemRefs() local
|
/llvm-project/mlir/lib/Dialect/Bufferization/Transforms/ |
H A D | BufferOptimizations.cpp | 71 auto allocOp = dyn_cast<AllocationOpInterface>(op); in allowAllocDominateBlockHoisting() local 72 return allocOp && in allowAllocDominateBlockHoisting() 73 static_cast<uint8_t>(allocOp.getHoistingKind() & HoistingKind::Block); in allowAllocDominateBlockHoisting() 79 auto allocOp = dyn_cast<AllocationOpInterface>(op); in allowAllocLoopHoisting() local 80 return allocOp && in allowAllocLoopHoisting() 81 static_cast<uint8_t>(allocOp.getHoistingKind() & HoistingKind::Loop); in allowAllocLoopHoisting() 398 Operation *allocOp = alloc.getDefiningOp(); in promote() local 399 if (auto allocInterface = dyn_cast<AllocationOpInterface>(allocOp)) { in promote() 405 allocOp->replaceAllUsesWith(alloca.value()); in promote() 406 allocOp->erase(); in promote()
|
/llvm-project/mlir/lib/Dialect/NVGPU/Transforms/ |
H A D | OptimizeSharedMemory.cpp | 231 op->walk([&](memref::AllocOp allocOp) { in runOnOperation() 232 if (!NVGPUDialect::hasSharedMemoryAddressSpace(allocOp.getType())) in runOnOperation() local 234 shmAllocOps.push_back(allocOp); in runOnOperation() 236 for (auto allocOp : shmAllocOps) { in runOnOperation() 238 allocOp.getMemref()))) 227 __anonaf47cb3f0602(memref::AllocOp allocOp) runOnOperation() argument
|
/llvm-project/mlir/test/lib/Analysis/ |
H A D | TestMemRefStrideCalculation.cpp | 34 getOperation().walk([&](memref::AllocOp allocOp) { in runOnOperation() argument 35 auto memrefType = cast<MemRefType>(allocOp.getResult().getType()); in runOnOperation()
|
/llvm-project/mlir/lib/Dialect/MemRef/IR/ |
H A D | ValueBoundsOpInterfaceImpl.cpp | 26 auto allocOp = cast<OpTy>(op); in populateBoundsForShapedValueDim() local 27 assert(value == allocOp.getResult() && "invalid value"); in populateBoundsForShapedValueDim() 29 cstr.bound(value)[dim] == allocOp.getMixedSizes()[dim]; in populateBoundsForShapedValueDim()
|
H A D | MemRefOps.cpp | 3547 AllocOp allocOp = allocOperand.getDefiningOp<AllocOp>(); in verify() 3548 if (!allocOp) in verify() 3523 AllocOp allocOp = allocOperand.getDefiningOp<AllocOp>(); matchAndRewrite() local
|
/llvm-project/mlir/include/mlir/Dialect/MemRef/Transforms/ |
H A D | Transforms.h | 123 memref::AllocOp allocOp, 127 FailureOr<memref::AllocOp> multiBuffer(memref::AllocOp allocOp,
|
/llvm-project/mlir/lib/Dialect/Affine/Utils/ |
H A D | Utils.cpp | 1743 AllocLikeOp *allocOp, OpBuilder b, in normalizeMemRef() 1751 // Use dynamicSizes of allocOp for dynamic dimension. in normalizeMemRefType() 1752 inAffineApply.emplace_back(allocOp->getDynamicSizes()[dynIdx]); in normalizeMemRefType() 1758 b.create<arith::ConstantOp>(allocOp->getLoc(), constantAttr)); in normalizeMemRefType() 1782 b.create<AffineApplyOp>(allocOp->getLoc(), newMap, inAffineApply); in normalizeMemRefType() 1791 LogicalResult mlir::affine::normalizeMemRef(AllocLikeOp *allocOp) { in normalizeMemRefType() 1792 MemRefType memrefType = allocOp->getType(); in normalizeMemRefType() 1793 OpBuilder b(*allocOp); in normalizeMemRefType() 1803 Value oldMemRef = allocOp->getResult(); in normalizeMemRefType() 1805 SmallVector<Value, 4> symbolOperands(allocOp in normalizeMemRefType() 1644 createNewDynamicSizes(MemRefType oldMemRefType,MemRefType newMemRefType,AffineMap map,memref::AllocOp * allocOp,OpBuilder b,SmallVectorImpl<Value> & newDynamicSizes) createNewDynamicSizes() argument 1691 normalizeMemRef(memref::AllocOp * allocOp) normalizeMemRef() argument [all...] |
/llvm-project/mlir/lib/Dialect/Affine/Transforms/ |
H A D | PipelineDataTransfer.cpp | 287 if (auto *allocOp = oldMemRef.getDefiningOp()) { in runOnAffineForOp() local 289 allocOp->erase(); in runOnAffineForOp() 294 allocOp->erase(); in runOnAffineForOp()
|
/llvm-project/mlir/lib/Dialect/Bufferization/IR/ |
H A D | BufferizationOps.cpp | 1104 auto allocOp = allocMemref.getDefiningOp<MemoryEffectOpInterface>(); in matchAndRewrite() 1105 if (!allocOp) in matchAndRewrite() local 1107 if (allocOp.getEffectOnValue<MemoryEffects::Allocate>(allocMemref)) in matchAndRewrite() 1141 if (auto allocOp = memref.getDefiningOp<MemoryEffectOpInterface>()) { in matchAndRewrite() 1145 if (allocOp.getEffectOnValue<MemoryEffects::Allocate>(memref) && in matchAndRewrite() 1146 hasSingleEffect<MemoryEffects::Allocate>(allocOp, memref) && in matchAndRewrite() 1148 toDelete.push_back(allocOp); in matchAndRewrite() 1142 if (auto allocOp = memref.getDefiningOp<MemoryEffectOpInterface>()) { matchAndRewrite() local
|
/llvm-project/mlir/lib/Conversion/GPUCommon/ |
H A D | GPUToLLVMConversion.cpp | 364 matchAndRewrite(gpu::AllocOp allocOp, OpAdaptor adaptor, 756 gpu::AllocOp allocOp, OpAdaptor adaptor, in matchAndRewrite() 759 MemRefType memRefType = allocOp.getType(); in matchAndRewrite() 761 if (failed(areAllLLVMTypes(allocOp, adaptor.getOperands(), rewriter)) || in matchAndRewrite() 765 auto loc = allocOp.getLoc(); in matchAndRewrite() 767 bool isShared = allocOp.getHostShared(); in matchAndRewrite() 769 if (isShared && allocOp.getAsyncToken()) in matchAndRewrite() 771 allocOp, "Host Shared allocation cannot be done async"); in matchAndRewrite() 772 if (!isShared && failed(isAsyncWithOneDependency(rewriter, allocOp))) in matchAndRewrite() 804 if (allocOp in matchAndRewrite() 738 matchAndRewrite(gpu::AllocOp allocOp,OpAdaptor adaptor,ConversionPatternRewriter & rewriter) const matchAndRewrite() argument [all...] |
/llvm-project/mlir/lib/Conversion/MemRefToSPIRV/ |
H A D | MemRefToSPIRV.cpp | 121 /// Returns true if the allocations of memref `type` generated from `allocOp` 123 static bool isAllocationSupported(Operation *allocOp, MemRefType type) { in isAllocationSupported() argument 124 if (isa<memref::AllocOp, memref::DeallocOp>(allocOp)) { in isAllocationSupported() 128 } else if (isa<memref::AllocaOp>(allocOp)) { in isAllocationSupported()
|
/llvm-project/mlir/lib/Dialect/Linalg/Transforms/ |
H A D | ConvertToDestinationStyle.cpp | 204 if (options.allocOp == 212 } else if (options.allocOp ==
|
/llvm-project/mlir/docs/Tutorials/ |
H A D | UnderstandingTheIRStructure.md | 207 WalkResult result = getFunction().walk([&](AllocOp allocOp) { 208 if (!isValid(allocOp))
|
/llvm-project/mlir/include/mlir/Dialect/Linalg/Transforms/ |
H A D | Transforms.h | 52 AllocOp allocOp = AllocOp::MemrefAlloc; member
|
/llvm-project/mlir/lib/Dialect/Linalg/TransformOps/ |
H A D | LinalgTransformOps.cpp | 355 options.allocOp = in apply() 358 options.allocOp = in apply()
|