From patchwork Sun Nov 7 16:16:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 47185 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E6B463858429 for ; Sun, 7 Nov 2021 16:18:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6B463858429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636301906; bh=XBLodati/Hj2hVnwUuG9la9TEPIaCSt0f/uwVzHGZRY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=u9PdSK530k2OrzkV0GDSihoRMgD233K2QrQpXnVxcP7iwaJxLEuGAbQtnlot756A7 o0+MCGISyq5tf41I4+5N7enLm3LYgYYVPPeb2IFkM5iNTSe07pnLMledJr+hgNiQ/X 1bzgKjr8V7JLbq368f/ollrNyWwJeOA20Yv03200= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr [80.12.242.131]) by sourceware.org (Postfix) with ESMTPS id 14B233858403 for ; Sun, 7 Nov 2021 16:16:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 14B233858403 Received: from cyrano.home ([92.167.144.168]) by smtp.orange.fr with ESMTPA id jkqTmFEb9E8xTjkqYm8cqu; Sun, 07 Nov 2021 17:16:42 +0100 X-ME-Helo: cyrano.home X-ME-Auth: MDU4MTIxYWM4YWI0ZGE4ZTUwZWZmNTExZmI2ZWZlMThkM2ZhYiE5OWRkOGM= X-ME-Date: Sun, 07 Nov 2021 17:16:42 +0100 X-ME-IP: 92.167.144.168 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 Message-Id: <20211107161636.1167116-1-mikael@gcc.gnu.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Mikael Morin via Gcc-patches From: Mikael Morin Reply-To: Mikael Morin Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" 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(-)