Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-13 Thread Michael Meissner
On Thu, Jul 07, 2011 at 03:14:02PM -0400, David Edelsohn wrote: > On Thu, Jul 7, 2011 at 11:53 AM, Richard Guenther > wrote: > > > Well, that's up to the target maintainers to decide, maybe > > -mno-nested-functions instead? > > Is -mno-nested-functions or -mno-nested-function-pointers too > C-c

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-11 Thread David Edelsohn
On Thu, Jul 7, 2011 at 4:19 PM, Richard Guenther wrote: > Does XLC have a similar switch whose name we can use? The IBM XL compiler is discussing a similar feature, but it is not implemented yet and does not have a formal command line option name. - David

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread Richard Guenther
On Thu, Jul 7, 2011 at 9:14 PM, David Edelsohn wrote: > On Thu, Jul 7, 2011 at 11:53 AM, Richard Guenther > wrote: > >> Well, that's up to the target maintainers to decide, maybe >> -mno-nested-functions instead? > > Is -mno-nested-functions or -mno-nested-function-pointers too > C-centric or GCC

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread David Edelsohn
On Thu, Jul 7, 2011 at 11:53 AM, Richard Guenther wrote: > Well, that's up to the target maintainers to decide, maybe > -mno-nested-functions instead? Is -mno-nested-functions or -mno-nested-function-pointers too C-centric or GCC-centric? I don't know what wording would be more informative, but

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread Tristan Gingold
[...] On Jul 7, 2011, at 5:53 PM, Richard Guenther wrote: > On Thu, Jul 7, 2011 at 5:47 PM, Michael Meissner > wrote: >> I certainly can call the switch -mno-static-chain, which is perhaps more >> meaningful (at least to us compiler folk, I'm not sure static chain means >> much >> to the normal

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread Michael Meissner
On Thu, Jul 07, 2011 at 05:53:09PM +0200, Richard Guenther wrote: > Well, I guess you don't propose to build glibc with -mno-r11? The compiler > certainly can't figure out in _all_ cases - but it should be able to handle > most of the cases (with LTO even more cases) ok, no? No, we are no proposi

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread Richard Guenther
On Thu, Jul 7, 2011 at 5:47 PM, Michael Meissner wrote: > On Thu, Jul 07, 2011 at 10:59:36AM +0200, Richard Guenther wrote: >> On Thu, Jul 7, 2011 at 12:29 AM, Michael Meissner >> wrote: >> > This patch adds an option to not load the static chain (r11) for 64-bit >> > PowerPC >> > calls through

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread Michael Meissner
On Thu, Jul 07, 2011 at 10:59:36AM +0200, Richard Guenther wrote: > On Thu, Jul 7, 2011 at 12:29 AM, Michael Meissner > wrote: > > This patch adds an option to not load the static chain (r11) for 64-bit > > PowerPC > > calls through function pointers (or virtual function).  Most of the > > langu

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread Richard Guenther
On Thu, Jul 7, 2011 at 11:03 AM, Jakub Jelinek wrote: > On Thu, Jul 07, 2011 at 10:59:36AM +0200, Richard Guenther wrote: >> Hum.  Can't the compiler figure this our itself per-call-site?  At least >> the name of the command-line switch -m[no-]r11 is meaningless to me. >> Points-to information sho

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread Jakub Jelinek
On Thu, Jul 07, 2011 at 10:59:36AM +0200, Richard Guenther wrote: > Hum. Can't the compiler figure this our itself per-call-site? At least > the name of the command-line switch -m[no-]r11 is meaningless to me. > Points-to information should be able to tell you if the function pointer > points to

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-07 Thread Richard Guenther
On Thu, Jul 7, 2011 at 12:29 AM, Michael Meissner wrote: > This patch adds an option to not load the static chain (r11) for 64-bit > PowerPC > calls through function pointers (or virtual function).  Most of the languages > on the PowerPC do not need the static chain being loaded when called, and

Re: [PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-06 Thread David Edelsohn
On Wed, Jul 6, 2011 at 6:29 PM, Michael Meissner wrote: > This patch adds an option to not load the static chain (r11) for 64-bit > PowerPC > calls through function pointers (or virtual function).  Most of the languages > on the PowerPC do not need the static chain being loaded when called, and >

[PATCH] Add -mno-r11 option to suppress load of ppc64 static chain in indirect calls

2011-07-06 Thread Michael Meissner
This patch adds an option to not load the static chain (r11) for 64-bit PowerPC calls through function pointers (or virtual function). Most of the languages on the PowerPC do not need the static chain being loaded when called, and adding this instruction can slow down code that calls very short fu