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

David Edelsohn dje.gcc@gmail.com
Thu Jul 7 19:24:00 GMT 2011


On Thu, Jul 7, 2011 at 11:53 AM, Richard Guenther
<richard.guenther@gmail.com> 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 the functionality is available in Pascal, PL/I, Ada,
GCC extensions and other languages.  We're open to suggestions.

> 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?

-mno-r11 is an assertion to the compiler that no function calls
through pointers will require the static chain.  However, I agree that
the compiler conservatively should be able to figure out some cases
itself, which would be a good enhancement.

Thanks, David



More information about the Gcc-patches mailing list