summary refs log tree commit diff
path: root/src/librustc_mir/dataflow
AgeCommit message (Collapse)AuthorLines
2020-06-13placate tidy.Felix S. Klock II-1/+1
2020-06-13Revert "Reduce the number of drop-flag assignments in unwind paths"Felix S. Klock II-1/+4
This reverts commit 54aa418a6082b364b90feee70b07381ea266c4d5.
2020-06-13Revert "Address review comments"Felix S. Klock II-6/+2
This reverts commit b998497bd41d6de71ec035433247dee856d1f3a5.
2020-06-13Revert "Auto merge of #71956 - ↵Mark Rousskov-125/+234
ecstatic-morse:remove-requires-storage-analysis, r=tmandry" This reverts commit 458a3e76294fd859fb037f425404180c91e14767, reversing changes made to d9417b385145af1cabd0be8a95c65075d2fc30ff.
2020-06-01Auto merge of #71192 - oli-obk:eager_alloc_id_canonicalization, r=wesleywiserbors-0/+2
Make TLS accesses explicit in MIR r? @rust-lang/wg-mir-opt cc @RalfJung @vakaras for miri thread locals cc @bjorn3 for cranelift fixes #70685
2020-05-30Make TLS accesses explicit in MIROliver Scherer-0/+2
2020-05-29Improve inline asm error diagnosticsAmanieu d'Antras-2/+8
2020-05-23take mir::PlaceElem by valueBastian Kauschke-5/+5
2020-05-23iterate List by valueBastian Kauschke-1/+1
2020-05-19Document assumptions made in generator transform for analysesDylan MacKenzie-0/+6
The generator transform needs to inspect all possible dataflow states. This can be done with half the number of bitset union operations if we can assume that the relevant analyses do not use "before" effects.
2020-05-19Remove `MaybeRequiresStorage`Dylan MacKenzie-234/+2
2020-05-19Add `MaybeInitializedLocals` dataflow analysisDylan MacKenzie-0/+117
2020-05-18Add asm! to MIRAmanieu d'Antras-3/+62
2020-05-09Address review commentsMatthew Jasper-2/+6
2020-05-09Reduce the number of drop-flag assignments in unwind pathsMatthew Jasper-4/+1
2020-05-09Rollup merge of #71942 - nnethercote:shrink-LocalDecl, r=matthewjasperDylan DPC-1/+1
Shrink `LocalDecl` `LocalDecl` contributes 4-8% of peak heap memory usage on a range of benchmarks. This PR reduces its size from 128 bytes to 56 bytes on 64-bit, and does some clean-ups as well. r? @matthewjasper
2020-05-08Rollup merge of #71993 - ecstatic-morse:cleanup-old-liveness, r=jonas-schievinkDylan DPC-0/+7
Remove old `util/liveness.rs` module The liveness dataflow analysis now lives in the `dataflow` module, so this one is no longer necessary. I've copied the relevant bits of the module docs for `util::liveness` to `MaybeLiveLocals`. The example in the docs is now a `mir-dataflow` test: https://github.com/rust-lang/rust/blob/a08c47310c7d49cbdc5d7afb38408ba519967ecd/src/test/ui/mir-dataflow/liveness-ptr.rs#L6-L26 The borrow-checker used the same notion of "defs" and "uses", so I've moved it into a submodule. I would have moved it to `util/def_use.rs`, since it seems generally useful, but there's already a slightly [different version](https://github.com/rust-lang/rust/blob/master/src/librustc_mir/util/def_use.rs) of the same abstraction needed for copy propagation.
2020-05-07Incorporate old module docs into `MaybeLiveLocals` docsDylan MacKenzie-0/+7
2020-05-06Add `SourceInfo::outermost`.Nicholas Nethercote-1/+1
2020-05-04Import dataflow impls via the `impls` submoduleDylan MacKenzie-6/+1
2020-05-04Export dataflow impls by nameDylan MacKenzie-4/+4
2020-05-03Use agreed upon terminology in cursor docsDylan MacKenzie-5/+5
2020-05-03Live variable analysisDylan MacKenzie-2/+141
2020-05-03Initialize the cursor with an empty stateDylan MacKenzie-4/+10
2020-05-03Support backward dataflow analysesDylan MacKenzie-639/+1075
2020-04-22Use `Body` everywhereDylan MacKenzie-2/+2
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-4/+3
2020-04-09Make `MaybeStorageLive` correct for all kinds of MIR bodiesDylan MacKenzie-5/+17
Before, it ignored the first argument and marked all variables without `Storage*` annotations as dead.
2020-04-03Rollup merge of #70707 - ecstatic-morse:dataflow-graphviz-cleanup, ↵Mazdak Farrokhzad-277/+0
r=nikomatsakis Remove unused graphviz emitter This was only used by the old dataflow framework that was removed in #69644.
2020-04-02Remove unused graphviz visualizationDylan MacKenzie-277/+0
This was used by the old framework that was removed in #69644.
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-2/+2
2020-04-01Rollup merge of #70627 - spastorino:use-place-directly-its-copy, r=oli-obkMazdak Farrokhzad-65/+65
Use place directly its copy r? @oli-obk
2020-04-01Rollup merge of #70511 - ecstatic-morse:mir-dataflow-graphviz, r=davidtwcoMazdak Farrokhzad-1/+20
Add `-Z dump-mir-dataflow` flag for dumping dataflow results visualization Previously, to visualize the results of a MIR dataflow pass, one had to add a `#[rustc_mir(borrowck_graphviz_postflow)]` attribute to functions of interest. However, there is no way to specify this attribute on closures and generators, so it was impossible to view results for these MIR bodies. This PR adds a flag, `-Z dump-mir-dataflow`, which will output the dataflow results for any functions specified in `-Z dump-mir` to the output directory specified by `-Z dump-mir-dir`. This behavior is modeled on the `-Z dump-mir-graphviz` flag.
2020-03-31Use Place directly in apply_call_return_effect on framework/tests, it's CopySantiago Pastorino-1/+1
2020-03-31Use Place directly on place_contents_drop_state_cannot_differ, it's CopySantiago Pastorino-2/+2
2020-03-31Use Place directly on Operand::place and friends, it's CopySantiago Pastorino-28/+28
2020-03-31Use Place directly, it's Copy even more use casesSantiago Pastorino-28/+28
2020-03-31Use Place directly, it's CopySantiago Pastorino-6/+6
2020-03-30Use if let instead of match when only matching a single variant ↵Matthias Krüger-36/+30
(clippy::single_match) Makes code more compact and reduces nestig.
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-17/+17
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-32/+32
2020-03-29Use `&` to do deref coercion for `ReadOnlyBodyAndCache`Dylan MacKenzie-2/+2
2020-03-29Make `Visitor::visit_body` take a simple `Body`Dylan MacKenzie-1/+1
2020-03-28Ensure output dir for dataflow results existsDylan MacKenzie-0/+5
2020-03-28Dump graphviz dataflow results with flagDylan MacKenzie-1/+15
2020-03-27Auto merge of #68404 - Amanieu:llvm-asm, r=estebankbors-3/+3
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-26Make `framework` a private moduleDylan MacKenzie-1/+1
2020-03-26Update `framework` module docsDylan MacKenzie-17/+15
2020-03-26Move `BottomValue` into `framework/mod.rs`Dylan MacKenzie-47/+43
2020-03-26Update imports from `dataflow::generic` to `dataflow`Dylan MacKenzie-7/+6