Hi, On Thu, Mar 11 2021, 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.
when it comes to attributes, often IPA-SRA is over-eager to switch itself off, even though it could just carry on, which might also be this case. Unfortunately, I noticed that this "to be removed later" check is still there only at the end of November and did not manage to remove it before stage 4. I'll fix it in spring. Thanks for taking care of the testcases, I will use them for testing. Martin > > 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? > > > for gcc/testsuite/ChangeLog > > * gcc.dg/ipa/ipa-sra-12.c: Add -mno-longcall on ppc*-vxworks*. > * gcc.dg/ipa/ipa-sra-13.c: Likewise. > * gcc.dg/ipa/ipa-sra-15.c: Likewise. > * gcc.dg/ipa/ipa-sra-16.c: Likewise. > * gcc.dg/ipa/ipa-sra-17.c: Likewise. > * gcc.dg/ipa/ipa-sra-18.c: Likewise.