Skip to content

Commit

Permalink
improve file naming for save-ir-after-each=pass
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdad2m committed Jan 2, 2025
1 parent 1ee8079 commit ddb5ea6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mlir/lib/Driver/CompilerDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ LogicalResult preparePassManager(PassManager &pm, const CompilerOptions &options
std::string tmp;
llvm::raw_string_ostream s{tmp};
s << *op;
dumpToFile(options, output.nextPipelineDumpFilename(pipelineName.str()), tmp);
std::string fileName = pipelineName.str();
if (auto funcOp = dyn_cast<mlir::func::FuncOp>(op)) {
fileName += "_" + funcOp.getName().str();
}
dumpToFile(options, output.nextPipelineDumpFilename(fileName), tmp);
}
};

Expand Down

0 comments on commit ddb5ea6

Please sign in to comment.