This is the mail archive of the
mailing list for the GCC project.
Re: Optimization of conditional access to globals: thread-unsafe?
On Mon, 2007-10-22 at 18:32 +0400, Tomash Brechko wrote:
> But it could use additional register and be:
> 0 -> flag_reg;
> if (condition)
> val -> reg;
> 1 -> flag_reg;
> if (flag_reg == 1)
> reg -> mem;
> So, why not use flag_reg and thus make GCC thread-aware for this case?
Registers are a limited resource.
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net