From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 8172838582AB for ; Sat, 19 Nov 2022 16:33:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8172838582AB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-x533.google.com with SMTP id 6so7559571pgm.6 for ; Sat, 19 Nov 2022 08:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=9lYy/KdrjCYLM8vcWwV8NreTM9E9OFlOioloySTPqTI=; b=CCsHGOUPTbZC5hipaGKppLuWFiRp5mxjkhiKzq5iL1cHOVJnuTkJShiI9HdmNC4Auf BePXG1zAgdfxUokvxG+jMx4XmUTDGH6l6Dd55ybxPX2zbTBjDB0NbN0MPlRVYmewEi0m gYzsO9vYEB2jzD2rmV+HAti6nWpZdpjstdqO60vThKu62KOLKoziVb6Dz38QGNW+m4wS G/Gna4tz7wJ0OJnTkrs2Uyrd7XefxbXyognvjebydfMLNngPaLMUTHkPKRbCa1Fxr1S4 /D8I7bftZ+B/43YTO0BZfhbUchoG3xowMTLtRLILXRDxA2s7IUSsns7pdEARE+542V51 prGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9lYy/KdrjCYLM8vcWwV8NreTM9E9OFlOioloySTPqTI=; b=Y8cpNeWbWjl6/Ek+9qte5MXacw0FgUhCdlhrzbkG0FfVx6A70LoxVIg73xVrU4t1px UHVWFneaRvGtEWpMShYpp+yxRH/DBfx7N4rcyXmSg9x8FzNbTHlwZSKGrCdN7AR4V6La 6196xIDbcVdix4Ly4nVT6T1TjSEWZBp/VpPO+G/67ckgc91YcP7KQqpQz+uuKf9VqdpM OL/zrc4NB4TAW7GDOy02pe8ZDnoXnxA2XSnP1oyVOEzc32dl59xlrV1RC3ktThAaZXFm 8C71kI2OZf591Wk/0N95AJIGdVG324lrOPjBjw6qJH1CRmReIrTbXWMp1it9KO5pNouJ ywLA== X-Gm-Message-State: ANoB5pmBqSkT7KhEoTEIUx2BLzQ4CPF3M/hkdxpKE3aABkZKsDFvHCLs BrozAh0LHk4XDaVAbc9hiBk= X-Google-Smtp-Source: AA0mqf5XUHr6HyWgdw7w3FXESmWXrdNnraqr/Hy8kT4DUUxxnCCs/NARUYJuZIL1abSYSBw44dKO9Q== X-Received: by 2002:a05:6a00:290f:b0:56b:e15a:7215 with SMTP id cg15-20020a056a00290f00b0056be15a7215mr12776938pfb.27.1668875632228; Sat, 19 Nov 2022 08:33:52 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id e5-20020a056a0000c500b005360da6b26bsm5257454pfj.159.2022.11.19.08.33.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 19 Nov 2022 08:33:51 -0800 (PST) Message-ID: Date: Sat, 19 Nov 2022 09:33:49 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] constexprify some tree variables Content-Language: en-US To: Andrew Pinski Cc: apinski@marvell.com, gcc-patches@gcc.gnu.org References: <1668794731-9349-1-git-send-email-apinski@marvell.com> <337e91f6-e8ad-3a45-cb94-9093cd33c6e9@gmail.com> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/18/22 19:53, Andrew Pinski wrote: > On Fri, Nov 18, 2022 at 12:06 PM Jeff Law via Gcc-patches > wrote: >> >> On 11/18/22 11:05, apinski--- via Gcc-patches wrote: >>> From: Andrew Pinski >>> >>> Since we use C++11 by default now, we can >>> use constexpr for some const decls in tree-core.h. >>> >>> This patch does that and it allows for better optimizations >>> of GCC code with checking enabled and without LTO. >>> >>> For an example generic-match.cc compiling is speed up due >>> to the less number of basic blocks and less debugging info >>> produced. I did not check the speed of compiling the same source >>> but rather the speed of compiling the old vs new sources here >>> (but with the same compiler base). >>> >>> The small slow down in the parsing of the arrays in each TU >>> is migrated by a speed up in how much code/debugging info >>> is produced in the end. >>> >>> Note I looked at generic-match.cc since it is one of the >>> compiling sources which causes parallel building to stall and >>> I wanted to speed it up. >>> >>> OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. >>> Or should this wait until GCC 13 branches off? >>> >>> gcc/ChangeLog: >>> >>> PR middle-end/14840 >>> * tree-core.h (tree_code_type): Constexprify >>> by including all-tree.def. >>> (tree_code_length): Likewise. >>> * tree.cc (tree_code_type): Remove. >>> (tree_code_length): Remove. >> I would have preferred this a week ago :-) And if it was just >> const-ifying, I'd ACK it without hesitation. > Yes I know which is why I am ok with waiting for GCC 14 really. I > decided to try to clear out some of the old bug reports assigned to > myself and this one was one of the oldest and also one of the easiest > to do. Let's go ahead.  It addresses a bug and should be quite safe. Jeff