Policy about optimization of atomics

Olivier Dion odion@efficios.com
Fri Jul 7 15:06:54 GMT 2023


Hi,

I would like to know what is the official stand of GCC on optimization
of atomic builtins?  More precisely, optimization of redundant memory
fences.

I am aware that Clang does some peephole optimization on redundant
fences, but this seem to be limited to a single basic block and does not
recognize lock-prefixed instructions as implicit memory fences on x86.

	Thanks,
        Olivier
-- 
Olivier Dion
EfficiOS Inc.
https://www.efficios.com



More information about the Gcc mailing list