about summary refs log tree commit diff
path: root/src/librustc_mir/dataflow/impls
AgeCommit message (Collapse)AuthorLines
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-13/+13
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-21/+4
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-50/+50
2019-06-12Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-20/+20
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-10/+10
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-10/+10
2019-06-09Changed usages of `mir` in librustc::mir and librustc_mir to `body`Jad Ghalayini-56/+56
2019-06-06Auto merge of #61373 - tmandry:emit-storagedead-along-unwind, r=eddybbors-10/+3
Emit StorageDead along unwind paths for generators Completion of the work done in #60840. That PR made a change to implicitly consider a local `StorageDead` after Drop, but that was incorrect for DropAndReplace (see also #61060 which tried to fix this in a different way). This finally enables the optimization implemented in #60187. r? @eddyb cc @Zoxc @cramertj @RalfJung
2019-06-04Revert "Make MaybeStorageLive drop-aware"Tyler Mandry-10/+3
This reverts commit dd2eabc49d415dd30cea0953df5d7659d4d9440f.
2019-06-04Rollup merge of #61069 - Zoxc:drop-borrow-fix, r=pnkfelixPietro Albini-1/+12
Make MIR drop terminators borrow the dropped location r? @eddyb cc @tmandry
2019-05-29Rollup merge of #61249 - spastorino:local-or-deref-local, r=oli-obk,CentrilMazdak Farrokhzad-2/+4
Rename Place::local to Place::local_or_deref_local r? @oli-obk
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-19/+19
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-28Rename Place::local to Place::local_or_deref_localSantiago Pastorino-2/+4
2019-05-23Make find_local iterate instead of recurseSantiago Pastorino-8/+11
2019-05-23Auto merge of #60174 - matthewjasper:add-match-arm-scopes, r=pnkfelixbors-31/+8
Add match arm scopes and other scope fixes * Add drop and lint scopes for match arms. * Lint attributes are now respected on match arms. * Make sure we emit a StorageDead if we diverge when initializing a temporary. * Adjust MIR pretty printing of scopes for locals. * Don't generate duplicate lint scopes for `let statements`. * Add some previously missing fake borrows for matches. closes #46525 cc @rust-lang/compiler
2019-05-23Make MIR drop terminators borrow the dropped locationJohn Kåre Alsaker-1/+12
2019-05-21Remove MIR borrowck hack for old match scopesMatthew Jasper-31/+8
2019-05-14Make MaybeStorageLive drop-awareTyler Mandry-3/+8
2019-04-26Remove BasicBlock parameter from mir visitor methodsMatthew Jasper-2/+2
2019-04-13Auto merge of #59612 - matthewjasper:dataflow-usual-newtype-index, r=estebankbors-1/+6
Use normal newtype_index macro for MIR dataflows * Makes the definition of these structs contain `struct IndexName` * Avoids having an offset by removing high values, rather than 0 * Implements some traits for us.
2019-04-03Shrink `mir::Statement`.Nicholas Nethercote-2/+2
The `InlineAsm` variant is extremely rare, and `mir::Statement` often contributes significantly to peak memory usage.
2019-04-01Use normal newtype_index macro for MIR dataflowMatthew Jasper-1/+6
2019-03-18promoted is still left in 2 placesSaleem Jaffer-1/+0
2019-03-01Put Local, Static and Promoted as one Base variant of PlaceSantiago Pastorino-7/+8
2019-02-10rustc: doc commentsAlexander Regueiro-7/+0
2019-02-08librustc_mir => 2018Taiki Endo-31/+31
2019-01-30Pass correct arguments to places_conflictMatthew Jasper-1/+1
The borrow place *must* be a place that we track borrows for, otherwise we will likely ICE.
2018-12-28Remove unnecessary borrow generationMatthew Jasper-14/+0
2018-12-25Remove licensesMark Rousskov-40/+0
2018-12-20Auto merge of #56741 - RalfJung:retag-to-raw, r=oli-obkbors-1/+0
treat ref-to-raw cast like a reborrow: do a special kind of retag r? @oli-obk Cc @nikomatsakis
2018-12-20Auto merge of #56649 - davidtwco:issue-46589, r=pnkfelixbors-74/+106
MIR borrowck doesn't accept the example of iterating and updating a mutable reference Fixes #46589. r? @pnkfelix or @nikomatsakis
2018-12-18treat ref-to-raw cast like a reborrow: do a special kind of retagRalf Jung-1/+0
2018-12-17Add required lifetime parameter to BitDenotation.David Wood-64/+65
This avoids all sorts of confusing issues with using both `dest_place` and `self` in the `propagate_call_return` function in the `BitDenotation` implementation for `Borrows`.
2018-12-17Kill borrows from a projection after assignment.David Wood-23/+54
This commit extends previous work to kill borrows from a local after assignment into that local to kill borrows from a projection after assignment into a prefix of that place.
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-2/+2
2018-11-30Remove the `region_map` field from `BorrowSet`Matthew Jasper-8/+1
2018-11-18Only handle ReVar regions in NLL borrowckMatthew Jasper-82/+9
Now that lexical MIR borrowck is gone, there's no need to store Regions unnecessarily.
2018-11-18Remove mir::StatementKind::EndRegionMatthew Jasper-5/+1
Since lexical MIR borrow check is gone, and validation no longer uses these, they can be removed.
2018-11-15Auto merge of #55716 - RalfJung:escape-to-raw, r=oli-obkbors-0/+1
Add escape-to-raw MIR statement Add a new MIR "ghost state statement": Escaping a ptr to permit raw accesses. ~~This includes #55549, [click here](https://github.com/RalfJung/rust/compare/miri-visitor...RalfJung:escape-to-raw) for just the new commits.~~
2018-11-07no more action on ref or cast, but add new MIR statement for escaping a ptr ↵Ralf Jung-0/+1
to raw
2018-11-07Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwcokennytm-2/+2
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-06refactor: use shorthand fieldsteresy-2/+2
2018-10-29Emit Retag statements, kill Validate statementsRalf Jung-1/+1
Also "rename" -Zmir-emit-validate to -Zmir-emit-retag, which is just a boolean (yes or no).
2018-10-22Replace the `run_passes!` macro with a regular functionWesley Wiser-1/+0
As suggested in the feedback for #55244. When I replaced the macro with a function, rustc started complaining that there were two unused functions so I also removed those.
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-2/+2
2018-09-24Shrink StatementKind::Assign.Nicholas Nethercote-1/+1
This shrinks StatementKind from 80 bytes to 64 bytes on 64-bit.
2018-09-22Auto merge of #54188 - lqd:fallout-53695, r=nikomatsakisbors-1/+1
NLL: disallow creation of immediately unusable variables Fix #53695 Original description follows ---- This WIP PR is for discussing the impact of fixing #53695 by injecting a fake read in let patterns. (Travis will fail, at least the `mir-opt` suite is failing in its current state)
2018-09-20Improve handling of type bounds in `bit_set.rs`.Nicholas Nethercote-1/+2
Currently, `BitSet` doesn't actually know its own domain size; it just knows how many words it contains. To improve things, this commit makes the following changes. - It changes `BitSet` and `SparseBitSet` to store their own domain size, and do more precise bounds and same-size checks with it. It also changes the signature of `BitSet::to_string()` (and puts it within `impl ToString`) now that the domain size need not be passed in from outside. - It uses `derive(RustcDecodable, RustcEncodable)` for `BitSet`. This required adding code to handle `PhantomData` in `libserialize`. - As a result, it removes the domain size from `HybridBitSet`, making a lot of that code nicer. - Both set_up_to() and clear_above() were overly general, working with arbitrary sizes when they are only needed for the domain size. The commit removes the former, degeneralizes the latter, and removes the (overly general) tests. - Changes `GrowableBitSet::grow()` to `ensure()`, fixing a bug where a (1-based) domain size was confused with a (0-based) element index. - Changes `BitMatrix` to store its row count, and do more precise bounds checks with it. - Changes `ty_params` in `select.rs` from a `BitSet` to a `GrowableBitSet` because it repeatedly failed the new, more precise bounds checks. (Changing the type was simpler than computing an accurate domain size.) - Various other minor improvements.
2018-09-18Refactor 'ReadForMatch' into 'FakeRead' and add the cause of the fake readRemy Rakic-1/+1
2018-09-18Auto merge of #54286 - nnethercote:BitSet, r=pnkfelixbors-62/+60
Merge `bitvec.rs` and `indexed_set.rs` Because it's not good to have two separate implementations. Also, I will combine the best parts of each to improve NLL memory usage on some benchmarks significantly.