[Mlir-commits] [mlir] [MLIR] Implement remark emitting policies in MLIR (PR #161202)
Guray Ozen
llvmlistbot at llvm.org
Mon Sep 29 12:54:31 PDT 2025
================
@@ -406,9 +429,15 @@ class RemarkEngine {
/// main remark streamer.
~RemarkEngine();
+ /// Shutdown the remark engine. This will finalize the remark engine and
+ /// close the output file.
+ void shutdown();
----------------
grypp wrote:
When the emissions policy is final, we now defer emitting remarks until the very end.
In my previous PR, postponed remarks were emitted during MLIRContext destruction. That turned out to be problematic, since it required accessing the MLIRContext while it was being destroyed.
In this PR, I introduced a finalize() function that must be called explicitly before destroying the MLIRContext.
I’m happy to adjust if there’s a better approach.
https://github.com/llvm/llvm-project/pull/161202
More information about the Mlir-commits
mailing list