Hi!

On Sat, Oct 12, 2019 at 11:22:15AM +0800, Jiufu Guo wrote:
> As expected in the PR, when a function is marked with no-vsx, we would
> assume user has good reason to disable VSX code generation for the function.  
> To avoid VSX code generation, this function should not be inlined into VSX
> function. 

But your patch also disables inlining if the callee merely defaulted to
no-vsx.  Can you see if the option is explicitly disabled here?

>       PR target/70010
>       * config/rs6000/rs6000.c (rs6000_can_inline_p): Check 'vsx' feature
>       for caller and callee

Each sentence should end with a period, also in changelogs.

>       PR target/70010
>       * gcc.target/powerpc/inline_error.c: New test

Ditto.

> -      /* Callee's options should a subset of the caller's, i.e. a vsx 
> function
> -      can inline an altivec function but a non-vsx function can't inline a
> -      vsx function.  */
> -      if ((caller_opts->x_rs6000_isa_flags & callee_opts->x_rs6000_isa_flags)
> -       == callee_opts->x_rs6000_isa_flags)
> +      /* Callee's options should a subset of the caller's. In addition,
> +      vsx function should not inline function with non-vsx by which
> +      programmer may intend to disable VSX code generation.  */

Two spaces after a period.  How about something like

      /* Callee's options should be a subset of the caller's.  Also, a function
         without VSX enabled should not be inlined into one with VSX enabled,
         because it may be important it is disabled there; see PR70010.  */

It's not clear to me why this is important, and what makes -mvsx different
from all other similar options?


Segher

Reply via email to