Skip to content

Commit

Permalink
Trace BufferOp through memref::CastOp (Xilinx#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
erwei-xilinx authored Oct 21, 2024
1 parent f4322ee commit f2a164a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mlir/lib/Conversion/AIRToAIESchedulingUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,10 @@ AIE::BufferOp TileDMAAllocator::getBuffer(uint64_t, int64_t col, int64_t row,
? (memcpyOp.getDstMemref())
: (memcpyOp.getSrcMemref());
AIE::BufferOp bufferOp = buffer.getDefiningOp<AIE::BufferOp>();
// Memref cast
memref::CastOp castOp = buffer.getDefiningOp<memref::CastOp>();
if (!bufferOp && castOp)
bufferOp = castOp.getOperand().getDefiningOp<AIE::BufferOp>();
return bufferOp;
}

Expand Down Expand Up @@ -856,6 +860,10 @@ AIE::BufferOp MemTileDMAAllocator::getBuffer(uint64_t, int64_t col, int64_t row,
? (memcpyOp.getDstMemref())
: (memcpyOp.getSrcMemref());
AIE::BufferOp bufferOp = buffer.getDefiningOp<AIE::BufferOp>();
// Memref cast
memref::CastOp castOp = buffer.getDefiningOp<memref::CastOp>();
if (!bufferOp && castOp)
bufferOp = castOp.getOperand().getDefiningOp<AIE::BufferOp>();
return bufferOp;
}

Expand Down

0 comments on commit f2a164a

Please sign in to comment.