Skip to content

Commit 6e4abeb

Browse files
supoort realloc.
1 parent bb63a6d commit 6e4abeb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ static SmallVector<Value> getDynamicSize(Value memref, func::FuncOp funcOp) {
5555
auto operands = defOp->getOperands();
5656
SmallVector<Value> dynamicSizes;
5757
for (Value size : operands) {
58+
if (!isa<IndexType>(size.getType()))
59+
continue;
60+
5861
BlockArgument sizeSrc = dyn_cast<BlockArgument>(size);
5962
if (!sizeSrc)
6063
return {};
61-
6264
auto arguments = funcOp.getArguments();
6365
auto iter = llvm::find(arguments, sizeSrc);
6466
if (iter == arguments.end())

0 commit comments

Comments
 (0)