Skip to content

Commit 1d977ec

Browse files
authored
Improve code stability by only registering the results of memref.alloc or memref.assume_alignment as input memrefs (Xilinx#1043)
* Improve code stability by filtering op using Pure interface * More restrictive op filtering: limiting to only registering alloc and assume_alignment as inputs
1 parent fbd775b commit 1d977ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Util/Util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1914,7 +1914,7 @@ struct BufferMemrefToFuncArgsPattern : public OpRewritePattern<func::FuncOp> {
19141914
SmallVector<Type, 6> memrefTypes;
19151915
llvm::SetVector<Value> memrefs;
19161916
for (auto &op : funcOp.getFunctionBody().getOps()) {
1917-
if (isa<CastOpInterface, UnrealizedConversionCastOp>(op))
1917+
if (!isa<memref::AllocOp, memref::AssumeAlignmentOp>(op))
19181918
continue;
19191919
for (auto res : op.getResults()) {
19201920
BaseMemRefType resType = dyn_cast<BaseMemRefType>(res.getType());

0 commit comments

Comments
 (0)