[Development] Update: State of x86 SIMD in Qt
Thiago Macieira
thiago.macieira at intel.com
Mon Jan 2 16:14:28 CET 2012
On Monday, 2 de January de 2012 11.10.57, Thiago Macieira wrote:
> The code is compiling fine with GCC on x86, x86-64; ICC on x86-64 and I have
> a linker error on ARM with Neon.
make clean solved the linker error. All my working configurations now build the
code:
gcc x86-64 64-bit -march=core2
builds SSE2 and AVX helpers
icc x86-64 64-bit -march=corei7-avx
builds AVX helpers only
gcc i386 -march=core2
builds SSE2 and AVX helpers
gcc ARM -march=armv7-a -mfpu=neon
builds Neon helpers only
I have also verified that a generic i386 (no -march=core2) and a generic ARM
(no -mfpu=neon) also work. They build, respectively, the plain, SSE2 and AVX
helpers and the plain and Neon helpers.
My MIPS build is broken because I haven't managed to install Mesa yet and
QtGui requires OpenGL to compile.
In particular, for the release x86-64 build above:
text data bss dec hex filename
204850 3224 0 208074 32cca qdrawhelper_avx.o
506 16 8 530 212 qdrawhelper_plain.o
229572 3224 0 232796 38d5c qdrawhelper_sse2.o
2927 0 0 2927 b6f qdrawhelper_ssse3.o
The 3224 bytes of non-read-only data are actually .data.rel.* sections. That's
341 relocations in each of the helpers and 2 in the plain (the qt_memfill
wrappers). The total is 684 relocations, or 13.7% of the 4986 relative
relocations that end up in QtGui.
The relocations are actually indication of indirect branches, which aren't
that good for the CPU. Further optimisation work should look into replacing
those function tables with proper dispatcher code, and benchmark.
I will proceed to merging qblendfunctions and qmemfunctions into the draw
helpers.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120102/e3e517cc/attachment.sig>
More information about the Development
mailing list