about summary refs log tree commit diff
path: root/src/librustc_mir/dataflow/impls/borrows.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-350/+0
2020-08-18Moved coverage counter injection from BasicBlock to Statement.Rich Kadel-0/+1
2020-08-09rustc_mir: use IndexMap in BorrowSetJosh Stone-7/+7
2020-05-18Add asm! to MIRAmanieu d'Antras-3/+12
2020-03-31Use Place directly on Operand::place and friends, it's CopySantiago Pastorino-1/+1
2020-03-31Use Place directly, it's CopySantiago Pastorino-6/+6
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-3/+3
2020-03-27Auto merge of #68404 - Amanieu:llvm-asm, r=estebankbors-1/+1
Rename asm! to llvm_asm! As per https://github.com/rust-lang/rfcs/pull/2843, this PR renames `asm!` to `llvm_asm!`. It also renames the compiler's internal `InlineAsm` data structures to `LlvmInlineAsm` in preparation for the new `asm!` functionality specified in https://github.com/rust-lang/rfcs/pull/2850. This PR doesn't actually deprecate `asm!` yet, it just makes it redirect to `llvm_asm!`. This is necessary because we first need to update the submodules (in particular stdarch) to use `llvm_asm!`.
2020-03-26Update imports from `dataflow::generic` to `dataflow`Dylan MacKenzie-3/+3
2020-03-26Rename asm! to llvm_asm!Amanieu d'Antras-1/+1
asm! is left as a wrapper around llvm_asm! to maintain compatibility.
2020-02-29use .iter() instead of .into_iter() on references.Matthias Krüger-1/+1
2020-02-11Use new dataflow framework for drop elaboration and borrow checkingDylan MacKenzie-7/+1
2020-02-10Use new dataflow interface for initialization/borrows analysesDylan MacKenzie-33/+55
2020-01-10Remove PlaceBase enum and make Place base field be local: LocalSantiago Pastorino-30/+26
2020-01-10Remove Static from PlaceBaseSantiago Pastorino-27/+29
2020-01-10Remove unused param_env parameterSantiago Pastorino-5/+1
2020-01-06Improve hygiene of `newtype_index`Matthew Jasper-1/+1
Also add unit tests
2019-12-22Format the worldMark Rousskov-67/+56
2019-12-11more privateMark Mansi-8/+4
2019-12-11fix importsMark Mansi-6/+8
2019-12-02Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, ↵Paul Daniel Faria-2/+2
rename all body_cache back to body
2019-12-02Stop invalidating predecessors cache when accessing unique basic block, ↵Paul Daniel Faria-1/+1
invalidate cache when accessing unique terminator
2019-11-21Track pointers to statics in MIRMatthew Jasper-1/+3
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-2/+2
2019-09-29remove bit_set re-export from rustc_data_structurescsmoe-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-1/+1
2019-08-31Kill borrows from assignments after generating new borrowsMatthew Jasper-4/+4
2019-08-05Fiddle param env through to `try_eval_bits` in most placesOliver Scherer-1/+5
2019-07-20Migrate from Place enum to Place structSantiago Pastorino-2/+2
2019-06-25Implement From<Local> for Place and PlaceBaseSantiago Pastorino-1/+1
2019-06-22Merge `BitSetOperator` and `InitialFlow` into one trait.Dylan MacKenzie-14/+5
Since the value of `InitialFlow` defines the semantics of the `join` operation, there's no reason to have seperate traits for each. We can add a default impl of `join` which branches based on `BOTTOM_VALUE`. This should get optimized away.
2019-06-22rustc_mir: don't pass `on_entry` when building transfer functions.Dylan MacKenzie-22/+28
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-20Kill conflicting borrows of places with projections.Dylan MacKenzie-30/+25
Resolves #62007. Due to a bug, the previous version of this check did not actually kill any conflicting borrows unless the borrowed place had no projections. Specifically, `entry_set` will always be empty when `statement_effect` is called. It does not contain the set of borrows which are live at this point in the program.
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-7/+7
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-2/+2
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-2/+2
2019-06-09Changed usages of `mir` in librustc::mir and librustc_mir to `body`Jad Ghalayini-11/+11
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-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-01Put Local, Static and Promoted as one Base variant of PlaceSantiago Pastorino-3/+3
2019-02-08librustc_mir => 2018Taiki Endo-13/+13
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-10/+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-38/+58
MIR borrowck doesn't accept the example of iterating and updating a mutable reference Fixes #46589. r? @pnkfelix or @nikomatsakis