summary refs log tree commit diff
path: root/src/librustc_mir/dataflow/framework
AgeCommit message (Collapse)AuthorLines
2020-06-16rename location field of Drop terminators to placeRalf Jung-2/+2
2020-06-10Fix testAaron Hill-0/+2
2020-06-10Track span of function in method calls, and use this in #[track_caller]Aaron Hill-1/+1
Fixes #69977 When we parse a chain of method calls like `foo.a().b().c()`, each `MethodCallExpr` gets assigned a span that starts at the beginning of the call chain (`foo`). While this is useful for diagnostics, it means that `Location::caller` will return the same location for every call in a call chain. This PR makes us separately record the span of the function name and arguments for a method call (e.g. `b()` in `foo.a().b().c()`). This `Span` is passed through HIR lowering and MIR building to `TerminatorKind::Call`, where it is used in preference to `Terminator.source_info.span` when determining `Location::caller`. This new span is also useful for diagnostics where we want to emphasize a particular method call - for an example, see https://github.com/rust-lang/rust/pull/72389#discussion_r436035990
2020-06-07rename FalseEdges -> FalseEdgeRalf Jung-1/+1
2020-06-02Rename the crates in source codeVadim Petrochenkov-0/+2
2020-05-29Improve inline asm error diagnosticsAmanieu d'Antras-1/+1
2020-05-18Add asm! to MIRAmanieu d'Antras-0/+6
2020-05-06Add `SourceInfo::outermost`.Nicholas Nethercote-1/+1
2020-05-03Use agreed upon terminology in cursor docsDylan MacKenzie-5/+5
2020-05-03Initialize the cursor with an empty stateDylan MacKenzie-4/+10
2020-05-03Support backward dataflow analysesDylan MacKenzie-635/+1070
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-1/+1
2020-04-01Rollup merge of #70627 - spastorino:use-place-directly-its-copy, r=oli-obkMazdak Farrokhzad-19/+19
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 Operand::place and friends, it's CopySantiago Pastorino-18/+18
2020-03-30Use if let instead of match when only matching a single variant ↵Matthias Krüger-20/+16
(clippy::single_match) Makes code more compact and reduces nestig.
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-10/+10
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-10/+10
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-26Update `framework` module docsDylan MacKenzie-17/+15
2020-03-26Move `BottomValue` into `framework/mod.rs`Dylan MacKenzie-2/+41
2020-03-26Rename `dataflow::generic` to `dataflow::framework`Dylan MacKenzie-0/+2592