llvm-project/clang/utils/TableGen
Erich Keane 3efe00206f Implement cpu_dispatch/cpu_specific Multiversioning
As documented here: https://software.intel.com/en-us/node/682969 and
https://software.intel.com/en-us/node/523346. cpu_dispatch multiversioning
is an ICC feature that provides for function multiversioning.

This feature is implemented with two attributes: First, cpu_specific,
which specifies the individual function versions. Second, cpu_dispatch,
which specifies the location of the resolver function and the list of
resolvable functions.

This is valuable since it provides a mechanism where the resolver's TU
can be specified in one location, and the individual implementions
each in their own translation units.

The goal of this patch is to be source-compatible with ICC, so this
implementation diverges from the ICC implementation in a few ways:
1- Linux x86/64 only: This implementation uses ifuncs in order to
properly dispatch functions. This is is a valuable performance benefit
over the ICC implementation. A future patch will be provided to enable
this feature on Windows, but it will obviously more closely fit ICC's
implementation.
2- CPU Identification functions: ICC uses a set of custom functions to identify
the feature list of the host processor. This patch uses the cpu_supports
functionality in order to better align with 'target' multiversioning.
1- cpu_dispatch function def/decl: ICC's cpu_dispatch requires that the function
marked cpu_dispatch be an empty definition. This patch supports that as well,
however declarations are also permitted, since the linker will solve the
issue of multiple emissions.

Differential Revision: https://reviews.llvm.org/D47474

llvm-svn: 337552
2018-07-20 14:13:28 +00:00
..
CMakeLists.txt Move the clang-tblgen project into the Clang tablegenning folder on IDEs like Visual Studio rather than leave it in the root directory. NFC. 2017-11-04 20:06:22 +00:00
ClangASTNodesEmitter.cpp TableGen: Adapt to llvm r288612 2016-12-04 05:55:09 +00:00
ClangAttrEmitter.cpp Implement cpu_dispatch/cpu_specific Multiversioning 2018-07-20 14:13:28 +00:00
ClangCommentCommandInfoEmitter.cpp Fix Clang-tidy modernize-use-nullptr warnings in headers and generated files; other minor cleanups. 2015-09-29 20:56:43 +00:00
ClangCommentHTMLNamedCharacterReferenceEmitter.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
ClangCommentHTMLTagsEmitter.cpp
ClangDataCollectorsEmitter.cpp Add '\n' in ClangDataCollectorsEmitter 2017-09-08 16:17:16 +00:00
ClangDiagnosticsEmitter.cpp [ClangDiagnostics] Silence warning about fallthrough after PrintFatalError 2018-05-26 09:24:00 +00:00
ClangOptionDocEmitter.cpp [clang] Change std::sort to llvm::sort in response to r327219 2018-03-27 16:50:00 +00:00
ClangSACheckersEmitter.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
NeonEmitter.cpp [AArch64] Corrected FP16 Intrinsic range checks in Clang + added Sema tests 2018-06-12 09:54:27 +00:00
TableGen.cpp [AArch64] Add ARMv8.2-A FP16 scalar intrinsics 2018-01-19 23:11:18 +00:00
TableGenBackends.h [AArch64] Add ARMv8.2-A FP16 scalar intrinsics 2018-01-19 23:11:18 +00:00