[llvm] c4babfb - [Docs] Document persistent metadata printing (#220967)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 05:54:06 PDT 2026
Author: Yaxun (Sam) Liu
Date: 2026-09-08T08:53:59-04:00
New Revision: c4babfb3128b9b167e469003028dbaf4e14a6167
URL: https://github.com/llvm/llvm-project/commit/c4babfb3128b9b167e469003028dbaf4e14a6167
DIFF: https://github.com/llvm/llvm-project/commit/c4babfb3128b9b167e469003028dbaf4e14a6167.diff
LOG: [Docs] Document persistent metadata printing (#220967)
Document how persistent metadata IDs affect intermediate and standalone
textual output. Final assembly output remains canonically renumbered.
Follow-up to #220390.
Added:
Modified:
llvm/docs/ReleaseNotes.md
Removed:
################################################################################
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 9f1611e4cab7f..607bb0e30b058 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -52,6 +52,26 @@ Makes programs 10x faster by doing Special New Thing.
### Changes to the LLVM IR
+* LLVM now assigns persistent print IDs to metadata nodes. Reusing these IDs
+ avoids repeated module-wide scans to rebuild metadata numbering, which can
+ significantly speed up debug and pass printing on large modules. Keeping
+ the IDs stable also makes repeated output easier to compare: unchanged
+ metadata keeps the same number as passes modify the module. The numbering
+ and definition order can
diff er from earlier releases, so tests of
+ intermediate output may need updated expectations.
+
+ LLVM's standard final-output paths renumber metadata in canonical order.
+ This gives consecutive IDs with no gaps and makes the final IR easier to
+ read. C++ clients that call `Module::print()` directly do not renumber
+ automatically. For final IR output, these clients should call
+ `Module::renumberMetadataForAssembly()` immediately before printing. Keep
+ persistent IDs for intermediate dumps so their numbering remains stable.
+
+ Standalone metadata printing now uses numbered definitions such as
+ `!1 = !DIFile(...)` instead of pointer-based forms such as
+ `<0x...> = !DIFile(...)`. Tools and tests that compare such output may need
+ updating.
+
* Added `llvm.vector.reduce.fmaximumnum` and `llvm.vector.reduce.fminimumnum`
intrinsics, the reduction variants of `llvm.maximumnum` and
`llvm.minimumnum`.
More information about the llvm-commits
mailing list