Index: mlir/lib/Analysis/SliceAnalysis.cpp =================================================================== --- mlir/lib/Analysis/SliceAnalysis.cpp +++ mlir/lib/Analysis/SliceAnalysis.cpp @@ -172,6 +172,12 @@ for (Value result : current->getResults()) { for (Operation *op : result.getUsers()) DFSPostorder(op, state); + for (Region ®ion : current->getRegions()) { + for (Block &block : region.getBlocks()) { + for (Operation &op : block.getOperations()) + DFSPostorder(&op, state); + } + } } bool inserted; using IterTy = decltype(state->seen.begin());