Skip to content

Commit f663b14

Browse files
committed
early break
1 parent 4cfc8eb commit f663b14

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

mlir/lib/Conversion/Normalize/Normalize.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,14 +427,15 @@ SetVector<int> NormalizePass::getOutputFootprint(
427427
func::FuncOp func = op->getParentOfType<func::FuncOp>();
428428

429429
unsigned count = 0;
430-
for (Block &block : func.getRegion())
430+
for (Block &block : func.getRegion()) {
431431
for (Operation &innerOp : block) {
432-
if (&innerOp == op)
432+
if (&innerOp == op) {
433433
outputsVec.insert(count);
434+
return outputsVec;
435+
}
434436
count++;
435437
}
436-
437-
return outputsVec;
438+
}
438439
}
439440

440441
for (OpOperand &use : op->getUses()) {

0 commit comments

Comments
 (0)