Search Results for

    Show / Hide Table of Contents

    Class PartialScalarReplacement

    An optimization that replaces aggregates by scalars, i.e., their fields. Depending on the control-flow graph, aggregates might be replaced by scalars on some control-flow paths while remaining untouched on others.

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

    Constructors

    | Edit this page View Source

    PartialScalarReplacement(Func<IType, bool>)

    Creates a partial scalar replacement pass.

    Declaration
    public PartialScalarReplacement(Func<IType, bool> canReplaceByScalars)
    Parameters
    Type Name Description
    Func<IType, bool> canReplaceByScalars

    Tells if a type is an aggregate that can be replaced by scalars.

    Fields

    | Edit this page View Source

    Instance

    An instance of the partial scalar replacement transform.

    Declaration
    public static readonly Optimization Instance
    Field Value
    Type Description
    Optimization

    A partial scalar replacement transform instance.

    Properties

    | Edit this page View Source

    CanReplaceByScalars

    Tells if a particular type is an aggregate that can be replaced by scalars.

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

    A predicate function.

    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