diff options
| author | bors <bors@rust-lang.org> | 2024-06-11 02:03:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-11 02:03:12 +0000 |
| commit | fa1681c9f6a66f0240c46c98bfef6209c9d6df23 (patch) | |
| tree | 6c543041d9010fdf1956d23f607bc4eaa1065b06 /compiler/rustc_query_impl/src | |
| parent | b5b13568fb5da4ac988bde370008d6134d3dfe6c (diff) | |
| parent | 8fbab183d7202880f87f6cc722d63cc4bbd1d140 (diff) | |
| download | rust-fa1681c9f6a66f0240c46c98bfef6209c9d6df23.tar.gz rust-fa1681c9f6a66f0240c46c98bfef6209c9d6df23.zip | |
Auto merge of #125910 - scottmcm:single-use-consts, r=saethlin
Add `SingleUseConsts` mir-opt pass The goal here is to make a pass that can be run in debug builds to simplify the common case of constants that are used just once -- that doesn't need SSA handling and avoids any potential downside of multi-use constants. In particular, to simplify the `if T::IS_ZST` pattern that's common in the standard library. By also handling the case of constants that are *never* actually used this fully replaces the `ConstDebugInfo` pass, since it has all the information needed to do that naturally from the traversal it needs to do anyway. This is roughly a wash on instructions on its own (a couple regressions, a few improvements https://github.com/rust-lang/rust/pull/125910#issuecomment-2144963361), with a bunch of size improvements. So I'd like to land it as its own PR, then do follow-ups to take more advantage of it (in the inliner, cg_ssa, etc). r? `@saethlin`
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions
