rust/compiler
Guillaume Gomez 9da8f04da3
Rollup merge of #123797 - amandasystems:better-graphviz, r=oli-obk
Better graphviz output for SCCs and NLL constraints

This PR modifies the output for `-Z dump-mir-graphviz=yes`. Specifically, it changes the output of the files `.-------.nll.0.regioncx.all.dot` and `nll.0.regioncx.scc.dot` to be easier to read and contain some information that helped me during debugging. In particular:

- SCC indices are contracted to `SCC(n)` instead of `ConstraintSccIndex(n)` to compress the nodes
- SCC regions are in `{}` rather than `[]` (controversial since they are technically ordered by index, but I figured they're more sets than arrays conceptually since they're equivalence classes).
- For regions in other universes than the root, also show the region universe (as ?8/U1)
- For regions with external names, show the external name in parenthesis
- For the region graph where edges are locations, render the All variant of the enum without the file since it's extremely long and often destroys the rendering
- For region graph edge annotations for single locations, remove the wrapping around the Location variant and just add its contents since this can be unambiguously done

Example output (from the function `foo()` of `tests/ui/error-codes/E0582.rs`) for an SCC graph:
![a graph showing SCCs](https://github.com/rust-lang/rust/assets/102855/0b998338-0379-4829-b99e-d8105c094897)

...and for the constraints:
![a graph showing regions and their constraints](https://github.com/rust-lang/rust/assets/102855/e984c4ca-7aa2-4db2-9878-bf38fe8208d5)

This PR also gives `UniverseIndex`es the `is_root()` method since this is now an operation that happens three times in the borrowck crate.
2024-04-16 15:19:14 +02:00
..
rustc
rustc_abi Use the Align type when parsing alignment attributes 2024-04-01 03:05:55 +01:00
rustc_arena
rustc_ast Rollup merge of #123462 - fmease:rn-mod-sep-to-path-sep, r=nnethercote 2024-04-16 01:12:37 +02:00
rustc_ast_ir introduce Mutability::ptr_str 2024-04-10 18:51:09 +02:00
rustc_ast_lowering Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_ast_passes Rollup merge of #123841 - Kohei316:remove_qualifier_sugg, r=wesleywiser 2024-04-12 17:41:35 +02:00
rustc_ast_pretty Rollup merge of #123462 - fmease:rn-mod-sep-to-path-sep, r=nnethercote 2024-04-16 01:12:37 +02:00
rustc_attr Use the Align type when parsing alignment attributes 2024-04-01 03:05:55 +01:00
rustc_baked_icu_data
rustc_borrowck Rollup merge of #123797 - amandasystems:better-graphviz, r=oli-obk 2024-04-16 15:19:14 +02:00
rustc_builtin_macros builtin-derive: tag → discriminant 2024-04-14 11:34:15 +02:00
rustc_codegen_cranelift Merge commit '89f54caacf90e99fc8ba0d60a28bdadea3cfdf1e' into sync_cg_clif-2024-04-11 2024-04-11 10:42:48 +00:00
rustc_codegen_gcc Put PlaceValue into OperandValue::Ref, rather than 3 tuple fields 2024-04-11 00:10:10 -07:00
rustc_codegen_llvm Auto merge of #122917 - saethlin:atomicptr-to-int, r=nikic 2024-04-15 08:07:47 +00:00
rustc_codegen_ssa Rollup merge of #123721 - madsmtm:fix-visionos, r=davidtwco 2024-04-16 15:19:13 +02:00
rustc_const_eval Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_data_structures Rollup merge of #123934 - WaffleLapkin:graph-mini-refactor, r=fmease 2024-04-15 16:56:18 +01:00
rustc_driver
rustc_driver_impl Fix pretty hir for anon consts in diagnostics 2024-04-15 18:48:12 -04:00
rustc_error_codes Update compiler/rustc_error_codes/src/error_codes/E0384.md 2024-04-12 22:43:38 +09:00
rustc_error_messages Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_errors Rollup merge of #123204 - notriddle:notriddle/include-str-span, r=pnkfelix 2024-04-12 17:41:32 +02:00
rustc_expand Rollup merge of #123462 - fmease:rn-mod-sep-to-path-sep, r=nnethercote 2024-04-16 01:12:37 +02:00
rustc_feature remove some things that do not need to be 2024-04-11 21:09:52 +02:00
rustc_fluent_macro Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_fs_util
rustc_graphviz
rustc_hir Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_hir_analysis Rollup merge of #123926 - compiler-errors:no-ann, r=estebank 2024-04-16 01:12:38 +02:00
rustc_hir_pretty Fix pretty hir for anon consts in diagnostics 2024-04-15 18:48:12 -04:00
rustc_hir_typeck Rollup merge of #123989 - compiler-errors:type-dependent-def-id, r=oli-obk 2024-04-16 01:12:39 +02:00
rustc_incremental Auto merge of #122070 - Zoxc:dep-edges-from-previous, r=cjgillot 2024-04-05 11:11:17 +00:00
rustc_index Check x86_64 size assertions on aarch64, too 2024-04-03 16:53:03 +11:00
rustc_index_macros rustc_index: Add a ZERO constant to index types 2024-04-03 19:06:22 +03:00
rustc_infer Rollup merge of #123016 - compiler-errors:no-type-var-origin, r=lcnr 2024-04-16 01:12:36 +02:00
rustc_interface Rollup merge of #121694 - davidtwco:stabilize-relro-level, r=Mark-Simulacrum 2024-04-16 15:19:10 +02:00
rustc_lexer Silence redundant error on char literal that was meant to be a string in 2021 edition 2024-03-17 23:35:19 +00:00
rustc_lint nits 2024-04-15 16:52:51 -04:00
rustc_lint_defs Split back out unused_lifetimes -> redundant_lifetimes 2024-04-09 12:17:34 -04:00
rustc_llvm Fix UB in LLVM FFI when passing zero or >1 bundle 2024-04-14 22:18:33 -04:00
rustc_log bump tracing-tree to 0.3 2024-03-30 17:39:43 +03:00
rustc_macros Rename diagnostic derive things. 2024-03-11 10:06:34 +11:00
rustc_metadata linker: Remove laziness and caching from native search directory walks 2024-04-12 17:28:00 +03:00
rustc_middle Rollup merge of #123989 - compiler-errors:type-dependent-def-id, r=oli-obk 2024-04-16 01:12:39 +02:00
rustc_mir_build Remove TypeVariableOriginKind 2024-04-15 16:51:50 -04:00
rustc_mir_dataflow Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_mir_transform Rollup merge of #123934 - WaffleLapkin:graph-mini-refactor, r=fmease 2024-04-15 16:56:18 +01:00
rustc_monomorphize move the LargeAssignments lint logic into its own file 2024-04-14 18:09:44 +02:00
rustc_next_trait_solver Auto merge of #122077 - oli-obk:eager_opaque_checks4, r=lcnr 2024-04-08 23:01:50 +00:00
rustc_parse Rollup merge of #123462 - fmease:rn-mod-sep-to-path-sep, r=nnethercote 2024-04-16 01:12:37 +02:00
rustc_parse_format Check x86_64 size assertions on aarch64, too 2024-04-03 16:53:03 +11:00
rustc_passes Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_pattern_analysis Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_privacy Actually create ranged int types in the type system. 2024-04-08 12:02:19 +00:00
rustc_query_impl move QueryKeyStringCache from rustc_middle to rustc_query_impl, where it actually used 2024-04-11 14:33:48 +03:00
rustc_query_system remove some things that do not need to be 2024-04-11 21:09:52 +02:00
rustc_resolve Reorder error messages 2024-04-13 15:11:09 +01:00
rustc_sanitizers Update encode.rs 2024-04-14 14:56:41 +02:00
rustc_serialize Add add/sub methods that only panic with debug assertions to rustc 2024-04-13 17:03:12 +02:00
rustc_session Rollup merge of #121694 - davidtwco:stabilize-relro-level, r=Mark-Simulacrum 2024-04-16 15:19:10 +02:00
rustc_smir Rollup merge of #123659 - celinval:smir-fix-intrinsic, r=oli-obk 2024-04-10 16:15:23 +02:00
rustc_span Auto merge of #123175 - Nilstrieb:debug-strict-overflow, r=wesleywiser 2024-04-13 17:18:42 +00:00
rustc_symbol_mangling Update v0.rs 2024-04-14 15:01:04 +02:00
rustc_target Rollup merge of #123721 - madsmtm:fix-visionos, r=davidtwco 2024-04-16 15:19:13 +02:00
rustc_trait_selection Fail candidate assembly for erroneous types 2024-04-16 12:42:48 +05:30
rustc_traits Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
rustc_transmute Rollup merge of #123367 - jswrenn:layoutify, r=compiler-errors 2024-04-08 22:06:21 +02:00
rustc_ty_utils Fail candidate assembly for erroneous types 2024-04-16 12:42:48 +05:30
rustc_type_ir Rollup merge of #123797 - amandasystems:better-graphviz, r=oli-obk 2024-04-16 15:19:14 +02:00
stable_mir Rollup merge of #123659 - celinval:smir-fix-intrinsic, r=oli-obk 2024-04-10 16:15:23 +02:00