Remove noce_mem_write_may_trap_or_fault_p in ifcvt
Richard Biener
richard.guenther@gmail.com
Wed Nov 25 14:52:00 GMT 2015
On Wed, Nov 25, 2015 at 2:18 PM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Wed, 25 Nov 2015, Richard Biener wrote:
>
>> I don't think so. Btw, if you want to add this please add a new gimple
>> predicate to identify "memory barrier" (any call or asm with a VDEF).
>
> if (is_gimple_call (stmt) && !nonfreeing_call_p (stmt))
> nt_call_phase++;
That looks bogus to me. It misses asm()s and at least today
nonfreeing_call_p too much checks what it sounds like it checks.
In practice it might work though. At least all the __sync_* and
__atomic_* calls are _not_ barriers this way. A pthread_mutex_lock is
though as we don't have a builtin for it.
I'd change the above to a conservative
if ((is_gimple_call (stmt) || is_gimple_asm (stmt)) && gimple_vuse (stmt))
Richard.
>
> Ciao,
> Michael.
More information about the Gcc-patches
mailing list