volatile qualifier hurts single-threaded optimized case

Paolo Carlini pcarlini@suse.de
Sun Aug 13 09:52:00 GMT 2006


Richard Guenther wrote:

> bits/atomicity.h has volatile qualifiers on the _Atomic_word* 
> arguments to
> the __*_single and __*_dispatch variants of the atomic operations.  This
> huts especially the single-threaded optimization variants which are 
> usually
> inlined.  Removing those qualifiers allows to reduce code size 
> significantly
> as can be seen in the following simple testcase 

Ok, what can be done, realistically, considering that __exchange_and_add 
and __atomic_add are exported, thus in any case cannot change signature, 
and, if possible, we would rather avoid too ugly casts?

Thanks,
Paolo.



More information about the Libstdc++ mailing list