On Sat, Dec 7, 2019 at 2:53 PM Thomas Koenig <tkoe...@netcologne.de> wrote:
>
> Hello world,
>
> the attached patch introduces a new option, -finline-pack.
>
> Since the fix for PR88821, we now do inline packing of
> arguments (if required) via the scalarizer, instead of
> using _gfortran_internal_[un]pack when optimizing, but
> not when optimizing for size.
>
> This introduces (really) large performance gains for some test
> cases because now the middle end can see through the packing.
> On the other hand, for test cases which do a _lot_ of this,
> compile time and code size can increase by quite a bit.
>
> So, this patch introduces an option to control that behavior,
> so that people can turn it off on a by-file basis if they
> don't want it.
>
> OK for trunk?

Just as a suggestion, maybe we'd want to extend this
to other intrinsics in future so a -fno-inline-intrinsic=pack[,...]
is more future proof? (I'd inline all intrinsics by default thus
only provide the negative form).  You can avoid the extra
option parsing complexity by only literally adding
-fno-inline-intrinsic=pack for now.

Richard.

> Regards
>
>         Thomas
>
> Introduce -finline-pack.
>
> 2019-12-07  Thomas Koenig  <tkoe...@gcc.gnu.org>
>
>         PR middle-end/91512
>         PR fortran/92738
>         * invoke.texi: Document -finline-pack.
>         * lang.opt: Add -finline-pack.
>         * options.c (gfc_post_options): Handle -finline-pack.
>         * trans-array.c (gfc_conv_array_parameter): Use flag_inline_pack
>         instead of checking for optimize and optimize_size.
>
> 2019-12-07  Thomas Koenig  <tkoe...@gcc.gnu.org>
>
>         PR middle-end/91512
>         PR fortran/92738
>         * gfortran.dg/inline_pack_25.f90: New test.

Reply via email to