Document wf constraints on control flow in cleanup blocks
Also fixes a bug in dominator computation
This commit is contained in:
parent
4781233a77
commit
f49126e3d6
3 changed files with 68 additions and 6 deletions
|
@ -512,6 +512,13 @@ pub struct CopyNonOverlapping<'tcx> {
|
|||
/// must also be `cleanup`. This is a part of the type system and checked statically, so it is
|
||||
/// still an error to have such an edge in the CFG even if it's known that it won't be taken at
|
||||
/// runtime.
|
||||
/// 4. The induced subgraph on cleanup blocks must look roughly like an upside down tree. This is
|
||||
/// necessary to ensure that landing pad information can be correctly codegened. More precisely:
|
||||
///
|
||||
/// Begin with the standard control flow graph `G`. Modify `G` as follows: for any two cleanup
|
||||
/// vertices `u` and `v` such that `u` dominates `v`, contract `u` and `v` into a single vertex,
|
||||
/// deleting self edges and duplicate edges in the process. The cleanup blocks of the resulting
|
||||
/// graph must form an inverted forest.
|
||||
#[derive(Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq, TypeFoldable, TypeVisitable)]
|
||||
pub enum TerminatorKind<'tcx> {
|
||||
/// Block has one successor; we continue execution there.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue