From 5c470e0f07563c3ab540c0a9f40b8a6ac4a29f07 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Tue, 18 Sep 2018 19:59:46 +0000 Subject: [PATCH] re PR fortran/29550 (Optimize -fexternal-blas calls for conjg()) 2018-09-18 Thomas Koenig PR fortran/29550 * gfortran.h (gfc_expr): Add external_blas flag. * frontend-passes.c (matrix_case): Add case A2TB2T. (optimize_namespace): Handle flag_external_blas by calling call_external_blas. (get_array_inq_function): Add argument okind. If it is nonzero, use it as the kind of argument to be used. (inline_limit_check): Remove m_case argument, add limit argument instead. Remove assert about m_case. Set the limit for inlining from the limit argument. (matmul_lhs_realloc): Handle case A2TB2T. (inline_matmul_assign): Handle inline limit for other cases with two rank-two matrices. Remove no-op calls to inline_limit_check. (call_external_blas): New function. * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add argument to external BLAS if external_blas is already set. 2018-09-18 Thomas Koenig PR fortran/29550 * gfortran.dg/inline_matmul_13.f90: Adjust count for _gfortran_matmul. * gfortran.dg/inline_matmul_16.f90: Likewise. * gfortran.dg/promotion_2.f90: Add -fblas-matmul-limit=1. Scan for dgemm instead of dgemm_. Add call to random_number to make standard conforming. * gfortran.dg/matmul_blas_1.f90: New test. * gfortran.dg/matmul_bounds_14.f: New test. * gfortran.dg/matmul_bounds_15.f: New test. * gfortran.dg/matmul_bounds_16.f: New test. * gfortran.dg/blas_gemm_routines.f: New test / additional file for preceding tests. From-SVN: r264411 --- gcc/fortran/ChangeLog | 20 ++++++++++++++++++++ gcc/testsuite/ChangeLog | 16 ++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b89ecf8980f..4557bc2a5c8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,23 @@ +2018-09-18 Thomas Koenig + + PR fortran/29550 + * gfortran.h (gfc_expr): Add external_blas flag. + * frontend-passes.c (matrix_case): Add case A2TB2T. + (optimize_namespace): Handle flag_external_blas by + calling call_external_blas. + (get_array_inq_function): Add argument okind. If + it is nonzero, use it as the kind of argument + to be used. + (inline_limit_check): Remove m_case argument, add + limit argument instead. Remove assert about m_case. + Set the limit for inlining from the limit argument. + (matmul_lhs_realloc): Handle case A2TB2T. + (inline_matmul_assign): Handle inline limit for other cases with + two rank-two matrices. Remove no-op calls to inline_limit_check. + (call_external_blas): New function. + * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add + argument to external BLAS if external_blas is already set. + 2018-09-18 Paul Thomas PR fortran/87239 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2be64615b8b..29946077ecd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2018-09-18 Thomas Koenig + + PR fortran/29550 + * gfortran.dg/inline_matmul_13.f90: Adjust count for + _gfortran_matmul. + * gfortran.dg/inline_matmul_16.f90: Likewise. + * gfortran.dg/promotion_2.f90: Add -fblas-matmul-limit=1. Scan + for dgemm instead of dgemm_. Add call to random_number to make + standard conforming. + * gfortran.dg/matmul_blas_1.f90: New test. + * gfortran.dg/matmul_bounds_14.f: New test. + * gfortran.dg/matmul_bounds_15.f: New test. + * gfortran.dg/matmul_bounds_16.f: New test. + * gfortran.dg/blas_gemm_routines.f: New test / additional file for + preceding tests. + 2018-09-18 Paul Thomas PR fortran/87239 -- 2.30.2