From 1eaa31ce0e5242dbb4c90084952bede678e360a2 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Thu, 6 Feb 2020 17:55:14 -0800 Subject: [PATCH] [mlir][DialectConversion] Change erroneous return to a continue This fixes a nasty bug where the loop would return prematurely when notifying the argument converter that an operation was removed. --- mlir/lib/Transforms/DialectConversion.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/lib/Transforms/DialectConversion.cpp b/mlir/lib/Transforms/DialectConversion.cpp index a5b3e9b..a4dc897 100644 --- a/mlir/lib/Transforms/DialectConversion.cpp +++ b/mlir/lib/Transforms/DialectConversion.cpp @@ -250,7 +250,7 @@ void ArgConverter::notifyOpRemoved(Operation *op) { // Check if this block was converted. auto it = conversionInfo.find(&block); if (it == conversionInfo.end()) - return; + continue; // Drop all uses of the original arguments and delete the original block. Block *origBlock = it->second.origBlock; -- 2.7.4