Search Results for

    Show / Hide Table of Contents

    Interface ILinearInstructionSelector<TInstruction>

    An instruction selection algorithm for instruction sets that produce linear streams of instructions, that is, control flow is expressed using branches to branch targets.

    Inherited Members
    IInstructionSelector<TInstruction>.SelectInstructions(NamedInstruction)
    Namespace: Flame.Compiler.Target
    Assembly: Flame.Compiler.dll
    Syntax
    public interface ILinearInstructionSelector<TInstruction> : IInstructionSelector<TInstruction>
    Type Parameters
    Name Description
    TInstruction

    The type of instructions to produce.

    Methods

    | Edit this page View Source

    CreateBlockMarker(BasicBlock)

    Creates a sequence of instructions that declare the start of a basic block.

    Declaration
    IReadOnlyList<TInstruction> CreateBlockMarker(BasicBlock block)
    Parameters
    Type Name Description
    BasicBlock block

    The basic block to mark.

    Returns
    Type Description
    IReadOnlyList<TInstruction>

    A sequence of instructions that mark a block.

    | Edit this page View Source

    CreateJumpTo(BasicBlockTag)

    Creates an unconditional jump to a particular branch target.

    Declaration
    IReadOnlyList<TInstruction> CreateJumpTo(BasicBlockTag target)
    Parameters
    Type Name Description
    BasicBlockTag target

    A basic block tag that uniquely identifies a branch target.

    Returns
    Type Description
    IReadOnlyList<TInstruction>

    An unconditional jump.

    | Edit this page View Source

    SelectInstructions(BlockFlow, BasicBlockTag, FlowGraph, BasicBlockTag, out BasicBlockTag)

    Selects instructions for a particular IR block flow.

    Declaration
    SelectedFlowInstructions<TInstruction> SelectInstructions(BlockFlow flow, BasicBlockTag blockTag, FlowGraph graph, BasicBlockTag preferredFallthrough, out BasicBlockTag fallthrough)
    Parameters
    Type Name Description
    BlockFlow flow

    The IR block flow to translate to target-specific instructions.

    BasicBlockTag blockTag

    The tag of the basic block that defines the flow.

    FlowGraph graph

    The IR graph that defines the flow.

    BasicBlockTag preferredFallthrough

    A preferred fallthrough block, which will likely result in better codegen if chosen as fallthrough. May be null.

    BasicBlockTag fallthrough

    The fallthrough block expected by the selected instruction, if any.

    Returns
    Type Description
    SelectedFlowInstructions<TInstruction>

    A batch of selected instructions.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX