Document wf constraints on control flow in cleanup blocks
Also fixes a bug in dominator computation
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user