[Mlir-commits] [mlir] [MLIR] Add option to postpone remark emission (PR #157434)
Mehdi Amini
llvmlistbot at llvm.org
Wed Sep 17 04:37:57 PDT 2025
================
@@ -225,7 +225,14 @@ InFlightRemark RemarkEngine::emitOptimizationRemarkAnalysis(Location loc,
// RemarkEngine
//===----------------------------------------------------------------------===//
-void RemarkEngine::report(const Remark &&remark) {
+void RemarkEngine::report(const Remark &remark,
+ bool forcePrintPostponedRemarks) {
+ // Postponed remarks are shown at the end of pipeline, unless overridden.
+ if (remark.isPostponed() && !forcePrintPostponedRemarks) {
+ postponedRemarks.push_back(remark);
+ return;
+ }
+
----------------
joker-eph wrote:
```suggestion
void RemarkEngine::reportImpl(const Remark &remark) {
```
This is a private helper method if I read correctly, so better be named "Impl" here to make it clear. Also I think the postponing is better handled at call site below.
https://github.com/llvm/llvm-project/pull/157434
More information about the Mlir-commits
mailing list