diff options
| author | Erich Keane <erich.keane@intel.com> | 2018-10-25 18:57:19 +0000 |
|---|---|---|
| committer | Erich Keane <erich.keane@intel.com> | 2018-10-25 18:57:19 +0000 |
| commit | 19a8adc9bd2785698c1d5429503fd406d95b6c53 (patch) | |
| tree | 79e0cbe7c653251b6a98179bbd759bdd3887acc9 /clang/lib/Basic/Targets/X86.h | |
| parent | 4a825e7b29f4bc1f3543a8b94106e5006be8e833 (diff) | |
| download | bcm5719-llvm-19a8adc9bd2785698c1d5429503fd406d95b6c53.tar.gz bcm5719-llvm-19a8adc9bd2785698c1d5429503fd406d95b6c53.zip | |
Implement Function Multiversioning for Non-ELF Systems.
Similar to how ICC handles CPU-Dispatch on Windows, this patch uses the
resolver function directly to forward the call to the proper function.
This is not nearly as efficient as IFuncs of course, but is still quite
useful for large functions specifically developed for certain
processors.
This is unfortunately still limited to x86, since it depends on
__builtin_cpu_supports and __builtin_cpu_is, which are x86 builtins.
The naming for the resolver/forwarding function for cpu-dispatch was
taken from ICC's implementation, which uses the unmodified name for this
(no mangling additions). This is possible, since cpu-dispatch uses '.A'
for the 'default' version.
In 'target' multiversioning, this function keeps the '.resolver'
extension in order to keep the default function keeping the default
mangling.
Change-Id: I4731555a39be26c7ad59a2d8fda6fa1a50f73284
Differential Revision: https://reviews.llvm.org/D53586
llvm-svn: 345298
Diffstat (limited to 'clang/lib/Basic/Targets/X86.h')
| -rw-r--r-- | clang/lib/Basic/Targets/X86.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/Basic/Targets/X86.h b/clang/lib/Basic/Targets/X86.h index a77757af673..07151c7f5b4 100644 --- a/clang/lib/Basic/Targets/X86.h +++ b/clang/lib/Basic/Targets/X86.h @@ -290,9 +290,6 @@ public: return checkCPUKind(CPU = getCPUKind(Name)); } - bool supportsMultiVersioning() const override { - return getTriple().isOSBinFormatELF(); - } unsigned multiVersionSortPriority(StringRef Name) const override; bool setFPMath(StringRef Name) override; |

