rust/compiler
Jack Wrenn 957b5488a5 transmutability: remove NFA intermediate representation
Prior to this commit, the transmutability analysis used an intermediate
NFA representation of type layout. We then determinized this
representation into a DFA, upon which we ran the core transmutability
analysis. Unfortunately, determinizing NFAs is expensive. In this
commit, we avoid NFAs entirely by observing that Rust `union`s are the
only source of nondeterminism and that it is comparatively cheap to
compute the DFA union of DFAs.

We also implement Graphviz DOT debug formatting of DFAs.

Fixes rust-lang/project-safe-transmute#23
Fixes rust-lang/project-safe-transmute#24
2025-04-20 03:06:59 +00:00
..
rustc
rustc_abi Initial UnsafePinned/UnsafeUnpin impl [Part 1: Libs] 2025-04-13 01:11:04 -04:00
rustc_arena
rustc_ast Rollup merge of #139392 - compiler-errors:raw-expr, r=oli-obk 2025-04-14 18:15:31 +02:00
rustc_ast_ir Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_ast_lowering Rollup merge of #139770 - nnethercote:rename-LifetimeName, r=BoxyUwU 2025-04-17 00:14:26 +02:00
rustc_ast_passes Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr 2025-04-17 11:21:54 +00:00
rustc_ast_pretty Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov 2025-04-14 03:56:55 +00:00
rustc_attr_data_structures add rustc_macro_edition_2021 2025-03-19 17:37:35 +01:00
rustc_attr_parsing Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr 2025-04-17 11:21:54 +00:00
rustc_baked_icu_data
rustc_borrowck Rollup merge of #139770 - nnethercote:rename-LifetimeName, r=BoxyUwU 2025-04-17 00:14:26 +02:00
rustc_builtin_macros Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_codegen_cranelift Move has_self field to hir::AssocKind::Fn. 2025-04-14 16:13:04 +10:00
rustc_codegen_gcc Prepend temp files with a string per invocation of rustc 2025-04-07 20:48:40 +00:00
rustc_codegen_llvm Revert "Deduplicate template parameter creation" 2025-04-15 21:00:11 +03:00
rustc_codegen_ssa fix multiple #[repr(align(N))] on functions 2025-04-16 12:16:40 +02:00
rustc_const_eval Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_data_structures Switch to diagnostic::on_unimplemented 2025-04-14 01:38:18 +02:00
rustc_driver Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_driver_impl Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov 2025-04-14 03:56:55 +00:00
rustc_error_codes error on unsafe attributes in pre-2024 editions 2025-04-13 01:22:59 +02:00
rustc_error_messages update cfgs 2025-04-09 12:29:59 +01:00
rustc_errors Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_expand Rollup merge of #139671 - m-ou-se:proc-macro-span, r=dtolnay 2025-04-15 15:47:27 +10:00
rustc_feature Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr 2025-04-17 11:21:54 +00:00
rustc_fluent_macro Replace proc_macro::SourceFile by Span::{file, local_file}. 2025-04-11 15:07:08 +02:00
rustc_fs_util
rustc_graphviz
rustc_hashes
rustc_hir Rename LifetimeName as LifetimeKind. 2025-04-16 07:16:40 +10:00
rustc_hir_analysis Rollup merge of #139770 - nnethercote:rename-LifetimeName, r=BoxyUwU 2025-04-17 00:14:26 +02:00
rustc_hir_pretty Fix HIR pretty-printing of fns with just a variadic arg. 2025-04-15 10:41:10 +10:00
rustc_hir_typeck Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_incremental Remove safe remove 2025-04-14 18:47:15 +00:00
rustc_index Use {Decodable,Encodable}_NoContext in type_ir 2025-03-15 06:34:36 +00:00
rustc_index_macros In rustc_mir_tranform, iterate over index newtypes instead of ints 2025-04-12 11:53:07 +00:00
rustc_infer Auto merge of #139768 - compiler-errors:split-fold, r=lcnr 2025-04-16 01:46:01 +00:00
rustc_interface Stabilize -Zdwarf-version as -Cdwarf-version 2025-04-14 21:26:41 -05:00
rustc_lexer Replace rustc_lexer/unescape with rustc-literal-escaper crate 2025-04-04 14:44:45 +02:00
rustc_lint Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr 2025-04-17 11:21:54 +00:00
rustc_lint_defs Rollup merge of #139001 - folkertdev:naked-function-rustic-abi, r=traviscross,compiler-errors 2025-04-13 17:37:52 -04:00
rustc_llvm Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
rustc_log Use -Wunused_crate_dependencies for compiler crates. 2025-03-20 08:59:43 +11:00
rustc_macros Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_metadata Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk 2025-04-15 15:47:27 +10:00
rustc_middle Rollup merge of #139770 - nnethercote:rename-LifetimeName, r=BoxyUwU 2025-04-17 00:14:26 +02:00
rustc_mir_build Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_mir_dataflow Remove support for #[rustc_mir(borrowck_graphviz_format="gen_kill")]. 2025-04-16 08:35:34 +10:00
rustc_mir_transform Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_monomorphize Rollup merge of #139818 - compiler-errors:normalize-tails, r=oli-obk 2025-04-15 21:16:03 +02:00
rustc_next_trait_solver Rollup merge of #139900 - lcnr:normalizes-to-where-bounds-unproductive, r=compiler-errors 2025-04-17 00:16:24 +02:00
rustc_parse Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr 2025-04-17 11:21:54 +00:00
rustc_parse_format Update rustc-literal-escaper version to 0.0.2 2025-04-04 22:26:10 +02:00
rustc_passes Rollup merge of #139944 - shepmaster:eager-diagnostics, r=nnethercote 2025-04-17 06:25:18 +02:00
rustc_pattern_analysis Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
rustc_privacy Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_query_impl Auto merge of #124141 - nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov 2025-04-14 03:56:55 +00:00
rustc_query_system Rollup merge of #139236 - Zoxc:anon-counter, r=davidtwco 2025-04-17 00:14:24 +02:00
rustc_resolve Rollup merge of #139084 - petrochenkov:transpaque, r=davidtwco 2025-04-17 00:14:24 +02:00
rustc_sanitizers Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk 2025-04-15 15:47:27 +10:00
rustc_serialize Bump FileEncoder buffer size to 64 kB 2025-04-10 18:52:03 +02:00
rustc_session Rollup merge of #139876 - blyxyas:write_type_sizes, r=nnethercote 2025-04-16 13:45:30 +02:00
rustc_smir Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk 2025-04-15 15:47:27 +10:00
rustc_span Auto merge of #139940 - matthiaskrgr:rollup-rd4d3fn, r=matthiaskrgr 2025-04-17 04:52:34 +00:00
rustc_symbol_mangling Rollup merge of #139848 - nnethercote:kw-Empty-5, r=compiler-errors 2025-04-15 21:16:05 +02:00
rustc_target Auto merge of #139940 - matthiaskrgr:rollup-rd4d3fn, r=matthiaskrgr 2025-04-17 04:52:34 +00:00
rustc_trait_selection Auto merge of #139949 - matthiaskrgr:rollup-pxc5tsx, r=matthiaskrgr 2025-04-17 11:21:54 +00:00
rustc_traits re-use sized fast path 2025-04-09 10:42:26 +00:00
rustc_transmute transmutability: remove NFA intermediate representation 2025-04-20 03:06:59 +00:00
rustc_ty_utils Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obk 2025-04-15 15:47:27 +10:00
rustc_type_ir Auto merge of #139768 - compiler-errors:split-fold, r=lcnr 2025-04-16 01:46:01 +00:00
rustc_type_ir_macros Split TypeFolder and FallibleTypeFolder 2025-04-15 18:30:35 +00:00
stable_mir let rustc_smir host stable_mir for refactoring 2025-04-05 18:23:07 +08:00