Optimization of conditional access to globals: thread-unsafe?

Andrew Pinski pinskia@gmail.com
Mon Oct 22 18:26:00 GMT 2007


On 10/22/07, skaller <skaller@users.sourceforge.net> wrote:
> Registers are a limited resource.

Everything is limited, some processors are more limited than others  :).
Seriously, I think this should be discussed in a language standards
comittee area rather than inside GCC's development since right now GCC
is correct.  I don't want to limit GCC's output to "thread safe"
optimizations.

In fact any optimization that changes order of loads/stores is not
thread safe.  So you just disabled every high level optimization.

-- Pinski



More information about the Gcc mailing list