[Fortran,0/7] delete some unused decls, make static
Message ID | 20211024223023.1410274-1-rep.dot.nop@gmail.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> 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 B9E3D3858410 for <patchwork@sourceware.org>; Sun, 24 Oct 2021 22:31:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9E3D3858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635114686; bh=L9t8F8QPf78k+mXrkT42MttbunVKB4kfWGQVYbdcH7s=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=kbovwzqkpqSqu2UXIRYVUmRSSO8gJjycRrsrsl/1MXog/nC7BfSTcbDYA82+odchd FJquNlI6C8dyjlBGj9O72dVeEAfliMt4rS3GuILcA2gmiyD+c2lsSwKofFvwah7I9s uB0gy++wt/B7NvvZyDqvVz1H9y/qZZUkJV3oHTPU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 225623858C27; Sun, 24 Oct 2021 22:30:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 225623858C27 Received: by mail-wr1-x431.google.com with SMTP id e4so9244953wrc.7; Sun, 24 Oct 2021 15:30:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=L9t8F8QPf78k+mXrkT42MttbunVKB4kfWGQVYbdcH7s=; b=0W5WmRlfvn1l5J9hf/vw5mdKrQG+FCPNlQwqudtBx1zhyavMxQEcKmb9OMZL8eou2o bcnbxv9CC+vKOKjHocoxYb0cWxV8MY2dUMT2xAWcXM/uQKRKvJo28q5G796mL3Y4dS2T clHLSO/4UOolk8/FyGySAh/DWyn/uSb3448pohYXJze7BuVPbWBSE6S0KzCYA+lQyyuD rON5rt8JcRoaG62iR0Zz1VK8F9VWeDNsrrVbWSABgFkVwnkmfyrAlzeNlb6RfMDc2DiF vMTxn8bbS2NUmQXESnCxtxxKAFzKkO5u3LefrlQZNIUEA5hRkraZfu77QUumBdOPPkf4 IxpA== X-Gm-Message-State: AOAM532XL/7LyXYgkM5xIaq+CizYKE4oz5czzk8LEvVp3NlgFgv0/tS7 TnU7E2VDzP7zYpU0XBnIrQT9hfdiFXI= X-Google-Smtp-Source: ABdhPJzz7wPNuSkLqNIig1Ew4MXTo7iQmtA8tEDNZ9zPFeaV1Vqi9z3Qyg2ZiXhiobffdbp0hWDMLw== X-Received: by 2002:adf:a2d4:: with SMTP id t20mr18151526wra.229.1635114638893; Sun, 24 Oct 2021 15:30:38 -0700 (PDT) Received: from nbbrfq.weghof (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id p7sm14459361wrm.61.2021.10.24.15.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Oct 2021 15:30:38 -0700 (PDT) Received: from b by nbbrfq.weghof with local (Exim 4.95) (envelope-from <b@localhost>) id 1mem0j-005usr-Nd; Mon, 25 Oct 2021 00:30:37 +0200 To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: [PATCH,Fortran 0/7] delete some unused decls, make static Date: Mon, 25 Oct 2021 00:30:16 +0200 Message-Id: <20211024223023.1410274-1-rep.dot.nop@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Bernhard Reutner-Fischer via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Message
Bernhard Reutner-Fischer
Oct. 24, 2021, 10:30 p.m. UTC
Hi! Quickly skimming through the frontend headers. There are a couple of declarations for functions that do not have definitions. And there are a couple of functions that can be static. Notes i took while at it / TODOs: - get rid of VTAB_GET_FIELD_GEN and unused extern decls - The last block of gfc_trans_vla_one_sizepos() could simply use gfc_evaluate_now_function_scope(). Passing down unshared val of course. - trans-expr.c has one use of gfc_evaluate_now_loc() but should simply use gfc_evaluate_now() there; Calling ...now_loc(input_location) is superfluous - s/mane/name/;# in git grep -w mane gcc/fortran/ - delete gfc_match_small_int, use gfc_match_small_literal_int instead - move gfc_match_null definition up before first user, make it static and delete decl from match.h - gfc_cpp_add_include_path_after move up, make static, rm external decl - gfc_walk_array_ref move up, make static, rm external decl - delete unused gfc_copy_only_alloc_comp ? - delete unused gfc_conv_descriptor_attribute ? - gfc_build_nan str arg is "" always. Delete parameter and handling? - delete unused gfc_simplify_get_team or wire it up in intrinsics, get_team handling (instead of the NULL..) Anyone who does coarrays might want to fill in the missing get_team() simplify and add an appropriate test. That's the only thing that i will not do as i once was more into MPI and verbs so won't ever do coarrays ;) Bootstraps fine, regression tests running over night. Ok for trunk if it passes? thanks, Bernhard Reutner-Fischer (7): Fortran: make some trans* functions static Fortran: make some match* functions static Fortran: make some constructor* functions static Fortran: make some trans-array functions static Fortran: Delete unused decl in trans-stmt.h Fortran: Delete unused decl in trans-types.h Fortran: Delete unused decl in intrinsic.h gcc/fortran/constructor.c | 20 ++------------------ gcc/fortran/constructor.h | 10 ---------- gcc/fortran/decl.c | 15 ++++++++------- gcc/fortran/expr.c | 2 +- gcc/fortran/gfortran.h | 1 - gcc/fortran/intrinsic.h | 4 ---- gcc/fortran/match.c | 28 +--------------------------- gcc/fortran/match.h | 10 ---------- gcc/fortran/scanner.c | 4 ++-- gcc/fortran/trans-array.c | 2 +- gcc/fortran/trans-array.h | 6 ------ gcc/fortran/trans-expr.c | 10 +++++----- gcc/fortran/trans-stmt.h | 1 - gcc/fortran/trans-types.c | 25 +++---------------------- gcc/fortran/trans-types.h | 4 ---- gcc/fortran/trans.c | 1 - gcc/fortran/trans.h | 11 ----------- 17 files changed, 23 insertions(+), 131 deletions(-)