Optimization of conditional access to globals: thread-unsafe?

Andi Kleen andi@firstfloor.org
Mon Oct 29 19:51:00 GMT 2007


Robert Dewar <dewar@adacore.com> writes:
>
> a) the standard allows the optimization (or rather does not forbid it)

Assuming it is an optimization. See http://gcc.gnu.org/ml/gcc/2007-10/msg00607.html
for a counter example. In general cache misses are so costly that anything
that risks introducing more is in general a bad idea.

-Andi



More information about the Gcc mailing list