Search Results for

    Show / Hide Table of Contents

    Struct BasicBlock

    A basic block in a control-flow graph.

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

    Properties

    | Edit this page 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.

    | Edit this page View Source

    Graph

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

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

    A control-flow graph.

    | Edit this page View Source

    InstructionTags

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

    Declaration
    public ImmutableList<ValueTag> InstructionTags { get; }
    Property Value
    Type Description
    ImmutableList<ValueTag>

    The list of all instruction tags.

    | Edit this page View Source

    IsEntryPoint

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

    Declaration
    public bool IsEntryPoint { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    NamedInstructions

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

    Declaration
    public IEnumerable<NamedInstruction> NamedInstructions { get; }
    Property Value
    Type Description
    IEnumerable<NamedInstruction>

    The list of all named instructions.

    | Edit this page 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
    IEnumerable<ValueTag>

    The basic block's parameter tags.

    | Edit this page View Source

    Parameters

    Gets this basic block's list of parameters.

    Declaration
    public ImmutableList<BlockParameter> Parameters { get; }
    Property Value
    Type Description
    ImmutableList<BlockParameter>

    The basic block's parameters.

    | Edit this page View Source

    Tag

    Gets this basic block's tag.

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

    The basic block's tag.

    Methods

    | Edit this page 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.

    | Edit this page 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.

    | Edit this page 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.

    string name

    The preferred name of the instruction's tag.

    Returns
    Type Description
    NamedInstruction

    The appended instruction.

    | Edit this page 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.

    | Edit this page 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
    bool

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

    | Edit this page View Source

    Equals(object)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if obj and this instance are the same type and represent the same value; otherwise, false.

    Overrides
    ValueType.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit signed integer that is the hash code for this instance.

    Overrides
    ValueType.GetHashCode()
    | Edit this page View Source

    InsertInstruction(int, 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
    int index

    The index at which the instruction is to be inserted.

    Instruction instruction

    The instruction to insert.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction.

    | Edit this page View Source

    InsertInstruction(int, 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
    int 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.

    | Edit this page View Source

    InsertInstruction(int, 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
    int index

    The index at which the instruction is to be inserted.

    Instruction instruction

    The instruction to insert.

    string name

    The preferred name of the instruction's tag.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction.

    | Edit this page 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.

    | Edit this page 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.

    | Edit this page 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
    IReadOnlyList<BlockParameter> parameters

    The new parameters.

    Returns
    Type Description
    BasicBlock

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

    | Edit this page 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
    ImmutableList<BlockParameter> parameters

    The new parameters.

    Returns
    Type Description
    BasicBlock

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

    Operators

    | Edit this page View Source

    implicit operator BasicBlockTag(BasicBlock)

    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

    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX