Search Results for

    Show / Hide Table of Contents

    Class SwitchSimplification

    An optimization that transforms switch flows in a way that makes it easier for other optimizations to reason about said switches.

    Inheritance
    object
    Optimization
    IntraproceduralOptimization
    SwitchSimplification
    Inherited Members
    IntraproceduralOptimization.IsCheckpoint
    IntraproceduralOptimization.ApplyAsync(MethodBody, OptimizationState)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Compiler.Transforms
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class SwitchSimplification : IntraproceduralOptimization

    Fields

    | Edit this page View Source

    Instance

    An instance of the switch simplification optimization.

    Declaration
    public static readonly SwitchSimplification Instance
    Field Value
    Type Description
    SwitchSimplification

    Methods

    | Edit this page View Source

    Apply(FlowGraph)

    Simplifies switches in a particular flow graph.

    Declaration
    public override FlowGraph Apply(FlowGraph graph)
    Parameters
    Type Name Description
    FlowGraph graph

    The graph to transform.

    Returns
    Type Description
    FlowGraph

    A transformed graph.

    Overrides
    IntraproceduralOptimization.Apply(FlowGraph)
    | Edit this page View Source

    TrySimplifySwitchFlow(BasicBlockBuilder)

    Tries to simplify a basic block's switch flow, provided that the block ends in switch flow.

    Declaration
    public static bool TrySimplifySwitchFlow(BasicBlockBuilder block)
    Parameters
    Type Name Description
    BasicBlockBuilder block

    The basic block to simplify.

    Returns
    Type Description
    bool

    true if the block's flow was simplified; otherwise, false.

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