Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-12-08 Thread Jason Merrill via Gcc-patches
On 12/7/20 11:17 AM, Bernd Edlinger wrote: On 12/7/20 4:04 PM, Jason Merrill wrote: On 12/5/20 7:37 AM, Bernd Edlinger wrote: On 12/2/20 7:57 PM, Jason Merrill wrote: On 12/1/20 1:28 PM, Bernd Edlinger wrote: +  tree type = targetm.cxx.guard_mask_bit () +  ? TREE_TYPE (guard)

Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-12-07 Thread Bernd Edlinger
On 12/7/20 4:04 PM, Jason Merrill wrote: > On 12/5/20 7:37 AM, Bernd Edlinger wrote: >> On 12/2/20 7:57 PM, Jason Merrill wrote: >>> On 12/1/20 1:28 PM, Bernd Edlinger wrote: +  tree type = >>> targetm.cxx.guard_mask_bit () +  ? TREE_TYPE (guard) : char_type_node; +

Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-12-07 Thread Jason Merrill via Gcc-patches
On 12/5/20 7:37 AM, Bernd Edlinger wrote: On 12/2/20 7:57 PM, Jason Merrill wrote: On 12/1/20 1:28 PM, Bernd Edlinger wrote: On 11/24/20 11:10 PM, Jason Merrill wrote: On 11/22/20 3:05 AM, Bernd Edlinger wrote: Hi, this avoids the need to use -fno-threadsafe-statics on arm-none-eabi or worki

Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-12-05 Thread Bernd Edlinger
On 12/2/20 7:57 PM, Jason Merrill wrote: > On 12/1/20 1:28 PM, Bernd Edlinger wrote: >> On 11/24/20 11:10 PM, Jason Merrill wrote: >>> On 11/22/20 3:05 AM, Bernd Edlinger wrote: Hi, this avoids the need to use -fno-threadsafe-statics on arm-none-eabi or working around that probl

Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-12-02 Thread Jason Merrill via Gcc-patches
On 12/1/20 1:28 PM, Bernd Edlinger wrote: On 11/24/20 11:10 PM, Jason Merrill wrote: On 11/22/20 3:05 AM, Bernd Edlinger wrote: Hi, this avoids the need to use -fno-threadsafe-statics on arm-none-eabi or working around that problem by supplying a dummy __sync_synchronize function which might j

Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-12-01 Thread Bernd Edlinger
On 11/24/20 11:10 PM, Jason Merrill wrote: > On 11/22/20 3:05 AM, Bernd Edlinger wrote: >> Hi, >> >> this avoids the need to use -fno-threadsafe-statics on >> arm-none-eabi or working around that problem by supplying >> a dummy __sync_synchronize function which might >> just lead to silent code fai

Re: [PATCH] Avoid atomic for guard acquire when that is expensive

2020-11-24 Thread Jason Merrill via Gcc-patches
On 11/22/20 3:05 AM, Bernd Edlinger wrote: Hi, this avoids the need to use -fno-threadsafe-statics on arm-none-eabi or working around that problem by supplying a dummy __sync_synchronize function which might just lead to silent code failure of the worst kind (non-reproducable, racy) at runtime,