[sldev] RFC: Vectorisation control patch
Paul TBBle Hampson
Paul.Hampson at Pobox.com
Mon Aug 13 05:19:02 PDT 2007
On Sat, Aug 11, 2007 at 09:51:39PM -0700, Dzonatas wrote:
> Paul TBBle Hampson wrote:
> >Here's my patch to make the SSE/SSE2 slightly less euphoric in the
> >platforms it tries to run on.
> >I've RFCd it here since I've only PowerPC Linux to test it on, and...
> A quick look says the #if directives are more preventive than
> permissive. Avoid them if possible. Use the C/C++ if blocks instead
> when possible, like the hasAltiVec(), which could be defined as 0 at
> the preprocessor level and then the whole block will be excluded if
> really needed.
I removed the hasAltivec() check because nothing there is
Altivec-specific.
In fact, as mentioned I'm getting 10% less speed out of the
auto-vectorised _vec.cpp than out of the non-vectorised version. I dunno
if that's the autovectorisation code actually doing a better job of
vectorising the regular code, or what...
The whole point of the exercise was, if the compiler doesn't support
something or the user has requested that it not be compiled it, to not
compile it, rather than compiling it in and then skipping it at runtime.
> The comments after the #else and #endif is good indicator that the
> entire #if block is too complex and needs to be simplified.
I always put such comments after the #else and #endif. I consider them
good practice, whether obvious or not.
> The preventive blocks do prevent binary plug-ins. We need placeholders
> instead of exclusions.
Uh, I'm not totally clear about this. In fact, I'm not clear how you
intend to do binary plugins. (To be honest, I haven't looked either...)
However, I'm sure whatever you're planning to do with them would replace
the hard-coded SSE2->SSE->Compiler default ladder with something that
determines the list at runtime, in which case this patch is irrelevant
anyway.
--
-----------------------------------------------------------
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/20070813/a226956f/attachment.pgp
More information about the SLDev
mailing list