public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mikael Morin <mikael@gcc.gnu.org>
To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [PATCH v3 0/5] fortran: Ignore unused arguments for scalarisation [PR97896]
Date: Sun,  7 Nov 2021 17:16:31 +0100	[thread overview]
Message-ID: <20211107161636.1167116-1-mikael@gcc.gnu.org> (raw)


Hello,

This is the third submit of this patch series.
After submitting the v2 [2] for master, and a somewhat different variant for
backport [3], I thought it was defeating the purpose of the backporting
process.  So I have decided to rebase the master patches on the backport
patches, so that the backport patchs can get some testing on master first.

The problematic case is intrinsic procedures where an argument is actually
not used in the code generated (KIND argument of INDEX in the testcase),
which confuses the scalariser.

Thomas König comitted a change to workaround the problem, but it regressed
in PR97896.  These patches put the workaround where I think it is more
appropriate, namely at the beginning of the scalarisation procedure.
That’s what is done by the series [3] initially intended for backport only,
and now for master too.  This series is a followup to them.

What are left in this series are a couple of refactoring for the master
branch only.  They aim at being able to identify the KIND argument of the INDEX
intrinsic by its name, rather than counting the right number of next->next->next
indirections starting with the first argument.  It may seem overkill for just
this use case, but I think it’s worth having that facility in the long term.

Regression-tested on x86_64-linux-gnu.  Ok for master? 


Changes from v2 [2]:

  Rebase on the backport variant of the series.

Changes from v1 [1]:

  Use C structs and enums instead of C++ classes.


[1] https://gcc.gnu.org/pipermail/fortran/2021-August/056303.html
[2] https://gcc.gnu.org/pipermail/fortran/2021-August/056317.html
[3] https://gcc.gnu.org/pipermail/fortran/2021-August/056329.html


Mikael Morin (5):
  fortran: Tiny sort_actual internal refactoring
  fortran: Reverse actual vs dummy argument mapping
  fortran: simplify elemental arguments walking
  fortran: Delete redundant missing_arg_type field
  fortran: Identify arguments by their names

 gcc/fortran/gfortran.h        | 41 +++++++++++++++----
 gcc/fortran/interface.c       | 77 +++++++++++++++++++++++++++++++----
 gcc/fortran/intrinsic.c       | 53 ++++++++++++++++--------
 gcc/fortran/trans-array.c     | 35 +++++-----------
 gcc/fortran/trans-array.h     |  2 +-
 gcc/fortran/trans-expr.c      |  9 +++-
 gcc/fortran/trans-intrinsic.c |  2 +-
 gcc/fortran/trans-stmt.c      | 22 ----------
 gcc/fortran/trans.h           |  4 +-
 9 files changed, 161 insertions(+), 84 deletions(-)

-- 
2.33.0


             reply	other threads:[~2021-11-07 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-07 16:16 Mikael Morin [this message]
2021-11-07 16:16 ` [PATCH v3 1/5] fortran: Tiny sort_actual internal refactoring Mikael Morin
2021-11-07 16:16 ` [PATCH v3 2/5] fortran: Reverse actual vs dummy argument mapping Mikael Morin
2021-11-07 16:16 ` [PATCH v3 3/5] fortran: simplify elemental arguments walking Mikael Morin
2021-11-07 16:16 ` [PATCH v3 4/5] fortran: Delete redundant missing_arg_type field Mikael Morin
2021-11-07 16:16 ` [PATCH v3 5/5] fortran: Identify arguments by their names Mikael Morin
2021-11-11 18:32 ` [PATCH v3 0/5] fortran: Ignore unused arguments for scalarisation [PR97896] Thomas Koenig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211107161636.1167116-1-mikael@gcc.gnu.org \
    --to=mikael@gcc.gnu.org \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).