[macstl-dev] Re: -faltivec without -maltivec copying;
gcc's altivec attributes
Ilya Lipovsky
lipovsky at skycomputers.com
Sat Aug 6 01:43:06 WST 2005
Glen Low wrote:
>
> On 04/08/2005, at 11:09 PM, Ilya Lipovsky wrote:
>
>> Hi Glen,
>> I get memcpy() in the prologue codes, as well. It, actually, copies
>> elements from one area of the stack into another one. Usually it
>> copies less than 100 bytes. I, too, tried to get rid off it, but
>> couldn't.
>>
>> -Ilya
>
>
> Do you get it with some kinds of expressions only? I managed to
> suppress it by declaring the obvious copy constructor for
> literal_iterator, for an expression involving literals, and by
> changing the
>
> union_type un = {v0};
>
> to
>
> union_type un;
> un.val [0] = v0;
>
> etc.
>
> Apparently the former calls a copy constructor.
>
> The changes will be in the next Subversion commit (one or two day's time).
>
>
Expressions involving literals call memcpy() indeed. But consider:
y = y * (y * (y * (y * u0 + v0) + v1) + v2);
where all the operands are valarrays. The prologue code to the vector
loop calls memcpy(), too.
-Ilya
More information about the macstl-dev
mailing list