rust/compiler/rustc_codegen_ssa/src/mir
bors db2f9759f4 Auto merge of #122671 - Mark-Simulacrum:const-panic-msg, r=Nilstrieb
Codegen const panic messages as function calls

This skips emitting extra arguments at every callsite (of which there
can be many). For a librustc_driver build with overflow checks enabled,
this cuts 0.7MB from the resulting shared library (see [perf]).

A sample improvement from nightly:

```
        leaq    str.0(%rip), %rdi
        leaq    .Lalloc_d6aeb8e2aa19de39a7f0e861c998af13(%rip), %rdx
        movl    $25, %esi
        callq   *_ZN4core9panicking5panic17h17cabb89c5bcc999E@GOTPCREL(%rip)
```

to this PR:

```
        leaq    .Lalloc_d6aeb8e2aa19de39a7f0e861c998af13(%rip), %rdi
        callq   *_RNvNtNtCsduqIKoij8JB_4core9panicking11panic_const23panic_const_div_by_zero@GOTPCREL(%rip)
```

[perf]: https://perf.rust-lang.org/compare.html?start=a7e4de13c1785819f4d61da41f6704ed69d5f203&end=64fbb4f0b2d621ff46d559d1e9f5ad89a8d7789b&stat=instructions:u
2024-03-29 00:24:01 +00:00
..
analyze.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
block.rs Auto merge of #122671 - Mark-Simulacrum:const-panic-msg, r=Nilstrieb 2024-03-29 00:24:01 +00:00
constant.rs Avoid various uses of Option<Span> in favor of using DUMMY_SP in the few cases that used None 2024-03-18 09:34:08 +00:00
coverageinfo.rs Unbox and unwrap the contents of StatementKind::Coverage 2024-03-23 22:05:11 +11:00
debuginfo.rs Eagerly convert some ctors to use their specialized ctors 2024-03-22 11:12:01 -04:00
intrinsic.rs Auto merge of #122582 - scottmcm:swap-intrinsic-v2, r=oli-obk 2024-03-23 13:57:55 +00:00
locals.rs Implement async gen blocks 2023-12-08 17:23:25 +00:00
mod.rs Rollup merge of #122212 - erikdesjardins:byval-align2, r=wesleywiser 2024-03-14 20:00:18 +01:00
operand.rs only set noalias on Box with the global allocator 2024-03-05 15:03:33 +01:00
place.rs use GEP inbounds for ZST and DST field offsets 2024-03-04 09:32:33 -05:00
rvalue.rs Rollup merge of #122879 - maurer:callsite-instances, r=workingjubilee 2024-03-23 22:59:42 -07:00
statement.rs Unbox and unwrap the contents of StatementKind::Coverage 2024-03-23 22:05:11 +11:00