On Thu, Mar 11, 2021 at 8:51 PM Segher Boessenkool
<seg...@kernel.crashing.org> wrote:
>
> On Thu, Mar 11, 2021 at 04:52:18AM -0300, Alexandre Oliva wrote:
> > Several ipa-sra tests fail because -mlongcall on powerpc is a
> > TYPE_ATTRIBUTE, and those disable ipa-sra.
> >
> > This local workaround disables -mlongcall for the failing tests on
> > powerpc*-*-vxworks*, so they get a chance to run even in kernel mode.
> >
> > (AdaCore has -mlongcall enabled for powerpc*-wrs-vxworks* kernel-mode
> > targets.)
> >
> > This was regstrapped on x86_64-linux-gnu and ppc64-linux-gnu, and tested
> > with a cross to a ppc64-vxworks7r2 with -mlongcall enabled by default.
> >
> > I was leaning towards maintaing this change internal, but I thought it
> > wouldn't hurt to ask whether it's ok to install.
> >
> > I wonder whether it wouldn't be more desirable to have an alternate
> > implementation of -mlongcall on ppc that didn't conflict with IPA-SRA,
> > and IIRC with some scenarios involving C++ templates.
>
> It has been this way for decades (well, since 2002, not *quite* multiple
> decades yet).  It also is almost never necessary to use: not many
> programs have more than 32MB in a single module (and you do not need
> this for cross-module calls).
>
> > E.g., on ARM, -mlong-calls doesn't add an attribute to every function,
> > it just changes a default, that attributes short_call and long_call may
> > then override for specific functions.  Would a similar implementation be
> > acceptable for ppc?
>
> That is how it works already!  See the first entry on
>   https://gcc.gnu.org/onlinedocs/gcc/PowerPC-Function-Attributes.html
>
> Given Martin's and Richard's replies, I think we should not take this
> patch.  Sorry.

You could dg-skip-if -mlongcall if the option is explicit or XFAIL on
some new target selector checking for its effect when it is enabled
by default somehow.

Of course given what Segher says I wonder why it's the default
on vxworks...

Richard.

>
> Segher

Reply via email to