diff options
author | Alexandros Lamprineas <alexandros.lamprineas@arm.com> | 2025-01-17 10:49:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-17 10:49:43 +0000 |
commit | 831527a5ef63d24d056afc92509caf5ceb1d3682 (patch) | |
tree | fe162a3ce14e647c8c8c4b87fa4607139fdd6e54 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 101109fc5460d5bb9bb597c6ec77f998093a6687 (diff) | |
download | llvm-831527a5ef63d24d056afc92509caf5ceb1d3682.zip llvm-831527a5ef63d24d056afc92509caf5ceb1d3682.tar.gz llvm-831527a5ef63d24d056afc92509caf5ceb1d3682.tar.bz2 |
[FMV][GlobalOpt] Statically resolve calls to versioned functions. (#87939)
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)
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions