diff --git a/mlir/lib/Pass/IRPrinting.cpp b/mlir/lib/Pass/IRPrinting.cpp --- a/mlir/lib/Pass/IRPrinting.cpp +++ b/mlir/lib/Pass/IRPrinting.cpp @@ -62,7 +62,8 @@ } private: - template void addDataToHash(llvm::SHA1 &hasher, const T &data) { + template + void addDataToHash(llvm::SHA1 &hasher, const T &data) { hasher.update( ArrayRef(reinterpret_cast(&data), sizeof(T))); } @@ -125,7 +126,8 @@ beforePassFingerPrints.try_emplace(pass, op); config->printBeforeIfEnabled(pass, op, [&](raw_ostream &out) { - out << "// -----// IR Dump Before " << pass->getName(); + out << "// -----// IR Dump Before " << pass->getName() << " (" + << pass->getArgument() << ")"; printIR(op, config->shouldPrintAtModuleScope(), out, config->getOpPrintingFlags()); out << "\n\n"; @@ -155,7 +157,8 @@ } config->printAfterIfEnabled(pass, op, [&](raw_ostream &out) { - out << "// -----// IR Dump After " << pass->getName(); + out << "// -----// IR Dump After " << pass->getName() << " (" + << pass->getArgument() << ")"; printIR(op, config->shouldPrintAtModuleScope(), out, config->getOpPrintingFlags()); out << "\n\n";