Avoid lowering code under dead SwitchInt targets The objective of this PR is to detect and eliminate code which is guarded by an `if false`, even if that `false` is a constant which is not known until monomorphization, or is `intrinsics::debug_assertions()`. The effect of this is that we generate no LLVM IR the standard library's unsafe preconditions, when they are compiled in a build where they should be immediately optimized out. This mono-time optimization ensures that builds which disable debug assertions do not grow a linkage requirement against `core`, which compiler-builtins currently needs: https://github.com/rust-lang/rust/issues/121552 This revives the codegen side of https://github.com/rust-lang/rust/pull/91222 as planned in https://github.com/rust-lang/rust/issues/120848. |
||
|---|---|---|
| .. | ||
| back | ||
| debuginfo | ||
| mir | ||
| traits | ||
| assert_module_sources.rs | ||
| base.rs | ||
| codegen_attrs.rs | ||
| common.rs | ||
| errors.rs | ||
| lib.rs | ||
| meth.rs | ||
| mono_item.rs | ||
| size_of_val.rs | ||
| target_features.rs | ||