From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68056 invoked by alias); 5 Sep 2018 14:57:51 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 68011 invoked by uid 89); 5 Sep 2018 14:57:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=iso_fortran_env X-HELO: mail-wr1-f54.google.com Received: from mail-wr1-f54.google.com (HELO mail-wr1-f54.google.com) (209.85.221.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Sep 2018 14:57:48 +0000 Received: by mail-wr1-f54.google.com with SMTP id g33-v6so8045301wrd.1; Wed, 05 Sep 2018 07:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TmzOuviD0AvXHzsmFwhELpCaRMnd/oeNqSPmYIfJyeg=; b=LQS8ISZY1L0zwPDco535mC4i7ixHgoNfpLMaQwQan3AGFdHRkjUuJSB02fEzWJ80XV MmkSw9pMJ5oQZ8nSrePf2DpvlNXm5OMZpTY4TrlfdHoz3fNfIJXZx9IEU5OEwHjg5GzI oYea4FmDxQWeCx7EyzEcj4k91C1nZgoUON2e2bMhC3hdx70tqPOPvjh36UnO50NLRXK0 k4rTSmBuP4OruTyUP6o4ZFEW0a+eepyu9COOxKEU/VLCdZBsf3Om8g+A7FGiQa+2VVV9 EZ6FT3SH5g9U7zFHPlFCWGcpjzoyETqbqnB+mx88bgJ2tmzfjCIq7EkKGKio3JCjpHOx 8Hww== Return-Path: Received: from s46.loc (91-119-125-11.dsl.dynamic.surfer.at. [91.119.125.11]) by smtp.gmail.com with ESMTPSA id h206-v6sm2682203wmf.25.2018.09.05.07.57.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Sep 2018 07:57:45 -0700 (PDT) Received: from cow by s46.loc with local (Exim 4.91) (envelope-from ) id 1fxZFX-00007F-8b; Wed, 05 Sep 2018 14:57:43 +0000 From: Bernhard Reutner-Fischer To: fortran@gcc.gnu.org Cc: Bernhard Reutner-Fischer , gcc-patches@gcc.gnu.org Subject: [PATCH,FORTRAN 00/29] Move towards stringpool, part 1 Date: Wed, 05 Sep 2018 14:57:00 -0000 Message-Id: <20180905145732.404-1-rep.dot.nop@gmail.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00023.txt.bz2 Hi, The fortran frontend still uses stack-based handling of (symbol) names with fixed-sized buffers. Furthermore these buffers often are too small when dealing with F2003 identifiers which can be up to, including 63 bytes long. Other frontends use the stringpool since many years. This janitorial series is a first step towards using the stringpool in the frontend. Consequently this allows us to use pointer-comparison to see if two given "names" are identical instead of doing lots and lots of string comparisons. Part 1 switches most of the fortran FE. An eventual part 2 would continue to switch the few remaining stack-based identifier manipulations to use the stringpool. My initial plan was to also see if switching gfc_symtree from treap to a hash_map would bring us any measurable benefit, but that, too, is left for an eventual part 2. Bootstrapped and regtested on x86_64-foo-linux. I'd appreciate if someone could double check for regressions on other setups. Git branch: https://gcc.gnu.org/git/?p=gcc.git;a=log;h=refs/heads/aldot/fortran-fe-stringpool Ok for trunk? Bernhard Reutner-Fischer (29): gdbinit: break on gfc_internal_error Use stringpool for gfc_match_defined_op_name() Use stringpool for gfc_get_name Use stringpool for gfc_match_generic_spec Use stringpool for gfc_match("%n") Use stringpool for association_list Use stringpool for some gfc_code2string return values Add uop/name helpers Use stringpool for modules Do not copy name for check_function_name Do pointer comparison instead of strcmp Use stringpool for remaining names Use stringpool for intrinsics and common Fix write_omp_udr for user-operator REDUCTIONs Use stringpool for iso_c_binding module names Do pointer comparison in iso_c_binding_module Use stringpool for iso_fortran_env Use stringpool for charkind Use stringpool and unified uppercase handling for types Use stringpool in class et al Use stringpool for module tbp Use stringpool in class and procedure-pointer result Use stringpool for module binding_label Use stringpool for intrinsic functions Use stringpool on loading module symbols Use stringpool for mangled common names Use stringpool for OMP clause reduction code Free type-bound procedure structs PR87103: Remove max symbol length check from gfc_new_symbol gcc/fortran/check.c | 2 +- gcc/fortran/class.c | 96 +++++------ gcc/fortran/decl.c | 265 ++++++++++++++--------------- gcc/fortran/expr.c | 4 +- gcc/fortran/frontend-passes.c | 16 +- gcc/fortran/gfortran.h | 18 +- gcc/fortran/interface.c | 109 ++++++------ gcc/fortran/intrinsic.c | 11 +- gcc/fortran/io.c | 10 +- gcc/fortran/iresolve.c | 35 ++-- gcc/fortran/match.c | 143 ++++++++-------- gcc/fortran/match.h | 9 +- gcc/fortran/matchexp.c | 22 ++- gcc/fortran/misc.c | 2 +- gcc/fortran/module.c | 311 ++++++++++++++-------------------- gcc/fortran/openmp.c | 120 +++++++------ gcc/fortran/parse.c | 23 ++- gcc/fortran/primary.c | 58 ++++--- gcc/fortran/resolve.c | 81 +++++---- gcc/fortran/symbol.c | 58 ++++--- gcc/fortran/trans-array.c | 4 +- gcc/fortran/trans-common.c | 10 +- gcc/fortran/trans-decl.c | 38 ++--- gcc/fortran/trans-expr.c | 11 +- gcc/fortran/trans-openmp.c | 1 + gcc/fortran/trans-types.c | 20 +-- gcc/fortran/trans.c | 6 +- gcc/gdbinit.in | 1 + 28 files changed, 719 insertions(+), 765 deletions(-) -- 2.19.0.rc1