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

[FMV][GlobalOpt] Statically resolve calls to versioned functions. #87939

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Apr 9, 2024

  1. [FMV][GlobalOpt] Bypass the IFunc Resolver of MultiVersioned functions.

    To deduce whether the optimization is legal we need to compare the target
    features between caller and callee versions. The criteria for bypassing
    the resolver are the following:
    
     * If the callee's feature set is a subset of the caller's feature set,
       then the callee is a candidate for direct call.
    
     * Among such candidates the one of highest priority is the best match
       and it shall be picked, unless there is a version of the callee with
       higher priority than the best match which cannot be picked from a
       higher priority caller (directly or through the resolver).
    
     * For every higher priority callee version than the best match, there
       is a higher priority caller version whose feature set availability
       is implied by the callee's feature set.
    
    Example:
    
    Callers and Callees are ordered in decreasing priority.
    The arrows indicate successful call redirections.
    
      Caller        Callee      Explanation
    =========================================================================
    mops+sve2 --+--> mops       all the callee versions are subsets of the
                |               caller but mops has the highest priority
                |
         mops --+    sve2       between mops and default callees, mops wins
    
          sve        sve        between sve and default callees, sve wins
                                but sve2 does not have a high priority caller
    
      default -----> default    sve (callee) implies sve (caller),
                                sve2(callee) implies sve (caller),
                                mops(callee) implies mops(caller)
    labrinea committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    02bd5a7 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2024

  1. Configuration menu
    Copy the full SHA
    1a564f7 View commit details
    Browse the repository at this point in the history
  2. Changes from last revision:

    * clang format
    * remove leftover target hook hasFMV after rebase
    * remove filter in regression test after rebase
    labrinea committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    16aa3ba View commit details
    Browse the repository at this point in the history