rust/compiler/rustc_mir_dataflow/src/framework
Tomasz Miąsko 23e3840014 Remove dead unwinds before drop elaboration
As a part of drop elaboration, we identify dead unwinds, i.e., unwind
edges on a drop terminators which are known to be unreachable, because
there is no need to drop anything.

Previously, the data flow framework was informed about the dead unwinds,
and it assumed those edges are absent from MIR. Unfortunately, the data
flow framework wasn't consistent in maintaining this assumption.

In particular, if a block was reachable only through a dead unwind edge,
its state was propagated to other blocks still. This became an issue in
the context of change removes DropAndReplace terminator, since it
introduces initialization into cleanup blocks.

To avoid this issue, remove unreachable unwind edges before the drop
elaboration, and elaborate only blocks that remain reachable.
2023-02-23 14:05:03 +01:00
..
cursor.rs Change Direction::{is_forward,is_backward} functions into constants 2022-06-07 17:02:55 +02:00
direction.rs Remove dead unwinds before drop elaboration 2023-02-23 14:05:03 +01:00
engine.rs Remove dead unwinds before drop elaboration 2023-02-23 14:05:03 +01:00
fmt.rs Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
graphviz.rs Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
lattice.rs compiler: remove unnecessary imports and qualified paths 2022-12-10 18:45:34 +01:00
mod.rs use type alias impl trait in outlives_bounds::InferCtxtExt 2022-08-22 18:10:28 +08:00
tests.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
visitor.rs Remove in_band_lifetimes from rustc_mir_dataflow 2021-12-16 14:29:43 -05:00