diff options
| author | bors <bors@rust-lang.org> | 2024-03-13 05:07:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-13 05:07:26 +0000 |
| commit | 5a6c1aa2bccfcbfa42f486a54c09bd698378faef (patch) | |
| tree | db71d79324c8bf1e111842bc3d2634488fe69c5e /compiler/rustc_builtin_macros/src/assert.rs | |
| parent | d3555f3d8e555ce488bbf8eee5eccdb66a464e14 (diff) | |
| parent | 81d630453b08253dc1d6bcc4139dde16530887d9 (diff) | |
| download | rust-5a6c1aa2bccfcbfa42f486a54c09bd698378faef.tar.gz rust-5a6c1aa2bccfcbfa42f486a54c09bd698378faef.zip | |
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.
Diffstat (limited to 'compiler/rustc_builtin_macros/src/assert.rs')
0 files changed, 0 insertions, 0 deletions
