rust/compiler/rustc_monomorphize/src
bors 13c46fd0b0 Auto merge of #142893 - Mark-Simulacrum:no-const-collect, r=oli-obk
Stop collecting unmentioned constants

This avoids generating useless dead LLVM IR. This appears to have regressed and/or been introduced in rust-lang/rust#53821 (unfortunately a very large PR - I don't see any direct discussion there of this particular change), but as far as I can tell is at least no longer necessary -- or we lack test coverage -- because none of our UI tests indicate diagnostics regressions. The adjusted codegen-units test has comments explicitly noting that these items should *not* be collected ("These are not referenced, so they do not produce mono-items").

I noticed this while looking at libcore LLVM IR we generate, which contained dead code references to the NOOP Waker item, which is never used inside libcore. Producing LLVM IR for it during libcore's compilation, only for that IR to get deleted by LLVM as unused, isn't useful. Note that the IR is generally all marked internal, too.
2025-06-27 12:57:05 +00:00
..
mono_checks Remove all support for wasm's legacy ABI 2025-06-14 09:57:06 +00:00
partitioning working dupv and dupvonly for fwd mode 2025-04-16 17:13:31 -04:00
collector.rs Auto merge of #142893 - Mark-Simulacrum:no-const-collect, r=oli-obk 2025-06-27 12:57:05 +00:00
errors.rs Remove all support for wasm's legacy ABI 2025-06-14 09:57:06 +00:00
lib.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
partitioning.rs Limit the size of cgu names when using the -Zhuman-readable-cgu-names option 2025-05-26 23:29:26 +01:00
util.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00