about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/util/graphviz.rs
AgeCommit message (Collapse)AuthorLines
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-134/+0
2021-02-22Fix mir-cfg dumpsÖmer Sinan Ağacan-5/+18
Fixes #81918 Fixes #82326 (duplicate) Fixes #82325
2020-12-15Auto merge of #78399 - vn-ki:gsgdt-graphviz, r=oli-obkbors-131/+16
make MIR graphviz generation use gsgdt gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an interface for stringly typed graphs. It also provides generation of graphviz dot format from said graph. This is the first in a series of PRs on moving graphviz code out of rustc into normal crates and then implementating graph diffing on top of these crates. r? `@oli-obk`
2020-12-06[mir-opt] Allow debuginfo to be generated for a constant or a PlaceWesley Wiser-1/+1
Prior to this commit, debuginfo was always generated by mapping a name to a Place. This has the side-effect that `SimplifyLocals` cannot remove locals that are only used for debuginfo because their other uses have been const-propagated. To allow these locals to be removed, we now allow debuginfo to point to a constant value. The `ConstProp` pass detects when debuginfo points to a local with a known constant value and replaces it with the value. This allows the later `SimplifyLocals` pass to remove the local.
2020-11-09update gsgdtVishnunarayan K I-2/+2
2020-11-09write to a String instead to reduce churnVishnunarayan K I-14/+21
2020-11-09make MIR graphviz generation use gsgdtVishnunarayan K I-145/+23
gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an interface for stringly typed graphs. It also provides generation of graphviz dot format from said graph.
2020-11-05Rust coverage before splitting instrument_coverage.rsRich Kadel-1/+3
2020-10-05Auto merge of #77552 - ecstatic-morse:body-def-id, r=lcnrbors-11/+8
Replace `(Body, DefId)` with `Body` where possible Follow-up to #77430. I `grep`-ed for parameter lists in which a `Body` appeared within a few lines of a `DefId`, so it's possible that I missed some cases, but this should be pretty complete. Most of these changes were mechanical, but there's a few places where I started calling things "caller" and "callee" when multiple `DefId`s were in-scope at once. Also, we should probably have a helper function on `Body` that returns a `LocalDefId`. I can do that in this PR or in a follow-up.
2020-10-05Auto merge of #77466 - Aaron1011:reland-drop-tree, r=matthewjasperbors-2/+8
Re-land PR #71840 (Rework MIR drop tree lowering) PR https://github.com/rust-lang/rust/pull/71840 was reverted in https://github.com/rust-lang/rust/pull/72989 to fix an LLVM error (https://github.com/rust-lang/rust/issues/72470). That LLVM error no longer occurs with the recent upgrade to LLVM 11 (https://github.com/rust-lang/rust/pull/73526), so let's try re-landing this PR. I've cherry-picked the commits from the original PR (with the exception of the commit blessing test output), making as few modifications as possible. I addressed the rebase fallout in separate commits on top of those. r? `@matthewjasper`
2020-10-04Replace `(Body, DefId)` with `Body` where possibleDylan MacKenzie-11/+8
A `Body` now contains its `MirSource`, which in turn contains the `DefId` of the item associated with the `Body`.
2020-10-04Remember the `MirSource` for each `Body`Dylan MacKenzie-2/+2
2020-10-04Fix rebase falloutAaron Hill-8/+3
2020-10-04Defer creating drop trees in MIR lowering until leaving that scopeMatthew Jasper-1/+12
2020-09-16Make graphviz font configurableRich Kadel-3/+3
Alternative to PR ##76776. To change the graphviz output to use an alternative `fontname` value, add a command line option like: `rustc --graphviz-font=monospace`.
2020-09-09Also fixed monospace font for d3-graphviz engineRich Kadel-1/+1
VS code graphviz extensions use d3-graphviz, which supports `Courier` fontname but does not support `monospace`. This caused graphs to render poorly because the text sizes were wrong.
2020-09-08Add -Zgraphviz_dark_modeRich Kadel-7/+22
Many developers use a dark theme with editors and IDEs, but this typically doesn't extend to graphviz output. When I bring up a MIR graphviz document, the white background is strikingly bright. This new option changes the colors used for graphviz output to work better in dark-themed UIs.
2020-08-30mv compiler to compiler/mark-0/+216