Show / Hide Table of Contents

    Struct BasicBlock

    A basic block in a control-flow graph.

    Implements
    System.IEquatable<BasicBlock>
    Inherited Members
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Flame.Compiler
    Assembly: Flame.Compiler.dll
    Syntax
    public struct BasicBlock : IEquatable<BasicBlock>

    Properties

    | Improve this Doc View Source

    Flow

    Gets the control flow at the end of this basic block.

    Declaration
    public BlockFlow Flow { get; }
    Property Value
    Type Description
    BlockFlow

    The end-of-block control flow.

    | Improve this Doc View Source

    Graph

    Gets the control-flow graph in which this block resides.

    Declaration
    public FlowGraph Graph { get; }
    Property Value
    Type Description
    FlowGraph

    A control-flow graph.

    | Improve this Doc View Source

    InstructionTags

    Gets the list of all instruction tags in this basic block.

    Declaration
    public ImmutableList<ValueTag> InstructionTags { get; }
    Property Value
    Type Description
    System.Collections.Immutable.ImmutableList<ValueTag>

    The list of all instruction tags.

    | Improve this Doc View Source

    IsEntryPoint

    Tells if this block is the graph's entry point.

    Declaration
    public bool IsEntryPoint { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    NamedInstructions

    Gets the list of all named instructions in this basic block.

    Declaration
    public IEnumerable<NamedInstruction> NamedInstructions { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<NamedInstruction>

    The list of all named instructions.

    | Improve this Doc View Source

    Parameters

    Gets this basic block's list of parameters.

    Declaration
    public ImmutableList<BlockParameter> Parameters { get; }
    Property Value
    Type Description
    System.Collections.Immutable.ImmutableList<BlockParameter>

    The basic block's parameters.

    | Improve this Doc View Source

    ParameterTags

    Gets a sequence of all parameter tags defined by this basic block.

    Declaration
    public IEnumerable<ValueTag> ParameterTags { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ValueTag>

    The basic block's parameter tags.

    | Improve this Doc View Source

    Tag

    Gets this basic block's tag.

    Declaration
    public BasicBlockTag Tag { get; }
    Property Value
    Type Description
    BasicBlockTag

    The basic block's tag.

    Methods

    | Improve this Doc View Source

    AppendInstruction(Instruction)

    Appends a new instruction to the end of this basic block. Returns a new basic block in a new control-flow graph.

    Declaration
    public NamedInstruction AppendInstruction(Instruction instruction)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to append.

    Returns
    Type Description
    NamedInstruction

    The appended instruction.

    | Improve this Doc View Source

    AppendInstruction(Instruction, ValueTag)

    Appends a new instruction to the end of this basic block. Returns a new basic block in a new control-flow graph.

    Declaration
    public NamedInstruction AppendInstruction(Instruction instruction, ValueTag tag)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to append.

    ValueTag tag

    The tag for the instruction.

    Returns
    Type Description
    NamedInstruction

    The appended instruction.

    | Improve this Doc View Source

    AppendInstruction(Instruction, String)

    Appends a new instruction to the end of this basic block. Returns a new basic block in a new control-flow graph.

    Declaration
    public NamedInstruction AppendInstruction(Instruction instruction, string name)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to append.

    System.String name

    The preferred name of the instruction's tag.

    Returns
    Type Description
    NamedInstruction

    The appended instruction.

    | Improve this Doc View Source

    AppendParameter(BlockParameter)

    Appends a new parameter to the end of this basic block's parameter list. Returns a new basic block in a new control-flow graph.

    Declaration
    public BasicBlock AppendParameter(BlockParameter parameter)
    Parameters
    Type Name Description
    BlockParameter parameter

    The parameter to append.

    Returns
    Type Description
    BasicBlock

    A new basic block in a new control-flow graph.

    | Improve this Doc View Source

    Equals(BasicBlock)

    Tests if this basic block equals another basic block.

    Declaration
    public bool Equals(BasicBlock other)
    Parameters
    Type Name Description
    BasicBlock other

    The other basic block.

    Returns
    Type Description
    System.Boolean

    true if this basic block equals the other basic block; otherwise, false.

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()
    | Improve this Doc View Source

    InsertInstruction(Int32, Instruction)

    Inserts a new instruction into this basic block's list of instructions. Returns a new basic block in a new control-flow graph.

    Declaration
    public NamedInstruction InsertInstruction(int index, Instruction instruction)
    Parameters
    Type Name Description
    System.Int32 index

    The index at which the instruction is to be inserted.

    Instruction instruction

    The instruction to insert.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction.

    | Improve this Doc View Source

    InsertInstruction(Int32, Instruction, ValueTag)

    Inserts a new instruction into this basic block's list of instructions. Returns a new basic block in a new control-flow graph.

    Declaration
    public NamedInstruction InsertInstruction(int index, Instruction instruction, ValueTag tag)
    Parameters
    Type Name Description
    System.Int32 index

    The index at which the instruction is to be inserted.

    Instruction instruction

    The instruction to insert.

    ValueTag tag

    The tag for the instruction.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction.

    | Improve this Doc View Source

    InsertInstruction(Int32, Instruction, String)

    Inserts a new instruction into this basic block's list of instructions. Returns a new basic block in a new control-flow graph.

    Declaration
    public NamedInstruction InsertInstruction(int index, Instruction instruction, string name)
    Parameters
    Type Name Description
    System.Int32 index

    The index at which the instruction is to be inserted.

    Instruction instruction

    The instruction to insert.

    System.String name

    The preferred name of the instruction's tag.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction.

    | Improve this Doc View Source

    RemoveInstruction(ValueTag)

    Removes the instruction with a particular tag from this basic block. Returns a new basic block in a new control-flow graph.

    Declaration
    public BasicBlock RemoveInstruction(ValueTag tag)
    Parameters
    Type Name Description
    ValueTag tag

    The tag of the instruction to remove.

    Returns
    Type Description
    BasicBlock

    A new basic block in a new control-flow graph.

    | Improve this Doc View Source

    WithFlow(BlockFlow)

    Creates a new basic block in a new control-flow graph that has a particular flow.

    Declaration
    public BasicBlock WithFlow(BlockFlow flow)
    Parameters
    Type Name Description
    BlockFlow flow

    The new flow.

    Returns
    Type Description
    BasicBlock

    A new basic block in a new control-flow graph.

    | Improve this Doc View Source

    WithParameters(IReadOnlyList<BlockParameter>)

    Creates a new basic block in a new control-flow graph that has a particular list of parameters.

    Declaration
    public BasicBlock WithParameters(IReadOnlyList<BlockParameter> parameters)
    Parameters
    Type Name Description
    System.Collections.Generic.IReadOnlyList<BlockParameter> parameters

    The new parameters.

    Returns
    Type Description
    BasicBlock

    A new basic block in a new control-flow graph.

    | Improve this Doc View Source

    WithParameters(ImmutableList<BlockParameter>)

    Creates a new basic block in a new control-flow graph that has a particular list of parameters.

    Declaration
    public BasicBlock WithParameters(ImmutableList<BlockParameter> parameters)
    Parameters
    Type Name Description
    System.Collections.Immutable.ImmutableList<BlockParameter> parameters

    The new parameters.

    Returns
    Type Description
    BasicBlock

    A new basic block in a new control-flow graph.

    Operators

    | Improve this Doc View Source

    Implicit(BasicBlock to BasicBlockTag)

    Implicitly converts a block to its tag.

    Declaration
    public static implicit operator BasicBlockTag(BasicBlock block)
    Parameters
    Type Name Description
    BasicBlock block

    The block to convert.

    Returns
    Type Description
    BasicBlockTag

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX