Skip to content

Commit 16af35c

Browse files
add comment and nfc code.
1 parent cee600a commit 16af35c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mlir/lib/Transforms/RemoveDeadValues.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,11 +891,14 @@ void RemoveDeadValues::runOnOperation() {
891891
// end of this pass.
892892
RDVFinalCleanupList finalCleanupList;
893893

894+
// To delete the private function, the FunctionOpInterface is processed in
895+
// advance.
894896
module->walk([&](FunctionOpInterface op) {
895897
processFuncOp(op, module, la, deadVals, finalCleanupList);
896898
});
899+
897900
module->walk([&](Operation *op) {
898-
if (auto funcOp = dyn_cast<FunctionOpInterface>(op)) {
901+
if (isa<FunctionOpInterface>(op)) {
899902
// The FunctionOpInterface has been processed in advance.
900903
} else if (auto regionBranchOp = dyn_cast<RegionBranchOpInterface>(op)) {
901904
processRegionBranchOp(regionBranchOp, la, deadVals, finalCleanupList);

0 commit comments

Comments
 (0)