This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
>                                          loop
>                                            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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]