Search Results for

    Show / Hide Table of Contents

    Class OptimizationState

    A container for shared optimization state.

    Inheritance
    object
    OptimizationState
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Compiler.Pipeline
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class OptimizationState

    Constructors

    | Edit this page View Source

    OptimizationState(IMethod, Optimizer)

    Creates optimization state for a method.

    Declaration
    public OptimizationState(IMethod method, Optimizer optimizer)
    Parameters
    Type Name Description
    IMethod method

    The method to create the optimization state for.

    Optimizer optimizer

    The optimizer that is optimizing the method.

    Properties

    | Edit this page View Source

    Method

    Gets the method that is being optimized.

    Declaration
    public IMethod Method { get; }
    Property Value
    Type Description
    IMethod

    A method.

    | Edit this page View Source

    Optimizer

    Gets the optimizer that triggered the optimization.

    Declaration
    public Optimizer Optimizer { get; }
    Property Value
    Type Description
    Optimizer

    A method optimizer.

    Methods

    | Edit this page View Source

    GetBodiesAsync(IEnumerable<IMethod>)

    Asynchronously requests a series of method bodies. The requests may execute concurrently.

    Declaration
    public Task<IReadOnlyDictionary<IMethod, MethodBody>> GetBodiesAsync(IEnumerable<IMethod> methods)
    Parameters
    Type Name Description
    IEnumerable<IMethod> methods

    The methods whose method bodies are requested.

    Returns
    Type Description
    Task<IReadOnlyDictionary<IMethod, MethodBody>>

    A mapping of all unique methods in methods to their bodies.

    | Edit this page View Source

    GetBodyAsync(IMethod)

    Asynchronously requests a method's body.

    Declaration
    public Task<MethodBody> GetBodyAsync(IMethod method)
    Parameters
    Type Name Description
    IMethod method

    The method whose body is requested.

    Returns
    Type Description
    Task<MethodBody>

    The method's body.

    Remarks

    The optimizer is free to return any method body that is semantically equivalent to method's body. This ranges from method's initial method body to its final optimized body.

    Which version of method's body is returned depends on the optimizer. The optimizer is expected to return a method body that is as optimized as possible given the constraints imposed by the optimizer's implementation.

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