Class DominatorTree
A data structure that describes the dominator tree of a control-flow graph.
Inheritance
Inherited Members
Namespace: Flame.Compiler.Analysis
Assembly: Flame.Compiler.dll
Syntax
public abstract class DominatorTree
Methods
| Improve this Doc View SourceGetImmediateDominator(BasicBlockTag)
Gets a block's immediate dominator, that is, the block that dominates this block such that there is no intermediate block that is dominated by the immediate dominator and also dominates the given block.
Declaration
public abstract BasicBlockTag GetImmediateDominator(BasicBlockTag block)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockTag | block | A block to find an immediate dominator for. |
Returns
Type | Description |
---|---|
BasicBlockTag | The tag of the immediate dominator block if it exists; otherwise, |
IsDominatedBy(BasicBlockTag, BasicBlockTag)
Tells if a particular block is dominated by another block, that is, if control cannot flow to the block unless it first flowed through the dominator block or if the blocks are equal.
Declaration
public bool IsDominatedBy(BasicBlockTag block, BasicBlockTag dominator)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockTag | block | A block that might be dominated by |
BasicBlockTag | dominator | A block that might dominate |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsDominatedBy(InstructionBuilder, ValueTag)
Tells if a particular value is dominated by another value, that is, if control cannot flow to the value unless it first flowed through the dominator value.
Declaration
public bool IsDominatedBy(InstructionBuilder value, ValueTag dominator)
Parameters
Type | Name | Description |
---|---|---|
InstructionBuilder | value | A value that might be dominated by |
ValueTag | dominator | A value that might dominate |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsDominatedBy(NamedInstruction, NamedInstruction)
Tells if a particular instruction is dominated by another instruction, that is, if control cannot flow to the instruction unless it first flowed through the dominator instruction.
Declaration
public bool IsDominatedBy(NamedInstruction instruction, NamedInstruction dominator)
Parameters
Type | Name | Description |
---|---|---|
NamedInstruction | instruction | An instruction that might be dominated by |
NamedInstruction | dominator | An instruction that might dominate |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsDominatedBy(ValueTag, ValueTag, FlowGraph)
Tells if a particular value is dominated by another value, that is, if control cannot flow to the value unless it first flowed through the dominator value.
Declaration
public bool IsDominatedBy(ValueTag value, ValueTag dominator, FlowGraph graph)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | value | A value that might be dominated by |
ValueTag | dominator | A value that might dominate |
FlowGraph | graph | A control-flow graph that defines both |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsDominatedBy(ValueTag, ValueTag, FlowGraphBuilder)
Tells if a particular value is dominated by another value, that is, if control cannot flow to the value unless it first flowed through the dominator value.
Declaration
public bool IsDominatedBy(ValueTag value, ValueTag dominator, FlowGraphBuilder graph)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | value | A value that might be dominated by |
ValueTag | dominator | A value that might dominate |
FlowGraphBuilder | graph | A control-flow graph that defines both |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsStrictlyDominatedBy(BasicBlockTag, BasicBlockTag)
Tells if a particular block is strictly dominated by another block, that is, if control cannot flow to the block unless it first flowed through the dominator block.
Declaration
public virtual bool IsStrictlyDominatedBy(BasicBlockTag block, BasicBlockTag dominator)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockTag | block | A block that might be dominated by |
BasicBlockTag | dominator | A block that might dominate |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsStrictlyDominatedBy(InstructionBuilder, ValueTag)
Tells if a particular value is strictly dominated by another value, that is, if control cannot flow to the value unless it first flowed through the dominator value.
Declaration
public bool IsStrictlyDominatedBy(InstructionBuilder value, ValueTag dominator)
Parameters
Type | Name | Description |
---|---|---|
InstructionBuilder | value | An value that might be dominated by |
ValueTag | dominator | An value that might dominate |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsStrictlyDominatedBy(NamedInstruction, NamedInstruction)
Tells if a particular instruction is strictly dominated by another instruction, that is, if control cannot flow to the instruction unless it first flowed through the dominator instruction.
Declaration
public bool IsStrictlyDominatedBy(NamedInstruction instruction, NamedInstruction dominator)
Parameters
Type | Name | Description |
---|---|---|
NamedInstruction | instruction | An instruction that might be dominated by |
NamedInstruction | dominator | An instruction that might dominate |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsStrictlyDominatedBy(ValueTag, ValueTag, FlowGraph)
Tells if a particular value is strictly dominated by another value, that is, if control cannot flow to the value unless it first flowed through the dominator value.
Declaration
public bool IsStrictlyDominatedBy(ValueTag value, ValueTag dominator, FlowGraph graph)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | value | An value that might be dominated by |
ValueTag | dominator | An value that might dominate |
FlowGraph | graph | A graph that defines both values. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsStrictlyDominatedBy(ValueTag, ValueTag, FlowGraphBuilder)
Tells if a particular value is strictly dominated by another value, that is, if control cannot flow to the value unless it first flowed through the dominator value.
Declaration
public bool IsStrictlyDominatedBy(ValueTag value, ValueTag dominator, FlowGraphBuilder graph)
Parameters
Type | Name | Description |
---|---|---|
ValueTag | value | An value that might be dominated by |
ValueTag | dominator | An value that might dominate |
FlowGraphBuilder | graph | A control-flow graph that defines both |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryFindCommonDominator(IEnumerable<BasicBlockTag>, out BasicBlockTag)
Tries to find the last common dominator of a sequence of blocks.
Declaration
public bool TryFindCommonDominator(IEnumerable<BasicBlockTag> blocks, out BasicBlockTag dominator)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<BasicBlockTag> | blocks | A sequence of blocks. |
BasicBlockTag | dominator | The last common dominator for |
Returns
Type | Description |
---|---|
System.Boolean |
|