Re: [PATCH] Avoid unnecessary __cxa_quard_{acquire,release} (PR middle-end/54630)

2012-11-19 Thread Jason Merrill
On 11/19/2012 03:14 AM, Jakub Jelinek wrote: PR. The reason for my patch was solely that it is more costly to have local statics. With -fno-threadsafe-statics it will be less costly than before, still it is about an extra guard var and need to load it/test it before every first use in the funct

Re: [PATCH] Avoid unnecessary __cxa_quard_{acquire,release} (PR middle-end/54630)

2012-11-19 Thread Jakub Jelinek
Hi! On Sat, Nov 17, 2012 at 12:27:51PM -0500, Jason Merrill wrote: > I suppose these changes are fine, but it might be more future-proof > to compile with -fno-threadsafe-statics...or fix the build system so Yeah, -fno-threadsafe-statitics might be a good idea, at least until/if ever somebody sta

Re: [PATCH] Avoid unnecessary __cxa_quard_{acquire,release} (PR middle-end/54630)

2012-11-17 Thread Jason Merrill
I suppose these changes are fine, but it might be more future-proof to compile with -fno-threadsafe-statics...or fix the build system so that the C++ library is available when linking the compiler. Jason

[PATCH] Avoid unnecessary __cxa_quard_{acquire,release} (PR middle-end/54630)

2012-11-17 Thread Jakub Jelinek
Hi! This PR points out that unnecessarily in two gcc spots we now use __cxa_guard_acquire/release. In the first case, there is no point to make the var static, it is always created and disposed in the same function, so making it an automatic variable is certainly cheaper, there is no need to init