Show / Hide Table of Contents

    Class ValueNumbering

    A mapping of values to representative values for a particular control-flow graph.

    Inheritance
    System.Object
    ValueNumbering
    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.Analysis
    Assembly: Flame.Compiler.dll
    Syntax
    public abstract class ValueNumbering

    Methods

    | Improve this Doc View Source

    AreEquivalent(Instruction, Instruction)

    Tests if two instructions are equivalent. Instructions 'a', 'b' are considered to be equivalent iff 'a' dominates 'b' implies that 'b' can be replaced with a copy of the result computed by 'a'.

    Declaration
    public virtual bool AreEquivalent(Instruction first, Instruction second)
    Parameters
    Type Name Description
    Instruction first

    The first instruction to consider.

    Instruction second

    The second instruction to consider.

    Returns
    Type Description
    System.Boolean

    true if the instructions are equivalent; otherwise, false.

    | Improve this Doc View Source

    AreEquivalent(Instruction, ValueTag)

    Tests if an instruction is equivalent to a value.

    Declaration
    public bool AreEquivalent(Instruction first, ValueTag second)
    Parameters
    Type Name Description
    Instruction first

    The instruction to consider.

    ValueTag second

    The value to consider.

    Returns
    Type Description
    System.Boolean

    true if the instruction is equivalent to the value; otherwise, false.

    | Improve this Doc View Source

    AreEquivalent(ValueTag, ValueTag)

    Tests if two values are equivalent. Values 'a', 'b' are considered to be equivalent iff 'a' dominates 'b' implies that 'b' can be replaced with a copy of 'a'.

    Declaration
    public bool AreEquivalent(ValueTag first, ValueTag second)
    Parameters
    Type Name Description
    ValueTag first

    The first value to consider.

    ValueTag second

    The second value to consider.

    Returns
    Type Description
    System.Boolean

    true if the values are equivalent; otherwise, false.

    | Improve this Doc View Source

    GetNumber(ValueTag)

    Gets a value's "number," i.e., another value that is representative of the set of all values that are equivalent with the value.

    Declaration
    public abstract ValueTag GetNumber(ValueTag value)
    Parameters
    Type Name Description
    ValueTag value

    A value tag to examine.

    Returns
    Type Description
    ValueTag

    The set representative for the set of all values equivalent with value. Requesting the set representative of another value that is equivalent with value will produce the same set representative.

    | Improve this Doc View Source

    TryGetNumber(Instruction, out ValueTag)

    Tries to compute the value number of an instruction.

    Declaration
    public abstract bool TryGetNumber(Instruction instruction, out ValueTag number)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to number.

    ValueTag number

    A value number if a value is found that is equivalent to instruction; otherwise, null.

    Returns
    Type Description
    System.Boolean

    true if a value is found that is equivalent to instruction; otherwise, false.

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