diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-05-29 20:30:45 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-05-29 20:30:45 +0000 |
commit | 1585b483236dc2e9a9460a11c14cf3b32a967a84 (patch) | |
tree | 6beebca4391189d74ba97af399031e32ebef0dd4 /gcc/fortran/trans-array.c | |
parent | 987c9fc581ffb04d5ab7a782bb7aee6205c45663 (diff) | |
download | gcc-1585b483236dc2e9a9460a11c14cf3b32a967a84.zip gcc-1585b483236dc2e9a9460a11c14cf3b32a967a84.tar.gz gcc-1585b483236dc2e9a9460a11c14cf3b32a967a84.tar.bz2 |
re PR fortran/90539 (481.wrf slowdown by 25% on Intel Kaby with -Ofast -march=native starting with r271377)
2019-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90539
* gfortran.h (gfc_has_dimen_vector_ref): Add prototype.
* trans.h (gfc_conv_subref_array_arg): Add argument check_contiguous.
(gfc_conv_is_contiguous_expr): Add prototype.
* frontend-passes.c (has_dimen_vector_ref): Remove prototype,
rename to
(gfc_has_dimen_vector_ref): New function name.
(matmul_temp_args): Use gfc_has_dimen_vector_ref.
(inline_matmul_assign): Likewise.
* trans-array.c (gfc_conv_array_parameter): Also check for absence
of a vector subscript before calling gfc_conv_subref_array_arg.
Pass additional argument to gfc_conv_subref_array_arg.
* trans-expr.c (gfc_conv_subref_array_arg): Add argument
check_contiguous. If that is true, check if the argument
is contiguous and do not repack in that case.
* trans-intrinsic.c (gfc_conv_intrinsic_is_contiguous): Split
away most of the work into, and call
(gfc_conv_intrinsic_is_coniguous_expr): New function.
2019-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90539
* gfortran.dg/internal_pack_21.f90: Adjust scan patterns.
* gfortran.dg/internal_pack_22.f90: New test.
* gfortran.dg/internal_pack_23.f90: New test.
From-SVN: r271751
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 9c96d89..56d534d 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -8139,12 +8139,12 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, bool g77, optimizers. */ if (g77 && optimize && !optimize_size && expr->expr_type == EXPR_VARIABLE - && !is_pointer (expr) && (fsym == NULL - || fsym->ts.type != BT_ASSUMED)) + && !is_pointer (expr) && ! gfc_has_dimen_vector_ref (expr) + && (fsym == NULL || fsym->ts.type != BT_ASSUMED)) { gfc_conv_subref_array_arg (se, expr, g77, fsym ? fsym->attr.intent : INTENT_INOUT, - false, fsym, proc_name, sym); + false, fsym, proc_name, sym, true); return; } |