Re: FDO patch -- make ic related vars TLS if target allows

2012-12-28 Thread David Edelsohn
Hi, David The front-end drivers use -pthread and that often adds -lpthread. But -pthread is not passed to cc1, etc. I am not certain if there is a way for the compiler to ascertain that it is being invoked to compile a file intended for a multi-threaded application. It knows bout OpenMP and __thr

Re: FDO patch -- make ic related vars TLS if target allows

2012-12-28 Thread Xinliang David Li
Is there a way to tell if the program is going to be multi-threaded? If not, it might be useful to introduce a compiler option such as -fmt which also enables -lpthread. Using tricks like weakrefs can introduce unnecessary runtime overhead. David On Fri, Dec 28, 2012 at 8:26 AM, David Edelsohn

Re: FDO patch -- make ic related vars TLS if target allows

2012-12-28 Thread David Edelsohn
David, Support for native TLS on AIX exposed a problem with this patch. A similar problem exists on Solaris 9. Some helper functions for TLS on AIX and Solaris 9 only are provided by libpthread. Promoting ic related variables to TLS breaks profiling of non-pthread appications. I completely agre

Re: FDO patch -- make ic related vars TLS if target allows

2011-05-17 Thread H.J. Lu
On Wed, Apr 27, 2011 at 10:54 AM, Xinliang David Li wrote: > Hi please review the trivial patch below. It reduces race conditions > in value profiling. Another trivial change (to initialize > function_list struct) is also included. > > Bootstrapped and regression tested on x86-64/linux. > > Thanks

Re: FDO patch -- make ic related vars TLS if target allows

2011-04-28 Thread Jan Hubicka
> Hi please review the trivial patch below. It reduces race conditions > in value profiling. Another trivial change (to initialize > function_list struct) is also included. > > Bootstrapped and regression tested on x86-64/linux. OK, thanks! Honza

FDO patch -- make ic related vars TLS if target allows

2011-04-27 Thread Xinliang David Li
Hi please review the trivial patch below. It reduces race conditions in value profiling. Another trivial change (to initialize function_list struct) is also included. Bootstrapped and regression tested on x86-64/linux. Thanks, David 2011-04-27 Xinliang David Li * tree-profile.c (in