no noalias not negligible
Tom Stockfisch
tps at chem.ucsd.edu
Wed May 25 05:39:13 AEST 1988
In article <11609 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>One I forgot: inline expansion.
>daxpy is certainly short enough to write in line:
>
>The resulting expansion (either from the cleaner but nonstandard
>`inline void' versions, or the macro version) will likely not only run
>faster (no subroutine call overhead) but also be in a place where the
>optimiser can see whether there are aliasing problems.
>In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
I don't think this will help much. A routine which calls something as low-level
as daxpy() probably will be given pointer arguments itself rather than be
operating directly on external arrays. Even if it isn't, most numerical
C programming uses malloc() to get arrays and matrices. So the compiler still
will not be able to determine when pointers are aliases.
Given the awkwardness and limitations of #pragma directives, I think the
best course for vectorizing compiler writers is to experiment with their
own ideas of what noalias (and perhaps some other mechanism as well) should
mean. People can always port code written using noalias by compiling with
"cc -Dnoalias="
--
|| Tom Stockfisch, UCSD Chemistry tps at chem.ucsd.edu
More information about the Comp.lang.c
mailing list