1
Fork 0
Commit graph

27 commits

Author SHA1 Message Date
Nicholas Nethercote
d921be92a4 Return label from write_node_label.
Instead of appending an empty label. Because it's conceptually simpler.
2024-10-30 13:21:32 +11:00
Nicholas Nethercote
a8ce44f7d9 Simplify graphviz::Formatter.
`Formatter` currently has a `RefCell<Option<Results>>` field. This is so
the `Results` can be temporarily taken and put into a `ResultsCursor`
that is used by `BlockFormatter`, and then put back, which is messy.

This commit changes `Formatter` to have a `RefCell<ResultsCursor>` and
`BlockFormatter` to have a `&mut ResultsCursor`, which greatly
simplifies the code at the `Formatter`/`BlockFormatter` interaction
point in `Formatter::node_label`. It also means we construct a
`ResultsCursor` once per `Formatter`, instead of once per `node_label`
call.

The commit also:
- documents the reason for the `RefCell`;
- adds a `Formatter::body` method, replacing the `Formatter::body`
  field.
2024-10-30 13:19:29 +11:00
Nicholas Nethercote
744eb2f937 Rename BlockFormatter::results as BlockFormatter::cursor.
Because it's a `ResultsCursor`, not a `Results`. I find this easier to
read and understand.
2024-10-30 13:12:03 +11:00
Michael Goulet
c682aa162b Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
Nicholas Nethercote
bb943f93ff Rename FlowState as Domain.
Because that's what it is; no point having a different name for it.
2024-09-13 16:27:24 +10:00
Nicholas Nethercote
84ac80f192 Reformat use declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Gary Guo
b044aaa905 Change InlineAsm to allow multiple targets instead 2024-02-24 18:50:09 +00:00
Nicholas Nethercote
f312775e4f Remove unused arguments from ResultsVisitor::visit_block_{start,end}. 2023-12-08 07:55:17 +11:00
Nicholas Nethercote
cf82b410f9 Remove another use of as_results_cursor.
The new code is a little clunky, but I couldn't see how to make it
better.
2023-11-27 10:35:43 +11:00
Nicholas Nethercote
64a8c4ddda Reduce pub usage. 2023-11-23 15:29:24 +11:00
Oli Scherer
e96ce20b34 s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
Jason Newcomb
f686bd8949 Take &mut Results in ResultsVisitor 2023-09-02 19:35:51 -04:00
Camille GILLOT
5173d85043 Allow apply_terminator_effect to customize edges. 2023-08-16 18:12:17 +00:00
Jason Newcomb
eaddc37075 Take MIR dataflow analyses by mutable reference. 2023-05-18 17:46:39 -04:00
DaniPopes
677357d32b
Fix typos in compiler 2023-04-10 22:02:52 +02:00
clubby789
47ae42ee10 Only create graphviz nodes for reachable MIR bb's 2023-04-01 23:14:18 +01:00
nils
fd7a159710 Fix uninlined_format_args for some compiler crates
Convert all the crates that have had their diagnostic migration
completed (except save_analysis because that will be deleted soon and
apfloat because of the licensing problem).
2023-01-05 19:01:12 +01:00
Jannis Christopher Köhl
4f9c30fb67 Add initial version of value analysis and dataflow constant propagation 2022-11-07 10:35:08 +01:00
Tomasz Miąsko
b48870b451 Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
Maybe Waffle
c1a2db3372 Move/rename lazy::Sync{OnceCell,Lazy} to sync::{Once,Lazy}Lock 2022-06-16 19:54:42 +04:00
Tomasz Miąsko
39de03d844 Change Direction::{is_forward,is_backward} functions into constants
Make it explicit that the analysis direction is constant.

This also makes the value immediately available for optimizations.
Previously those functions were neither inline nor generic and so their
definition was unavailable when using data flow framework from other
crates.
2022-06-07 17:02:55 +02:00
Jakob Degen
09b0936db2 Refactor call terminator to always hold a destination place 2022-05-23 17:49:04 -04:00
SparrowLii
38bf1158bd Change Successors to impl Iterator<Item = BasicBlock> 2022-05-17 08:41:01 +08:00
est31
2ef8af6619 Adopt let else in more places 2022-02-19 17:27:43 +01:00
LegionMammal978
fed881aafc Remove in_band_lifetimes from rustc_mir_dataflow
See #91867 for more information.
2021-12-16 14:29:43 -05:00
Amanieu d'Antras
940b2eabad Add initial AST and MIR support for unwinding from inline assembly 2021-12-03 23:51:46 +01:00
Camille GILLOT
fd9c04fe32 Move the dataflow framework to its own crate. 2021-09-07 19:57:07 +02:00
Renamed from compiler/rustc_mir/src/dataflow/framework/graphviz.rs (Browse further)