Search Results for

    Show / Hide Table of Contents

    Class ScalarReplacement

    The scalar replacement of aggregates transform, which tries to decompose local variables of aggregate types, replacing them with other local variables that represent their fields.

    Inheritance
    object
    Optimization
    IntraproceduralOptimization
    ScalarReplacement
    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 ScalarReplacement : IntraproceduralOptimization

    Constructors

    | Edit this page View Source

    ScalarReplacement(Func<IType, bool>)

    Creates a scalar replacement of aggregates pass.

    Declaration
    public ScalarReplacement(Func<IType, bool> canAccessFields)
    Parameters
    Type Name Description
    Func<IType, bool> canAccessFields

    A predicate that tells if all fields in a type can be accessed for the purpose of scalar replacement.

    Fields

    | Edit this page View Source

    Instance

    An instance of the scalar replacement transform.

    Declaration
    public static readonly Optimization Instance
    Field Value
    Type Description
    Optimization

    Properties

    | Edit this page View Source

    CanAccessFields

    Tells if all fields in a type can be accessed for the purpose of scalar replacement.

    Declaration
    public Func<IType, bool> CanAccessFields { get; }
    Property Value
    Type Description
    Func<IType, bool>

    A predicate.

    Methods

    | Edit this page View Source

    Apply(FlowGraph)

    Applies this intraprocedural optimization to a flow graph.

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

    The flow graph to transform.

    Returns
    Type Description
    FlowGraph

    A transformed flow graph.

    Overrides
    IntraproceduralOptimization.Apply(FlowGraph)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX