Re: [PATCH] libstdc++: Improve code generation for atomic reference counting

2016-12-06 Thread Jonathan Wakely
I missed this patch until today and have only just seen it, sorry. On 09/11/16 23:26 +0200, Pauli wrote: Atomic reference counting generates pessimistic code in platforms where builtin atomics could optimize code for following branch with subtract instruction. Which targets are affected? To

[PATCH] libstdc++: Improve code generation for atomic reference counting

2016-11-09 Thread Pauli
Atomic reference counting generates pessimistic code in platforms where builtin atomics could optimize code for following branch with subtract instruction. To allow better code generation with compile time constant addition can be checked for negative value. Those cases can then be better optimize