Closed
Description
That is, if -Zfewer-names
is false
(usually only because of --emit=llvm-ir
), we should use the same name for LLVM globals we generate out of miri allocs as #67133 does in MIR output (allocN
).
This way, we can easily see the mapping between MIR and LLVM IR (and it shouldn't be any costlier for regular compilation, which would continue to use unnamed globals).
Relevant code (btw this could probably use extra caching keyed on AllocId
?):
rust/src/librustc_codegen_llvm/common.rs
Lines 260 to 267 in be493fe
cc @rust-lang/wg-mir-opt @bjorn3
This issue has been assigned to @chrissimpkins via this comment.