Show / Hide Table of Contents

    Struct RelatedValues

    A symmetric relation that consists of all pairs of values that are direct copies of each other.

    A value is deemed a copy of another value if the former is produced by a copy instruction that references the latter or if the former is a block parameter and there is a branch that specifies the latter as the argument to the former.

    This information can be useful for the purpose of register allocation: allocating two related values to the same register will elide a copy.

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: Flame.Compiler.Analysis
    Assembly: Flame.Compiler.dll
    Syntax
    public struct RelatedValues

    Methods

    | Improve this Doc View Source

    AreRelated(ValueTag, ValueTag)

    Tests if two values are related.

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

    A first value.

    ValueTag second

    A second value.

    Returns
    Type Description
    System.Boolean

    true if the values are related; otherwise, false.

    | Improve this Doc View Source

    GetRelatedValues(ValueTag)

    Gets the set of all values related to a particular value.

    Declaration
    public IEnumerable<ValueTag> GetRelatedValues(ValueTag value)
    Parameters
    Type Name Description
    ValueTag value

    The related value.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<ValueTag>

    The set of related values.

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