1
Fork 0
rust/compiler/rustc_codegen_ssa/src
Aaron Hill cac431ba75
Store a DefId instead of an AdtDef in AggregateKind::Adt
The `AggregateKind` enum ends up in the final mir `Body`. Currently,
any changes to `AdtDef` (regardless of how significant they are)
will legitimately cause the overall result of `optimized_mir` to change,
invalidating any codegen re-use involving that mir.

This will get worse once we start hashing the `Span` inside `FieldDef`
(which is itself contained in `AdtDef`).

To try to reduce these kinds of invalidations, this commit changes
`AggregateKind::Adt` to store just the `DefId`, instead of the full
`AdtDef`. This allows the result of `optimized_mir` to be unchanged
if the `AdtDef` changes in a way that doesn't actually affect any
of the MIR we build.
2021-12-22 14:36:34 -05:00
..
back Rollup merge of #92029 - nikic:section-flags-fix, r=davidtwco 2021-12-19 17:38:35 +01:00
coverageinfo Remove in_band_lifetimes from rustc_codegen_ssa 2021-12-15 00:41:41 -05:00
debuginfo Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
mir Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
traits Rollup merge of #91885 - LegionMammal978:less-inband-codegen_ssa, r=workingjubilee 2021-12-15 10:56:59 +01:00
base.rs Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
common.rs Remove redundant [..]s 2021-12-09 00:01:29 +01:00
glue.rs Attach range metadata to alignment loads from vtables 2021-12-05 16:07:27 -05:00
lib.rs Remove in_band_lifetimes from rustc_codegen_ssa 2021-12-15 00:41:41 -05:00
meth.rs Auto merge of #89597 - michaelwoerister:improve-vtable-debuginfo, r=wesleywiser 2021-10-11 04:31:47 +00:00
mono_item.rs rustc_target: move LayoutOf to ty::layout. 2021-09-02 01:17:14 +03:00
target_features.rs asm: Allow using r9 (ARM) and x18 (AArch64) if they are not reserved by 2021-12-10 00:51:39 +00:00