Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify conversion sequences and overload scoring #261

Merged

Commits on Jun 12, 2024

  1. Simplify conversion sequences and overload scoring

    This change is a shift in how conversion sequences and overload scoring
    is handled to disambiguate a few cases that DXC handles today through
    simpler rules.
    
    The main cases relate to scoring conversion sequences with dimension
    adjustment conversions. With this change an implicit conversion sequence
    is now defined as:
    
    * Value conversion (lvalue to rvalue or array decay)
    * Data conversion (int/float/bool/struct promotion or conversion)
    * Dimension conversion (splat or truncate)
    * CV qualifier conversion (add const)
    
    Conversion sequences are still assigned the rank of their "highest"
    conversion following the same chart as before where the ranks are:
    
    * Exact Match
    * Extension
    * Promotion
    * Conversion
    * Truncation
    
    There is an added rule that if two conversion sequences are both of rank
    *Promotion* or "Conversion" and one contains an *Extension* but the
    other does not, the conversion without the *Extension* is the better
    conversion sequence.
    
    Given these rules:
    
    ICS(float -> double) > ICS(float -> double3)
    ICS(float -> double3) > ICS(float -> half)
    ICS(float -> double2) == ICS(float -> dobule3)
    ICS(float -> half) > ICS(float -> half3)
    ICS(float4 -> double3) > ICS(float4 -> half3)
    ICS(float4 -> double4) > ICS(float4 -> float2)
    ICS(float4 -> half4) > ICS(float4 -> float2)
    llvm-beanz committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    64e905b View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. Update disambiguation rule

    This updates the ordering of conversion ranks and disambiguation rule to handle a few more cases:
    
    ICS(float -> double) > ICS(float -> float3)
    ICS(float -> float3) > ICS(float -> double3)
    ICS(float -> double4) > ICS(float -> half4)
    ICS(float -> double4) != ICS(float -> double3)
    ICS(double -> float4) != ICS(double -> float3)
    ICS(double -> float4) != ICS(double -> half3)
    
    ICS(float4 -> float3) > ICS(float4 -> double3)
    ICS(float4 -> float3) > ICS(float4 -> half3)
    ICS(float4 -> double3) > ICS(float4 -> half3)
    ICS(double4 -> float3) != ICS(double4 ->half3)
    ICS(half4 -> float3) != ICS(half4 ->double3)
    llvm-beanz committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    e0473c9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a1d5f3 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2024

  1. Configuration menu
    Copy the full SHA
    43f9198 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. Remove disambiguation rule

    It is no longer relevant
    llvm-beanz committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    a64042c View commit details
    Browse the repository at this point in the history