http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51798

Andrew Macleod <amacleod at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at redhat dot com

--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> 2012-01-24 
05:41:43 UTC ---
Looking at the old sync.md and rs6000.c files, it looks to me like
sync_fetch_and_add always issued a lwsync before the operation and an isync
afterwards.  

With the new atomics, it looks like making these fetch_and_add operations use
acq_rel mode, we'd get exactly the same code.  I suspect it would be safe to
convert those uses in atomicity.h to acq_rel.  If acq_rel wasn't sufficient,
power would likely have had a defect somewhere over the years...  

At least that would appear to be safe(r) to me on the surface...  And it would
return the missing performance?  I'd be more hesitant about relaxing the mode
any further than that.

Reply via email to