diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2022-02-04 09:38:22 -0800 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-02-18 15:46:41 -0800 |
| commit | 6323ccfa733da6ca55f8a69c0398f12a78bb32f7 (patch) | |
| tree | d38eb0fa28a235789fc6e60589e1a25a81cc6dbb /src | |
| parent | 181d7ea0531816eba952f1576429a84aaf055528 (diff) | |
qsimd: Remove QT_COMPILER_SUPPORTS_SIMD_ALWAYS
All[*] compilers support it, always. The last to not support it was GCC
4.8, which we don't support in Qt 6.
[*] Anecdotally, clang-cl doesn't but clang-cl isn't supported and that
would be an upstream problem: clang-cl developers must find a solution
that either matches Clang or cl.exe.
Change-Id: I54f205f6b7314351b078fffd16d0a5ed5b7afae5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/global/qlogging.cpp | 2 | ||||
| -rw-r--r-- | src/corelib/global/qsimd_p.h | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index a50eccfa7f7..7b8c030e542 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1273,7 +1273,7 @@ void QMessagePattern::setPattern(const QString &pattern) #if defined(QLOGGING_HAVE_BACKTRACE) && !defined(QT_BOOTSTRAPPED) // make sure the function has "Message" in the name so the function is removed -#if ((defined(Q_CC_GNU) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS)) || __has_attribute(optimize)) \ +#if (defined(Q_CC_GNU) || __has_attribute(optimize)) \ && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) // force skipping the frame pointer, to save the backtrace() function some work __attribute__((optimize("omit-frame-pointer"))) diff --git a/src/corelib/global/qsimd_p.h b/src/corelib/global/qsimd_p.h index 8f71b34feae..ab865f09858 100644 --- a/src/corelib/global/qsimd_p.h +++ b/src/corelib/global/qsimd_p.h @@ -103,6 +103,9 @@ * sub-arch. Only inside such functions is the use of the intrisics * guaranteed to work. This is useful with runtime detection (see below). * + * The distinction between QT_COMPILER_SUPPORTS and QT_COMPILER_SUPPORTS_HERE is + * historical: GCC 4.8 needed the distinction. + * * Runtime detection of a CPU sub-architecture can be done with the * qCpuHasFeature(XXX) function. There are two strategies for generating * optimized code like that: @@ -145,7 +148,7 @@ #define QT_COMPILER_SUPPORTS(x) (QT_COMPILER_SUPPORTS_ ## x - 0) -#if defined(Q_PROCESSOR_ARM) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) +#if defined(Q_PROCESSOR_ARM) # define QT_COMPILER_SUPPORTS_HERE(x) ((__ARM_FEATURE_ ## x) || (__ ## x ## __) || QT_COMPILER_SUPPORTS(x)) # if defined(Q_CC_GNU) /* GCC requires attributes for a function */ @@ -162,7 +165,7 @@ # if !defined(__MIPS_DSPR2__) && defined(__mips_dspr2) && defined(Q_PROCESSOR_MIPS_32) # define __MIPS_DSPR2__ # endif -#elif defined(Q_PROCESSOR_X86) && defined(QT_COMPILER_SUPPORTS_SIMD_ALWAYS) +#elif defined(Q_PROCESSOR_X86) # if defined(Q_CC_CLANG) && defined(Q_CC_MSVC) # define QT_COMPILER_SUPPORTS_HERE(x) (__ ## x ## __) # else |
