rust/compiler
bors 68c8fdaac0 Auto merge of #108293 - Jarcho:mut_analyses, r=eholk
Take MIR dataflow analyses by mutable reference

The main motivation here is any analysis requiring dynamically sized scratch memory to work. One concrete example would be pointer target tracking, where tracking the results of a dereference can result in multiple possible targets. This leads to processing multi-level dereferences requiring the ability to handle a changing number of potential targets per step. A (simplified) function for this would be `fn apply_deref(potential_targets: &mut Vec<Target>)` which would use the scratch space contained in the analysis to send arguments and receive the results.

The alternative to this would be to wrap everything in a `RefCell`, which is what `MaybeRequiresStorage` currently does. This comes with a small perf cost and loses the compiler's guarantee that we don't try to take multiple borrows at the same time.

For the implementation:
* `AnalysisResults` is an unfortunate requirement to avoid an unconstrained type parameter error.
* `CloneAnalysis` could just be `Clone` instead, but that would result in more work than is required to have multiple cursors over the same result set.
* `ResultsVisitor` now takes the results type on in each function as there's no other way to have access to the analysis without cloning it. This could use an associated type rather than a type parameter, but the current approach makes it easier to not care about the type when it's not necessary.
* `MaybeRequiresStorage` now no longer uses a `RefCell`, but the graphviz formatter now does. It could be removed, but that would require even more changes and doesn't really seem necessary.
2023-06-08 23:58:44 +00:00
..
rustc
rustc_abi Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems 2023-06-08 00:38:50 -04:00
rustc_apfloat
rustc_arena
rustc_ast Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
rustc_ast_lowering Separate AnonConst from ConstBlock in HIR. 2023-06-02 21:25:18 +00:00
rustc_ast_passes cleanup 2023-06-03 09:44:30 +08:00
rustc_ast_pretty
rustc_attr
rustc_baked_icu_data
rustc_borrowck Auto merge of #108293 - Jarcho:mut_analyses, r=eholk 2023-06-08 23:58:44 +00:00
rustc_builtin_macros Remove accidental comment 2023-06-07 17:16:34 +00:00
rustc_codegen_cranelift Updated cranelift codegen to reflect modified trait signature 2023-06-04 21:54:38 -04:00
rustc_codegen_gcc Updated cranelift codegen to reflect modified trait signature 2023-06-04 21:54:38 -04:00
rustc_codegen_llvm Auto merge of #110040 - ndrewxie:issue-84447-partial-1, r=lcnr,michaelwoerister 2023-06-08 07:30:03 +00:00
rustc_codegen_ssa Auto merge of #112415 - GuillaumeGomez:rollup-5pa9frd, r=GuillaumeGomez 2023-06-08 10:31:52 +00:00
rustc_const_eval Auto merge of #108293 - Jarcho:mut_analyses, r=eholk 2023-06-08 23:58:44 +00:00
rustc_data_structures Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems 2023-06-08 00:38:50 -04:00
rustc_driver fix spelling error 2023-06-05 16:01:09 +02:00
rustc_driver_impl Don't use compile_error as print 2023-06-07 18:59:31 +00:00
rustc_error_codes Implement custom diagnostic for ConstParamTy 2023-06-01 18:21:42 +00:00
rustc_error_messages Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
rustc_errors Respect RUST_BACKTRACE for delayed bugs 2023-06-06 19:24:33 +00:00
rustc_expand Rollup merge of #112396 - WaffleLapkin:track_more_diagnostics, r=compiler-errors 2023-06-08 10:15:13 +02:00
rustc_feature cleanup 2023-06-03 09:44:30 +08:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems 2023-06-08 00:38:50 -04:00
rustc_hir_analysis Rollup merge of #109953 - thomcc:thomcc/typeid128, r=WaffleLapkin 2023-06-08 12:36:17 +02:00
rustc_hir_pretty Separate AnonConst from ConstBlock in HIR. 2023-06-02 21:25:18 +00:00
rustc_hir_typeck Auto merge of #112420 - matthiaskrgr:rollup-spiavw5, r=matthiaskrgr 2023-06-08 13:30:52 +00:00
rustc_incremental Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems 2023-06-08 00:38:50 -04:00
rustc_index
rustc_infer Rollup merge of #112122 - compiler-errors:next-coherence, r=lcnr 2023-06-07 18:01:29 +05:30
rustc_interface Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems 2023-06-08 00:38:50 -04:00
rustc_lexer
rustc_lint Rollup merge of #112343 - GuillaumeGomez:extern-crate-missing-docs, r=notriddle 2023-06-06 22:00:20 +02:00
rustc_lint_defs Remove const eval limit and implement an exponential backoff lint instead 2023-05-31 10:24:17 +00:00
rustc_llvm Add SafeStack support to rustc 2023-05-26 15:18:54 -04:00
rustc_log
rustc_macros Use translatable diagnostics in rustc_const_eval 2023-06-01 14:45:18 +00:00
rustc_metadata Auto merge of #109005 - Nilstrieb:dont-forgor-too-much-from-cfg, r=petrochenkov 2023-06-07 17:38:57 +00:00
rustc_middle Rollup merge of #109953 - thomcc:thomcc/typeid128, r=WaffleLapkin 2023-06-08 12:36:17 +02:00
rustc_mir_build Show note for type ascription interpreted as a constant pattern, not a new variable 2023-06-04 20:49:30 +08:00
rustc_mir_dataflow Auto merge of #108293 - Jarcho:mut_analyses, r=eholk 2023-06-08 23:58:44 +00:00
rustc_mir_transform Auto merge of #108293 - Jarcho:mut_analyses, r=eholk 2023-06-08 23:58:44 +00:00
rustc_monomorphize Clarify follow_inlining. 2023-06-02 13:07:30 +10:00
rustc_parse Fix suggestion for matching struct with .. on both ends 2023-06-03 15:02:13 +08:00
rustc_parse_format
rustc_passes Rollup merge of #112081 - obeis:doc-test-literal, r=compiler-errors 2023-06-05 23:47:57 +02:00
rustc_plugin_impl
rustc_privacy Rename impl_defaultness to defaultness 2023-06-01 06:14:06 +00:00
rustc_query_impl deps: bump crates 2023-05-26 13:03:47 +03:00
rustc_query_system Rollup merge of #112333 - Zoxc:try_collect_active_jobs-deadlock, r=cjgillot 2023-06-08 12:36:18 +02:00
rustc_resolve Remember names of cfg-ed out items to mention them in diagnostics 2023-06-01 19:17:19 +02:00
rustc_serialize
rustc_session Auto merge of #110040 - ndrewxie:issue-84447-partial-1, r=lcnr,michaelwoerister 2023-06-08 07:30:03 +00:00
rustc_smir Rollup merge of #111250 - spastorino:smir-terminator-2, r=oli-obk 2023-06-06 22:00:18 +02:00
rustc_span Auto merge of #111567 - Urgau:uplift_cast_ref_to_mut, r=b-naber 2023-06-01 01:27:32 +00:00
rustc_symbol_mangling Rollup merge of #112182 - rcvalle:rust-cfi-fix-111185, r=compiler-errors 2023-06-02 18:12:45 +02:00
rustc_target Auto merge of #111698 - Amanieu:force-static-lib, r=petrochenkov 2023-06-07 22:02:24 +00:00
rustc_trait_selection Rollup merge of #112122 - compiler-errors:next-coherence, r=lcnr 2023-06-07 18:01:29 +05:30
rustc_traits Make TraitEngine::new use the right solver, add compare mode 2023-06-06 18:43:20 +00:00
rustc_transmute
rustc_ty_utils Separate AnonConst from ConstBlock in HIR. 2023-06-02 21:25:18 +00:00
rustc_type_ir better TyKind::Debug 2023-05-26 18:55:02 +01:00