Show / Hide Table of Contents

    Class OptimizationState

    A container for shared optimization state.

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

    Constructors

    | Improve this Doc 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

    | Improve this Doc View Source

    Method

    Gets the method that is being optimized.

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

    A method.

    | Improve this Doc View Source

    Optimizer

    Gets the optimizer that triggered the optimization.

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

    A method optimizer.

    Methods

    | Improve this Doc 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
    System.Collections.Generic.IEnumerable<IMethod> methods

    The methods whose method bodies are requested.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<IMethod, MethodBody>>

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

    | Improve this Doc 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
    System.Threading.Tasks.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.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX