[Mlir-commits] [mlir] f6bfbc8 - [mlir] flush output in transform.print (#121382)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jan 6 01:47:44 PST 2025
Author: Oleksandr "Alex" Zinenko
Date: 2025-01-06T10:47:40+01:00
New Revision: f6bfbc87779ef2079e9b1356ac21381659f13fbb
URL: https://github.com/llvm/llvm-project/commit/f6bfbc87779ef2079e9b1356ac21381659f13fbb
DIFF: https://github.com/llvm/llvm-project/commit/f6bfbc87779ef2079e9b1356ac21381659f13fbb.diff
LOG: [mlir] flush output in transform.print (#121382)
Print operations are often used for debugging, immediately before the
compiler aborts. In such cases, it is sometimes possible that the output
isn't fully produced yet. Make sure it is by explicitly flushing the
output.
Added:
Modified:
mlir/lib/Dialect/Transform/IR/TransformOps.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Transform/IR/TransformOps.cpp b/mlir/lib/Dialect/Transform/IR/TransformOps.cpp
index 106a7947350907..798853a75441a1 100644
--- a/mlir/lib/Dialect/Transform/IR/TransformOps.cpp
+++ b/mlir/lib/Dialect/Transform/IR/TransformOps.cpp
@@ -2840,6 +2840,7 @@ transform::PrintOp::apply(transform::TransformRewriter &rewriter,
llvm::outs() << "top-level ]]]\n";
state.getTopLevel()->print(llvm::outs(), printFlags);
llvm::outs() << "\n";
+ llvm::outs().flush();
return DiagnosedSilenceableFailure::success();
}
@@ -2849,6 +2850,7 @@ transform::PrintOp::apply(transform::TransformRewriter &rewriter,
llvm::outs() << "\n";
}
+ llvm::outs().flush();
return DiagnosedSilenceableFailure::success();
}
More information about the Mlir-commits
mailing list