about summary refs log tree commit diff
path: root/src/librustc_mir/transform/rustc_peek.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-325/+0
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-1/+1
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-6/+7
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-05-04Import dataflow impls via the `impls` submoduleDylan MacKenzie-4/+4
2020-05-03Support liveness in `rustc_peek` testsDylan MacKenzie-14/+50
2020-05-03Support backward dataflow analysesDylan MacKenzie-1/+1
2020-04-24Replace filter_map().next() calls with find_map()Josh Stone-2/+1
These are semantically the same, but `find_map()` is more concise.
2020-04-22Use `Body` everywhereDylan MacKenzie-2/+2
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-2/+4
2020-03-31Use Place directly in peek_at, it's CopySantiago Pastorino-4/+4
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-2/+2
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-2/+2
2020-03-26Update imports from `dataflow::generic` to `dataflow`Dylan MacKenzie-1/+1
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-1/+1
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-13Rename `MaybeBorrowedLocals` constructorsDylan MacKenzie-1/+1
2020-02-12Reenable peek test for indirect mutation analysisDylan MacKenzie-20/+6
This uses the new `MaybeMutBorrowedLocals` pass but we keep the `rustc_peek_indirectly_mutable` since the two are interchangable except when inspecting a local after it has been marked `StorageDead`.
2020-02-11Use new dataflow framework for `rustc_peek` testsDylan MacKenzie-42/+28
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-59/+64
2019-12-09Remove `uniform_array_move_out` passesMatthew Jasper-1/+1
These passes were buggy, MIR building is now responsible for canonicalizing `ConstantIndex` projections and `MoveData` is responsible for splitting `Subslice` projections.
2019-12-05rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded ↵Paul Daniel Faria-2/+2
Index impl, remove body fn rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence
2019-12-02Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, ↵Paul Daniel Faria-15/+15
rename all body_cache back to body
2019-12-02Remove BodyCache.body and rely on Deref as much as possible for ↵Paul Daniel Faria-4/+4
ReadOnlyBodyCache
2019-12-02Fix tidy errorsPaul Daniel Faria-2/+12
2019-12-02Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵Paul Daniel Faria-16/+16
(lifetime errors still exist)
2019-10-22Pattern match over PlaceRef rather than PlaceSantiago Pastorino-15/+23
This prepares the code base for when projection is interned. Place's projection field is going to be `&List<PlaceElem<'tcx>>` so we won't be able to pattern match against it.
2019-10-01Add `rustc_peek` support for `IndirectlyMutableLocals`Dylan MacKenzie-0/+32
2019-10-01Refactor `rustc_peek`Dylan MacKenzie-131/+153
We now use `DataflowResultsCursor` to get the dataflow state before calls to `rustc_peek`. The original version used a custom implementation that only looked at assignment statements. This also extends `rustc_peek` to take arguments by-value as well as by-reference, and allows *all* dataflow analyses, not just those dependent on `MoveData`, to be inspected.
2019-09-29remove bit_set re-export from rustc_data_structurescsmoe-1/+1
2019-09-25Rename `sty` to `kind`varkor-1/+1
2019-09-11Make Place Boxed on Statement to reduce size from 64 bytes to 32 bytesSantiago Pastorino-2/+2
2019-09-09Convert Place's projection to a boxed sliceSantiago Pastorino-2/+2
2019-08-22Move 'tcx lifetime on MirPassWesley Wiser-2/+2
2019-08-16Remove redundant `ty` fields from `mir::Constant` and ↵Eduard-Mihai Burtescu-1/+1
`hair::pattern::PatternRange`.
2019-07-22Place::as_place_ref is now Place::as_refSantiago Pastorino-2/+2
2019-07-20Avoid cloning Place in report_use_of_moved_or_uninitialized and friendsSantiago Pastorino-2/+2
2019-07-20Migrate from Place enum to Place structSantiago Pastorino-2/+8
2019-06-22rustc_mir: don't pass `on_entry` when building transfer functions.Dylan MacKenzie-16/+10
This commit makes `sets.on_entry` inaccessible in `{before_,}{statement,terminator}_effect`. This field was meant to allow implementors of `BitDenotation` to access the initial state for each block (optionally with the effect of all previous statements applied via `accumulates_intrablock_state`) while defining transfer functions. However, the ability to set the initial value for the entry set of each basic block (except for START_BLOCK) no longer exists. As a result, this functionality is mostly useless, and when it *was* used it was used erroneously (see #62007). Since `on_entry` is now useless, we can also remove `BlockSets`, which held the `gen`, `kill`, and `on_entry` bitvectors and replace it with a `GenKill` struct. Variables of this type are called `trans` since they represent a transfer function. `GenKill`s are stored contiguously in `AllSets`, which reduces the number of bounds checks and may improve cache performance: one is almost never accessed without the other. Replacing `BlockSets` with `GenKill` allows us to define some new helper functions which streamline dataflow iteration and the dataflow-at-location APIs. Notably, `state_for_location` used a subtle side-effect of the `kill`/`kill_all` setters to apply the transfer function, and could be incorrect if a transfer function depended on effects of previous statements in the block on `gen_set`.
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-4/+4
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-16/+20
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-4/+4
2019-06-12Fix fallout from `deny(unused_lifetimes)`.Eduard-Mihai Burtescu-3/+3
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-4/+4
2019-06-09Changed usages of `mir` in librustc::mir and librustc_mir to `body`Jad Ghalayini-17/+17
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-4/+4
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`
2019-05-21Remove impls for `InternedString`/string equality.Nicholas Nethercote-1/+1
`Symbol` received the same treatment in #60630. Also, we can derive `PartialEq` for `InternedString`.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-5/+6