LLVM globals corresponding to miri allocations should be named alloc123. #69134
Labels
A-codegen
Area: Code generation
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
That is, if
-Zfewer-names
isfalse
(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.
The text was updated successfully, but these errors were encountered: