This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: basic_string atomicity


On Fri, Jan 6, 2012 at 8:12 PM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 6 January 2012 14:34, David Edelsohn wrote:
>>
>> Unfortunately the changes to __sync_fetch_and_add because of the C++11
>> memory model changes to GCC ALREADY HAVE CAUSED A REGRESSION that
>> affects libstdc++. ?G++ now produces worse code, at least for
>> architectures that can make a distinction among the various memory
>> models.
>
> We probably want to CC Andrew and Aldy here, as I can't speak for the
> other libstdc++ maintainers but personally I usually try not to touch
> the existing code using atomic ops unless they're broken, and even
> then I prefer to ask an expert!
>
> Andrew, Aldy, please see
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51766 for the sync vs
> lwsync change, and the thread starting at
> http://gcc.gnu.org/ml/libstdc++/2012-01/msg00037.html

I agree that we need to change std::string implementation for C++11
to move away from refcounting.

I also think that we need to unbreak libstdc++ on powerpc.
Hence I am leaning towards David's patch.  The real question
is whether it does harm on other architectures that are less
"fine grained" than power.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]