RFC: Gimple combine/folding interface

2013-07-19 Thread Andrew Pinski
I was creating a new gimple/folding interface and wanted some opinions on the interface. typedef double_int (*nonzerobits_t)(tree var); typedef tree (*valueizer_t)(tree var); class gimple_combine { public: gimple_combine(nonzerobits_t a, valueizer_t b) : nonzerobitsf(a), valueizerv(b), allow_fu

Re: Why high vsr registers [vsr32 - vsr63] are not used when -mvsx is specified on powerpc?

2013-07-19 Thread Michael Meissner
On Fri, Jul 19, 2013 at 04:22:48PM -0700, Carrot Wei wrote: > On Wed, Jul 17, 2013 at 6:01 PM, David Edelsohn wrote: > > On Wed, Jul 17, 2013 at 7:27 PM, Carrot Wei wrote: > >> Hi > >> > >> When I tried to build 444.namd with options "-O2 -m64 -mvsx > >> -mcpu=power7", I can see vsx instructions

Re: Why high vsr registers [vsr32 - vsr63] are not used when -mvsx is specified on powerpc?

2013-07-19 Thread David Edelsohn
On Fri, Jul 19, 2013 at 7:22 PM, Carrot Wei wrote: > In insn patterns the register class is usually not directly used, instead > different predicates and constraints are used. So can we use different > predicates and constraints in memory access instructions and floating > point arithmetic instru

Re: Help with using multilib for Cilk Library

2013-07-19 Thread Ian Lance Taylor
On Fri, Jul 19, 2013 at 3:53 PM, Iyer, Balaji V wrote: > > >> -Original Message- >> From: Ian Lance Taylor [mailto:i...@google.com] >> Sent: Friday, July 19, 2013 6:26 PM >> To: Iyer, Balaji V >> Cc: gcc@gcc.gnu.org >> Subject: Re: Help with using multilib for Cilk Library >> >> On Fri, Ju

Re: Help with using multilib for Cilk Library

2013-07-19 Thread H.J. Lu
On Fri, Jul 19, 2013 at 3:53 PM, Iyer, Balaji V wrote: > > >> -Original Message- >> From: Ian Lance Taylor [mailto:i...@google.com] >> Sent: Friday, July 19, 2013 6:26 PM >> To: Iyer, Balaji V >> Cc: gcc@gcc.gnu.org >> Subject: Re: Help with using multilib for Cilk Library >> >> On Fri, Ju

Re: Why high vsr registers [vsr32 - vsr63] are not used when -mvsx is specified on powerpc?

2013-07-19 Thread Carrot Wei
On Wed, Jul 17, 2013 at 6:01 PM, David Edelsohn wrote: > On Wed, Jul 17, 2013 at 7:27 PM, Carrot Wei wrote: >> Hi >> >> When I tried to build 444.namd with options "-O2 -m64 -mvsx >> -mcpu=power7", I can see vsx instructions are actually used, there are >> many xs- started instructions, but none

RE: Help with using multilib for Cilk Library

2013-07-19 Thread Iyer, Balaji V
> -Original Message- > From: Ian Lance Taylor [mailto:i...@google.com] > Sent: Friday, July 19, 2013 6:26 PM > To: Iyer, Balaji V > Cc: gcc@gcc.gnu.org > Subject: Re: Help with using multilib for Cilk Library > > On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V > wrote: > > Hello Every

Re: Help with using multilib for Cilk Library

2013-07-19 Thread Ian Lance Taylor
On Fri, Jul 19, 2013 at 11:22 AM, Iyer, Balaji V wrote: > Hello Everyone, > I am trying to use Multilib on Cilk Library. I looked at this website > (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer > and libgo as samples to model after. It is currently failing wi

Re: -ftls-model docs/implementation inconsistency

2013-07-19 Thread Alexander Monakov
On Fri, 19 Jul 2013, Jakub Jelinek wrote: > The change of memory models based on flag_shlib is completely intentional, > it is similar to the linker TLS optimizations but at the compiler level, > so if you want to ad some comment to documentation, that is fine, but > I don't see anything to fix. T

Re: [RFC / musing] Scoped exception handling in Linux userspace?

2013-07-19 Thread Andy Lutomirski
On Fri, Jul 19, 2013 at 9:22 AM, David Daney wrote: > On 07/18/2013 08:29 PM, Andy Lutomirski wrote: >> >> Other way around: a *library* that wants to use exception handling >> can't do so safely without the cooperation, or at least understanding, >> of the main program and every other library tha

Help with using multilib for Cilk Library

2013-07-19 Thread Iyer, Balaji V
Hello Everyone, I am trying to use Multilib on Cilk Library. I looked at this website (http://www.airs.com/ian/configure/configure_8.html) and used libsanitizer and libgo as samples to model after. It is currently failing with the following error message: libtool: link: /export/users/my

Re: -ftls-model docs/implementation inconsistency

2013-07-19 Thread Alexander Monakov
On Fri, 19 Jul 2013, Jakub Jelinek wrote: > If user code has __attribute__((tls_model ("global-dynamic"))) and the > compiler determines that it is not going to be used in a shared library, > then it of course optimizes it to a better code I see your point, but that's not how tls_model attribute w

Re: resurrecting automatic dependencies

2013-07-19 Thread Diego Novillo
On Thu, Jul 18, 2013 at 7:48 PM, Tom Tromey wrote: > Today I started resurrecting my old automatic dependency patch. Thanks Tom! I'd hug you if you weren't so ugly ;) > There may be more missing dependencies. Please try out this branch if > you would. You can report bugs to me, just send the

Re: -ftls-model docs/implementation inconsistency

2013-07-19 Thread Jakub Jelinek
On Fri, Jul 19, 2013 at 07:34:30PM +0400, Alexander Monakov wrote: > Suppose a user builds a non-PIC shared object for x86 target with gcc by > passing -shared but not -fPIC. This works, but internally GCC will not set > flag_shlib (as flag_shlib == flag_pic && !flag_pie). Usually it doesn't (o

Re: Documentation for loop header copying

2013-07-19 Thread Abdul Wahid Memon
Thanks Marek. I will start with the comments. Regards AW On Fri, Jul 19, 2013 at 4:50 PM, Marek Polacek wrote: > On Fri, Jul 19, 2013 at 04:42:56PM +0200, Abdul Wahid Memon wrote: >> I am searching for some documentation (books, research papers, etc) on >> loop header copying compiler optimizat

Re: [RFC / musing] Scoped exception handling in Linux userspace?

2013-07-19 Thread Joseph S. Myers
On Thu, 18 Jul 2013, Andy Lutomirski wrote: > 2. It's localized. So you can mmap something, read from it *and > handle SIGBUS*, and unmap. There is of course no guarantee that possibly faulting memory accesses are preserved (GCC should never introduce such an access where it wouldn't occur in

Re: -ftls-model docs/implementation inconsistency

2013-07-19 Thread Jakub Jelinek
On Fri, Jul 19, 2013 at 07:55:35PM +0400, Alexander Monakov wrote: > On Fri, 19 Jul 2013, Jakub Jelinek wrote: > > Furthermore, on Linux you can dlopen even libraries with initial-exec TLS > > model in it (as long as they don't use too big TLS sections). > > This is the failure I'm referring to ("

Re: -ftls-model docs/implementation inconsistency

2013-07-19 Thread Alexander Monakov
On Fri, 19 Jul 2013, Jakub Jelinek wrote: > Furthermore, on Linux you can dlopen even libraries with initial-exec TLS > model in it (as long as they don't use too big TLS sections). This is the failure I'm referring to ("cannot load any more object ..."): http://repo.or.cz/w/glibc.git/blob/HEAD:/e

Re: [RFC / musing] Scoped exception handling in Linux userspace?

2013-07-19 Thread David Daney
On 07/18/2013 08:29 PM, Andy Lutomirski wrote: On Thu, Jul 18, 2013 at 6:17 PM, David Daney wrote: On 07/18/2013 05:50 PM, Andy Lutomirski wrote: On Thu, Jul 18, 2013 at 5:40 PM, David Daney wrote: On 07/18/2013 05:26 PM, Andy Lutomirski wrote: How is this different than throwing excepti

Re: -ftls-model docs/implementation inconsistency

2013-07-19 Thread Jakub Jelinek
On Fri, Jul 19, 2013 at 08:08:26PM +0400, Alexander Monakov wrote: > On Fri, 19 Jul 2013, Jakub Jelinek wrote: > > The change of memory models based on flag_shlib is completely intentional, > > it is similar to the linker TLS optimizations but at the compiler level, > > so if you want to ad some co

Re: Documentation for loop header copying

2013-07-19 Thread Marek Polacek
On Fri, Jul 19, 2013 at 04:42:56PM +0200, Abdul Wahid Memon wrote: > I am searching for some documentation (books, research papers, etc) on > loop header copying compiler optimization. > > Any hints on this please? You may want to look at the comments in tree-ssa-loop-ch.c in the GCC source tree.

-ftls-model docs/implementation inconsistency

2013-07-19 Thread Alexander Monakov
Hello, Suppose a user builds a non-PIC shared object for x86 target with gcc by passing -shared but not -fPIC. This works, but internally GCC will not set flag_shlib (as flag_shlib == flag_pic && !flag_pie). Suppose further the user loads that shared object at runtime with dlopen. For that to

Documentation for loop header copying

2013-07-19 Thread Abdul Wahid Memon
Hello all Sorry if this is not the right place for this kind of questions. I am searching for some documentation (books, research papers, etc) on loop header copying compiler optimization. Any hints on this please? Best regards AW