Table of Contents

Class ControlFlowNode

Namespace
ICSharpCode.Decompiler.FlowAnalysis
Assembly
ICSharpCode.Decompiler.dll

Represents a block in the control flow graph.

public class ControlFlowNode
Inheritance
ControlFlowNode
Inherited Members

Constructors

ControlFlowNode()

public ControlFlowNode()

Fields

PostOrderNumber

Gets the node index in a post-order traversal of the control flow graph, starting at the entry point. This field gets computed by dominance analysis.

public int PostOrderNumber

Field Value

int

Predecessors

List of incoming control flow edges.

public readonly List<ControlFlowNode> Predecessors

Field Value

List<ControlFlowNode>

Successors

List of outgoing control flow edges.

public readonly List<ControlFlowNode> Successors

Field Value

List<ControlFlowNode>

UserData

User data.

public object UserData

Field Value

object

UserIndex

User index, can be used to look up additional information in an array.

public int UserIndex

Field Value

int

Visited

Visited flag, used in various algorithms.

public bool Visited

Field Value

bool

Properties

DominatorTreeChildren

List of children in the dominator tree. Null if dominance has not been calculated; or if the node is unreachable.

public List<ControlFlowNode> DominatorTreeChildren { get; }

Property Value

List<ControlFlowNode>

ImmediateDominator

Gets the immediate dominator (the parent in the dominator tree). Null if dominance has not been calculated; or if the node is unreachable.

public ControlFlowNode ImmediateDominator { get; }

Property Value

ControlFlowNode

IsReachable

Gets whether this node is reachable. Requires that dominance is computed!

public bool IsReachable { get; }

Property Value

bool

Methods

AddEdgeTo(ControlFlowNode)

public void AddEdgeTo(ControlFlowNode target)

Parameters

target ControlFlowNode

Dominates(ControlFlowNode)

Gets whether this dominates node.

public bool Dominates(ControlFlowNode node)

Parameters

node ControlFlowNode

Returns

bool

TraversePostOrder(Func<ControlFlowNode, IEnumerable<ControlFlowNode>>, Action<ControlFlowNode>)

public void TraversePostOrder(Func<ControlFlowNode, IEnumerable<ControlFlowNode>> children, Action<ControlFlowNode> visitAction)

Parameters

children Func<ControlFlowNode, IEnumerable<ControlFlowNode>>
visitAction Action<ControlFlowNode>

TraversePreOrder(Func<ControlFlowNode, IEnumerable<ControlFlowNode>>, Action<ControlFlowNode>)

public void TraversePreOrder(Func<ControlFlowNode, IEnumerable<ControlFlowNode>> children, Action<ControlFlowNode> visitAction)

Parameters

children Func<ControlFlowNode, IEnumerable<ControlFlowNode>>
visitAction Action<ControlFlowNode>