The extract_strided_metadata will be heavily used by the new buffer deallocation pass to get the base memref and pass it to the deallocation operation. This commit factors out some simplification logic of the pass into a canonicalization pattern.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp | ||
---|---|---|
1001–1010 | The combination of m_AllOf and m_AnyOf (which is just needed to capture the value?) is a bit confusing. I would write this without matchers: auto extractStridedOp = memref.getDefiningOp<ExtractStridedMetadataOp>(); if (!extractStridedOp) return failure(); auto allocOp = extractStridedOp.getSource().getDefiningOp<MemoryEffectOpInterface>(); if (!allocOp) return failure(); if (allocOp.getEffectOnValue ...) |
The combination of m_AllOf and m_AnyOf (which is just needed to capture the value?) is a bit confusing. I would write this without matchers: