rust/compiler/rustc_codegen_ssa
bors 5a6c1aa2bc Auto merge of #121421 - saethlin:smarter-mono, r=oli-obk
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.
2024-03-13 05:07:26 +00:00
..
src Auto merge of #121421 - saethlin:smarter-mono, r=oli-obk 2024-03-13 05:07:26 +00:00
Cargo.toml bump itertools to 0.12 2024-03-08 12:34:05 +03:00
messages.ftl check that simd_insert/extract indices are in-bounds 2024-02-23 19:43:59 +01:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.