diff --git a/mlir/lib/Transforms/Utils/InliningUtils.cpp b/mlir/lib/Transforms/Utils/InliningUtils.cpp --- a/mlir/lib/Transforms/Utils/InliningUtils.cpp +++ b/mlir/lib/Transforms/Utils/InliningUtils.cpp @@ -200,7 +200,7 @@ // Collect all the inlined operations. for (auto &block : newBlocks) - block.walk([&](Operation *op) { inlinedOps.append(op); }); + inlinedOps.append(block.begin(), block.end()) // Handle the case where only a single block was inlined. if (std::next(newBlocks.begin()) == newBlocks.end()) {