diff options
| author | bors <bors@rust-lang.org> | 2023-04-23 11:26:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-04-23 11:26:01 +0000 |
| commit | 9e540df7931a32ca286eb2e907afde78b718fd17 (patch) | |
| tree | 8fcbde75f770f1283b96c9f98a418c7129584167 /compiler/rustc_codegen_ssa/src | |
| parent | f12a7fa00fb7a99a92661bb9ae2b768dac0c5d40 (diff) | |
| parent | b8c67d82d3b4f152a38711de3466875b270e33de (diff) | |
| download | rust-9e540df7931a32ca286eb2e907afde78b718fd17.tar.gz rust-9e540df7931a32ca286eb2e907afde78b718fd17.zip | |
Auto merge of #107404 - cjgillot:const-debuginfo, r=oli-obk
Turn on ConstDebugInfo pass. Split from https://github.com/rust-lang/rust/pull/103657 Moving those constant into debuginfo allows to shrink the number of locals and the actual size of the MIR body.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/debuginfo.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs index d049bafb821..b67230cf498 100644 --- a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs +++ b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs @@ -494,6 +494,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { let Some(dbg_loc) = self.dbg_loc(var.source_info) else { continue }; if let Ok(operand) = self.eval_mir_constant_to_operand(bx, &c) { + self.set_debug_loc(bx, var.source_info); let base = Self::spill_operand_to_stack( &operand, Some(var.name.to_string()), |
