[Mlir-commits] [mlir] [MLIR] Introduce RemarkEngine + pluggable remark streaming (YAML/Bitstream) (PR #152474)

Guray Ozen llvmlistbot at llvm.org
Thu Aug 14 02:52:48 PDT 2025


================
@@ -0,0 +1,152 @@
+# Remark Infrastructure
+
+[TOC]
+
+Remarks are structured, human- and machine-readable notes emitted by passes to
+explain what was optimized, what was missed, and why. The `RemarkEngine`
+collects finalized remarks during compilation and forwards them to a pluggable
+streamer. A default streamer integrates LLVM’s `llvm::remarks` so you can stream
+while a pass runs and serialize to disk (YAML or LLVM bitstream) for tooling.
+
+**Key points**
+
+- **Opt-in**: Disabled by default; zero overhead unless enabled.
+- **Per-context**: Configured on `MLIRContext`.
+- **Formats**: Custom streamers, or LLVM’s Remark engine (YAML / Bitstream).
+- **Kinds**: `Pass`, `Missed`, `Failure`, `Analysis`.
----------------
grypp wrote:

I think `Failure != Missed`

Let me try to convince you with this example: Suppose the user specifies `-use-max-register=100`: 
```
$ your-compiler -use-max-register=100

[Failed]  { Limiting to use-max-register=100 failed;
            ; it now uses 104 registers for better performance ... }
```



https://github.com/llvm/llvm-project/pull/152474


More information about the Mlir-commits mailing list