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: 1551979 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Jra/DGHA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HnKDD1GLsz9sPf for ; Mon, 8 Nov 2021 03:18:20 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EAD543858038 for ; Sun, 7 Nov 2021 16:18:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EAD543858038 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636301898; 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=Jra/DGHAyJ0FwC4RGgl2reIKicLOKIgsv4FRpurhQyTpYdaGYn6dLdzHLCJpfQ6Fm FbYijckRz+jm9X4SCg5rMU6gfZJiHrWhtYrhTyTu2eJrny4GePHcrPT5+st+uBgWKa 77MDAlIMvjnfAxMisaQGtVNnVd3vaXU7X7E7oiTo= 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+incoming=patchwork.ozlabs.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(-)