about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/impls/mod.rs
AgeCommit message (Collapse)AuthorLines
2025-09-07Reimplement DestinationPropagation according to live ranges.Camille GILLOT-1/+2
2024-12-13Rollup merge of #133938 - nnethercote:rustc_mir_dataflow-renamings, r=oli-obkMatthias Krüger-1/+2
`rustc_mir_dataflow` cleanups, including some renamings Some opinionated commits in this collection, let's see how we go. r? `@cjgillot`
2024-12-10Remove lifetimes from `BorrowckDomain`.Nicholas Nethercote-1/+2
They are only present because it's currently defined in terms of the domains of `Borrows` and `MaybeUninitializedPlaces` and `EverInitializedPlaces` via associated types. This commit introduces typedefs for those domains, avoiding the lifetimes.
2024-12-09Remove an out-of-date comment.Nicholas Nethercote-4/+0
The part about zero-sized structures is totally wrong. The rest of it has almost no explanatory value; there are better explanations in comments elsewhere.
2024-11-26Rollup merge of #133475 - nnethercote:MaybeStorage-improvements, r=lcnrMichael Goulet-1/+3
`MaybeStorage` improvements Minor dataflow improvements. r? `@tmiasko`
2024-11-26Move `always_storage_live_locals`.Nicholas Nethercote-1/+3
It's very closely related to `MaybeStorageLive` and `MaybeStorageDead`. It's weird that it's currently in a different module.
2024-11-22Remove the `DefinitelyInitializedPlaces` analysis.Nicholas Nethercote-2/+1
Its only use is in the `tests/ui/mir-dataflow/def_inits-1.rs` where it is tested via `rustc_peek_definite_init`. Also, it's probably buggy. It's supposed to be the inverse of `MaybeUninitializedPlaces`, and it mostly is, except that `apply_terminator_effect` is a little different, and `apply_switch_int_edge_effects` is missing. Unlike `MaybeUninitializedPlaces`, which is used extensively in borrow checking, any bugs in `DefinitelyInitializedPlaces` are easy to overlook because it is only used in one small test. This commit removes the analysis. It also removes `rustc_peek_definite_init`, `Dual` and `MeetSemiLattice`, all of which are no longer needed.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-5/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2023-08-16Move initialization dataflow impls into their own module.Camille GILLOT-706/+5
2023-08-16Simplify for_each_mut_borrow.Camille GILLOT-58/+9
2023-07-19Turn copy into moves during DSE.Camille GILLOT-0/+1
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-2/+6
2023-07-04bring back un_derefer and rewrite it againDrMeepster-4/+4
2023-05-18Take MIR dataflow analyses by mutable reference.Jason Newcomb-14/+14
2023-05-09Implement SSA-based reference propagation.Camille GILLOT-1/+1
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-1/+1
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-1/+1
2022-11-26Rewrite dest prop.Jakob Degen-2/+0
This fixes a number of correctness issues from the previous version. Additionally, we use a new strategy which has much better performance charactersitics and also finds more opportunities to apply the optimization.
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-4/+4
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-06-12Remove duplicated implementations of borrowed locals analysisTomasz Miąsko-0/+1
2022-05-24Add dead store elimination passJakob Degen-0/+1
2022-05-02fix most compiler/ doctestsElliot Roberts-36/+36
2022-03-30Spellchecking compiler commentsYuri Astrakhan-1/+1
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-3/+3
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
2022-02-26Rollup merge of #93870 - tmiasko:const-precise-live-drops-with-coverage, ↵Matthias Krüger-15/+18
r=ecstatic-morse Fix switch on discriminant detection in a presence of coverage counters Fixes #93848. r? ``@ecstatic-morse``
2022-02-23Introduce `ChunkedBitSet` and use it for some dataflow analyses.Nicholas Nethercote-7/+7
This reduces peak memory usage significantly for some programs with very large functions, such as: - `keccak`, `unicode_normalization`, and `match-stress-enum`, from the `rustc-perf` benchmark suite; - `http-0.2.6` from crates.io. The new type is used in the analyses where the bitsets can get huge (e.g. 10s of thousands of bits): `MaybeInitializedPlaces`, `MaybeUninitializedPlaces`, and `EverInitializedPlaces`. Some refactoring was required in `rustc_mir_dataflow`. All existing analysis domains are either `BitSet` or a trivial wrapper around `BitSet`, and access in a few places is done via `Borrow<BitSet>` or `BorrowMut<BitSet>`. Now that some of these domains are `ClusterBitSet`, that no longer works. So this commit replaces the `Borrow`/`BorrowMut` usage with a new trait `BitSetExt` containing the needed bitset operations. The impls just forward these to the underlying bitset type. This required fiddling with trait bounds in a few places. The commit also: - Moves `static_assert_size` from `rustc_data_structures` to `rustc_index` so it can be used in the latter; the former now re-exports it so existing users are unaffected. - Factors out some common "clear excess bits in the final word" functionality in `bit_set.rs`. - Uses `fill` in a few places instead of loops.
2022-02-19Adopt let else in more placesest31-12/+8
2022-02-10Fix switch on discriminant detection in a presence of coverage countersTomasz Miąsko-15/+18
2021-12-16Remove `in_band_lifetimes` from `rustc_mir_dataflow`LegionMammal978-1/+1
See #91867 for more information.
2021-12-03Add initial AST and MIR support for unwinding from inline assemblyAmanieu d'Antras-46/+44
2021-11-13Mark mutably borrowed places as maybe initializedDylan MacKenzie-6/+67
2021-11-03Remove `MaybeMutBorrowedLocals`Tomasz Miąsko-1/+1
2021-09-28More tracing instrumentationOli Scherer-12/+6
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-0/+712