summaryrefslogtreecommitdiffstats
path: root/mkspecs/common
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-05-23 00:54:19 -0300
committerThiago Macieira <thiago.macieira@intel.com>2018-07-09 00:18:24 +0000
commitc3a4ec5d0bbd5f2710f4fd1d3bd4a2d7f0f507ad (patch)
treef18c0e54743eb213df0e5374bb5fdf4281aa5c4e /mkspecs/common
parent746f15d0c213fef0e46207682815bd839a36ecc6 (diff)
SIMD: Add a haswell sub-architecture selection to our support
As the comment says, Haswell is a nice divider and is a good optimization target. I'm using -march=core-avx2 instead of -march=haswell because the latter form was only added to GCC 4.9 but we still support 4.7 and that has support for AVX2. This commit changes the AVX2-optimized code in QtGui to Haswell- optimized instead. That means, for example, that qdrawhelper_avx2.cpp can now use the FMA instructions. Change-Id: If025d476890745368955fffd153129c1716ba006 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'mkspecs/common')
-rw-r--r--mkspecs/common/gcc-base.conf3
1 files changed, 3 insertions, 0 deletions
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
index e51b173276..c2669e4833 100644
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
@@ -108,6 +108,9 @@ QMAKE_CFLAGS_NEON += -mfpu=neon
QMAKE_CFLAGS_MIPS_DSP += -mdsp
QMAKE_CFLAGS_MIPS_DSPR2 += -mdspr2
+# -march=haswell is supported as of GCC 4.9 and Clang 3.6
+QMAKE_CFLAGS_ARCH_HASWELL = -march=core-avx2
+
# Wrapper tools that understand .o/.a files with GIMPLE instead of machine code
QMAKE_AR_LTCG = gcc-ar cqs
QMAKE_NM_LTCG = gcc-nm -P