Search Results for

    Show / Hide Table of Contents

    Class ValueNumberingInstructionComparer

    A specialized instruction comparer for instructions that uses value numbers to more accurately compare instructions. Assumes that all instructions being compared are defined by the same graph. The equality relation that arises from this comparer is that of semantic instruction equivalence, not of syntactic equality.

    Inheritance
    object
    ValueNumberingInstructionComparer
    Implements
    IEqualityComparer<Instruction>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Compiler.Analysis
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class ValueNumberingInstructionComparer : IEqualityComparer<Instruction>

    Constructors

    | Edit this page View Source

    ValueNumberingInstructionComparer(ValueNumbering)

    Creates an instruction comparer that uses a value numbering to decide if two instructions are equivalent.

    Declaration
    public ValueNumberingInstructionComparer(ValueNumbering numbering)
    Parameters
    Type Name Description
    ValueNumbering numbering

    The value numbering to use for deciding if instructions are equivalent.

    Methods

    | Edit this page View Source

    Equals(Instruction, Instruction)

    Tests if two instructions are equivalent in a value numbering sense. 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 bool Equals(Instruction a, Instruction b)
    Parameters
    Type Name Description
    Instruction a

    The first instruction to compare.

    Instruction b

    The second instruction to compare.

    Returns
    Type Description
    bool

    true if the instructions are equivalent; otherwise, false.

    | Edit this page View Source

    GetHashCode(Instruction)

    Computes a hash code for an instruction.

    Declaration
    public int GetHashCode(Instruction obj)
    Parameters
    Type Name Description
    Instruction obj

    The instruction to hash.

    Returns
    Type Description
    int

    A hash code.

    Implements

    IEqualityComparer<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX