rust/compiler
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
..
rustc
rustc_apfloat Stabilize iter::zip. 2021-12-14 18:50:31 -04:00
rustc_arena
rustc_ast Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_ast_lowering Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_ast_passes Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_ast_pretty Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
rustc_attr Remove unnecessary sigils around Symbol::as_str() calls. 2021-12-15 17:32:14 +11:00
rustc_borrowck Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
rustc_builtin_macros Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_codegen_cranelift Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20 2021-12-20 18:56:35 +01:00
rustc_codegen_gcc Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_codegen_llvm Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_codegen_ssa Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
rustc_const_eval Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
rustc_data_structures Auto merge of #91903 - tmiasko:bit-set-hash, r=jackh726 2021-12-21 05:42:10 +00:00
rustc_driver fix clippy::single_char_pattern perf findings 2021-12-14 12:40:28 +01:00
rustc_error_codes
rustc_errors Stabilize iter::zip. 2021-12-14 18:50:31 -04:00
rustc_expand Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_feature Stabilize destructuring_assignment 2021-12-14 22:38:51 -05:00
rustc_fs_util
rustc_graphviz fix clippy::single_char_pattern perf findings 2021-12-14 12:40:28 +01:00
rustc_hir Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_hir_pretty Auto merge of #89841 - cormacrelf:let-else-typed, r=nagisa 2021-12-17 22:12:34 +00:00
rustc_incremental Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_index Derive hash for BitSet and BitMatrix 2021-12-18 08:56:38 +01:00
rustc_infer Eliminate ObligationCauseData. 2021-12-20 09:29:20 +11:00
rustc_interface Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_lexer
rustc_lint Rollup merge of #91770 - TaKO8Ki:suggest-adding-cfg-test, r=joshtriplett 2021-12-21 08:33:39 +01:00
rustc_lint_defs Rollup merge of #91770 - TaKO8Ki:suggest-adding-cfg-test, r=joshtriplett 2021-12-21 08:33:39 +01:00
rustc_llvm
rustc_macros Remove in_band_lifetimes from rustc_middle 2021-12-15 19:50:43 -05:00
rustc_metadata Prefer visibility paths where items are not named _ 2021-12-20 19:50:15 -08:00
rustc_middle Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
rustc_mir_build Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
rustc_mir_dataflow Remove in_band_lifetimes from rustc_mir_dataflow 2021-12-16 14:29:43 -05:00
rustc_mir_transform Store a DefId instead of an AdtDef in AggregateKind::Adt 2021-12-22 14:36:34 -05:00
rustc_monomorphize Rollup merge of #91895 - pitaj:91867-monomorphize, r=Aaron1011 2021-12-19 17:38:34 +01:00
rustc_parse Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_parse_format
rustc_passes Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_plugin_impl
rustc_privacy Remove in_band_lifetimes from rustc_privacy 2021-12-14 12:38:06 -05:00
rustc_query_impl Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_query_system Stabilize iter::zip. 2021-12-14 18:50:31 -04:00
rustc_resolve Rollup merge of #91770 - TaKO8Ki:suggest-adding-cfg-test, r=joshtriplett 2021-12-21 08:33:39 +01:00
rustc_save_analysis Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_serialize Auto merge of #91626 - klensy:json-less-alloc, r=petrochenkov 2021-12-13 07:30:38 +00:00
rustc_session Auto merge of #92099 - matthiaskrgr:rollup-4gwv67m, r=matthiaskrgr 2021-12-19 12:36:56 +00:00
rustc_span Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_symbol_mangling Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obk 2021-12-19 09:31:37 +00:00
rustc_target Auto merge of #92099 - matthiaskrgr:rollup-4gwv67m, r=matthiaskrgr 2021-12-19 12:36:56 +00:00
rustc_trait_selection Fix bad caching of ~const Drop bounds 2021-12-21 13:25:43 +08:00
rustc_traits get rid of normalize_generic_arg... queries 2021-12-13 23:05:25 +01:00
rustc_ty_utils Use a const ParamEnv when in default_method_body_is_const 2021-12-17 20:42:48 +08:00
rustc_type_ir Fix HashStable implementation on InferTy 2021-12-13 20:36:17 -08:00
rustc_typeck Suggest glob-import if we need to import a trait, but it has no visible name 2021-12-20 19:50:15 -08:00