rust/compiler/rustc_codegen_ssa/src
bors d8fc819247 Auto merge of #109466 - davidlattimore:inline-arg-via-var-debug-info, r=wesleywiser
Preserve argument indexes when inlining MIR

We store argument indexes on VarDebugInfo. Unlike the previous method of relying on the variable index to know whether a variable is an argument, this survives MIR inlining.

We also no longer check if var.source_info.scope is the outermost scope. When a function gets inlined, the arguments to the inner function will no longer be in the outermost scope. What we care about though is whether they were in the outermost scope prior to inlining, which we know by whether we assigned an argument index.

Fixes #83217

I considered using `Option<NonZeroU16>` instead of `Option<u16>` to store the index. I didn't because `TypeFoldable` isn't implemented for `NonZeroU16` and because it looks like due to padding, it currently wouldn't make any difference. But I indexed from 1 anyway because (a) it'll make it easier if later it becomes worthwhile to use a `NonZeroU16` and because the arguments were previously indexed from 1, so it made for a smaller change.

This is my first PR on rust-lang/rust, so apologies if I've gotten anything not quite right.
2023-04-13 01:51:27 +00:00
..
back Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb 2023-04-12 20:56:21 +02:00
coverageinfo Use &IndexSlice instead of &IndexVec where possible 2023-04-02 17:35:37 -07:00
debuginfo s/eval_usize/eval_target_usize/ for clarity 2023-02-14 08:51:19 +00:00
mir Auto merge of #109466 - davidlattimore:inline-arg-via-var-debug-info, r=wesleywiser 2023-04-13 01:51:27 +00:00
traits Allow transmutes to produce OperandValues instead of always using allocas 2023-04-04 18:44:29 -07:00
base.rs Use FieldIdx in various things related to aggregates 2023-04-01 20:32:50 -07:00
codegen_attrs.rs Skip no_mangle if the item has no name. 2023-03-28 18:05:12 +00:00
common.rs DELETE - fn span_invalid_monomorphization_error and localize intrinsics macros 2022-12-27 20:59:22 -05:00
errors.rs Fix typos in compiler 2023-04-10 22:02:52 +02:00
glue.rs Use size_of_val instead of manual calculation 2023-03-17 19:55:49 -07:00
lib.rs Stabilize a portion of 'once_cell' 2023-03-29 18:04:44 -04:00
meth.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
mono_item.rs Store a LocalDefId in hir::AnonConst. 2022-11-13 14:06:11 +00:00
target_features.rs Add riscv relax target feature 2023-04-02 07:30:42 -07:00