Home
last modified time | relevance | path

Searched refs:allocOp (Results 1 – 17 of 17) sorted by relevance

/llvm-project/mlir/lib/Dialect/MemRef/Transforms/
H A DMultiBuffer.cpp99 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 DNormalizeMemRefs.cpp167 .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 DBufferOptimizations.cpp71 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 DOptimizeSharedMemory.cpp231 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 DTestMemRefStrideCalculation.cpp34 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 DValueBoundsOpInterfaceImpl.cpp26 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 DMemRefOps.cpp3547 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 DTransforms.h123 memref::AllocOp allocOp,
127 FailureOr<memref::AllocOp> multiBuffer(memref::AllocOp allocOp,
/llvm-project/mlir/lib/Dialect/Affine/Utils/
H A DUtils.cpp1743 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 DPipelineDataTransfer.cpp287 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 DBufferizationOps.cpp1104 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 DGPUToLLVMConversion.cpp364 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 DMemRefToSPIRV.cpp121 /// 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 DConvertToDestinationStyle.cpp204 if (options.allocOp ==
212 } else if (options.allocOp ==
/llvm-project/mlir/docs/Tutorials/
H A DUnderstandingTheIRStructure.md207 WalkResult result = getFunction().walk([&](AllocOp allocOp) {
208 if (!isValid(allocOp))
/llvm-project/mlir/include/mlir/Dialect/Linalg/Transforms/
H A DTransforms.h52 AllocOp allocOp = AllocOp::MemrefAlloc; member
/llvm-project/mlir/lib/Dialect/Linalg/TransformOps/
H A DLinalgTransformOps.cpp355 options.allocOp = in apply()
358 options.allocOp = in apply()