[llvm] [Docs] Document persistent metadata printing (PR #220967)

Yaxun Liu via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 07:57:36 PDT 2026


yxsamliu wrote:

@zmodem Re: metadata numbering

Persistent IDs make pass dumps easier to compare: unchanged metadata keeps the same number as passes modify the module. Canonical numbering uses consecutive numbers with no gaps, in a consistent order, making final IR easier to read.

For Rust’s final IR output, I’d call `Module::renumberMetadataForAssembly()` before `Module::print()`, as LLVM’s final-output paths do. Tests of intermediate dumps may need updated expectations.

I’ll clarify the motivation and this recommendation in the release note.

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


More information about the llvm-commits mailing list