[sldev] RFC: Vectorisation control patch

Paul TBBle Hampson Paul.Hampson at Pobox.com
Sat Aug 11 21:20:09 PDT 2007


On Sat, Aug 11, 2007 at 03:05:09PM -0500, Callum Lerwick wrote:
> On Sun, 2007-08-12 at 01:19 +1000, Paul TBBle Hampson wrote:
>> I also didn't turn on autovectorisation for ix86/AMD64,
>> as you'd need to pick either sse or sse2 to do that, losing the runtime
>> switching we currently have.

> Actually I'd like to see an option to hardwire in SSE2. x86_64 always
> has SSE2, and does all its fp math with SSE so runtime switching is
> pretty senseless.

> Same goes for OSX on Intel, all Intel Macs have SSE3.

> I've also pulled out my 1.4ghz Athlon T-bird, and am considering tooling
> around with a 3dnow version...

That wouldn't be that hard to do with the patch I posted. It already
applies -maltivec to the entire PowerPC Linux build, so applying -msse2
(and autovectorisation) to the entire AMD64 build would work. In a few
places however, I believe I've assumed that __SSE2__ implies __SSE__
will be set, and so only checked for __SSE__. A quick check shows that
-msse2 _does_ define both __SSE__ and __SSE2__ so that's all fine.

As far as OS X on Intel goes, it looks like the SConstruct script
doesn't currently support that anyway, as it passes -mppc and -faltivec
to gcc unconditionally on non-Linux builds. I haven't checked the code
itself, but I did note that LL_DARWIN was being checked for within the
LL_VECTORIZE block in llv4math.h, but that would only have been possible
when building the _sse and _sse2 files, assuming the Mac OS X Intel gcc
compiler didn't barf on -mppc.

-- 
-----------------------------------------------------------
Paul "TBBle" Hampson, B.Sc, LPI, MCSE
Very-later-year Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
Paul.Hampson at Pobox.com

Of course Pacman didn't influence us as kids. If it did,
we'd be running around in darkened rooms, popping pills and
listening to repetitive music.
 -- Kristian Wilson, Nintendo, Inc, 1989

License: http://creativecommons.org/licenses/by/2.1/au/
-----------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070812/babdc9c4/attachment.pgp


More information about the SLDev mailing list