Support for gcc vector attributes, SIMD builtins
Iain Buclaw
ibuclaw at ubuntu.com
Sun Feb 6 14:58:32 PST 2011
== Quote from Brad Roberts (braddr at puremagic.com)'s article
> I'd be happy to have gcc finding vectorization opportunities, but there's no
need to add this sort of thing to the
> language. This already has a hook to call a library function:
> float[4] a = [1,2,3,4], b = [5,6,7,8], c;
> c[] = a[] + b[];
Aye, and 9 times out of 10 I would agree with this thinking also.
The pros to hashing out GCC Vector intrinsics to the D frontend though are that
the GCC backend has much more creative control over the codegen. Inlining and
optimising the intrinsics in a far better way than optimising the overhead of an
external library call.
Baring in mind that DMD's array libraries are already extremely performant anyway,
I honestly don't see the harm if it makes the poignant speed freaks happy.
Regards
More information about the D.gnu
mailing list