Search Results for

    Show / Hide Table of Contents

    Class BlockFixpointAnalysis<TBlockState>

    A base class for analyses that process blocks until they reach a fixpoint.

    Inheritance
    object
    BlockFixpointAnalysis<TBlockState>
    Implements
    IFlowGraphAnalysis<BlockFixpointAnalysis<TBlockState>.Result>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Compiler.Analysis
    Assembly: Flame.Compiler.dll
    Syntax
    public abstract class BlockFixpointAnalysis<TBlockState> : IFlowGraphAnalysis<BlockFixpointAnalysis<TBlockState>.Result>
    Type Parameters
    Name Description
    TBlockState

    The result of analyzing a single block.

    Methods

    | Edit this page View Source

    Analyze(FlowGraph)

    Analyzes a flow graph from scratch.

    Declaration
    public BlockFixpointAnalysis<TBlockState>.Result Analyze(FlowGraph graph)
    Parameters
    Type Name Description
    FlowGraph graph

    The flow graph to analyze.

    Returns
    Type Description
    BlockFixpointAnalysis<TBlockState>.Result

    The analysis' output.

    | Edit this page View Source

    AnalyzeWithUpdates(FlowGraph, Result, IReadOnlyList<FlowGraphUpdate>)

    Analyzes a flow graph based on the flow graph, the previous result, and a list of updates that were applied to the graph since the previous result.

    Declaration
    public BlockFixpointAnalysis<TBlockState>.Result AnalyzeWithUpdates(FlowGraph graph, BlockFixpointAnalysis<TBlockState>.Result previousResult, IReadOnlyList<FlowGraphUpdate> updates)
    Parameters
    Type Name Description
    FlowGraph graph

    The current version of the flow graph to analyze.

    BlockFixpointAnalysis<TBlockState>.Result previousResult

    A previous result produced by this analysis.

    IReadOnlyList<FlowGraphUpdate> updates

    A list of updates that were applied to the flow graph since the previous result was computed.

    Returns
    Type Description
    BlockFixpointAnalysis<TBlockState>.Result

    The analysis' output, which must be equal to a call to Analyze.

    | Edit this page View Source

    CreateEntryPointInput(BasicBlock)

    Creates an input block state for an entry point block.

    Declaration
    public abstract TBlockState CreateEntryPointInput(BasicBlock entryPoint)
    Parameters
    Type Name Description
    BasicBlock entryPoint

    The entry point block to create a state for.

    Returns
    Type Description
    TBlockState

    An input block state for the entry point.

    | Edit this page View Source

    Equals(TBlockState, TBlockState)

    Tests if two block states are the same.

    Declaration
    public abstract bool Equals(TBlockState first, TBlockState second)
    Parameters
    Type Name Description
    TBlockState first

    The first block state to compare.

    TBlockState second

    The second block state to compare.

    Returns
    Type Description
    bool

    true if first equals second; otherwise, false.

    | Edit this page View Source

    GetOutgoingInputs(BasicBlock, TBlockState)

    Gets a block's outgoing inputs: a sequence of key-value pairs where the keys list affected blocks and the values list values that should be merged with those blocks' inputs.

    Declaration
    public virtual IEnumerable<KeyValuePair<BasicBlockTag, TBlockState>> GetOutgoingInputs(BasicBlock block, TBlockState output)
    Parameters
    Type Name Description
    BasicBlock block

    A basic block.

    TBlockState output

    The output for that basic block, as computed by the Process method.

    Returns
    Type Description
    IEnumerable<KeyValuePair<BasicBlockTag, TBlockState>>

    A sequence of key-value pairs.

    | Edit this page View Source

    Merge(TBlockState, TBlockState)

    Merges two block states. This method unifies outgoing block states into a single input block state.

    Declaration
    public abstract TBlockState Merge(TBlockState first, TBlockState second)
    Parameters
    Type Name Description
    TBlockState first

    A first block state.

    TBlockState second

    A second block state.

    Returns
    Type Description
    TBlockState

    A merged block state.

    | Edit this page View Source

    Process(BasicBlock, TBlockState)

    Processes a block's contents.

    Declaration
    public abstract TBlockState Process(BasicBlock block, TBlockState input)
    Parameters
    Type Name Description
    BasicBlock block

    A block to process.

    TBlockState input

    The block's input state.

    Returns
    Type Description
    TBlockState

    The block's output state.

    Implements

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