Message ID | 20230502202623.1965601-1-jason@redhat.com |
---|---|
State | Repeat Merge |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp881902vqo; Tue, 2 May 2023 13:40:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6iHXoEM2pjme8gmgeTlIF2dYglsLimZV722OI1z8N2v/9TAkfYwJRxxymV2tOrHPB0C/4b X-Received: by 2002:a17:907:9705:b0:94e:1764:b0b5 with SMTP id jg5-20020a170907970500b0094e1764b0b5mr1219854ejc.69.1683060001850; Tue, 02 May 2023 13:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683060001; cv=none; d=google.com; s=arc-20160816; b=u3/5Jo5S//PRotcrmeE0Q53PCwE6LtBSsCZK7aXditkGMqFMmOPNwfjoEpeuzCkCct pLDVM+Mu8yxgAedfYKLPfSGclF+U8QDbwUb/az+H8lOhY+8KAbxkWJG9nArlj9K3UP5J U6yVkuBkVoEfO4RbCFYkuGfpT0F2Nkx19nnz+atGahw4DKxPT9IlUf58GMKCtM0+l5mj g0fN/SGGugi1ztMb9oB53C3AMIw3tOc8pHxdETeWTco5ERtNb5Eyh0abOQio00GfH/XP DmyzxpIzbW2t9SQBJ/CK3bxzWJkv6+/g6A799oFC1Ynwl+AmZ+Aug3aWYrKbBaztiv72 t+pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=5YNlKuM0mad9eY7M90EVBkLY+UPPHulvO92sK8gsKmo=; b=0QwN+bkck9n9aDqGH8LoHeWPQYpJd4K74rHQEtII5uZrD3cCUiPZ9lHzqiFg7jDPnp hPd50AQTxmjVddYvzIBya0lSYVWZLqdqc2YNbQHLOrK14HEvDFqHDPZHClKV2RqeM/8A FgOnsImM+7IEL5k+p/Rl6EVm/lstRRjS794ANwrJvFD39crvJeGDZNK1zT2tRHqKl9PD 1wVRt657It2HggiPEnyzqZODtLvzGoYP9o2TrwBD0babToPDvPKKnSHV3gVmMHkdWnsM 7Ex9gXHKOPzufqE2ynZ35/Eq6NrU+6nj/P3iIo682pv12Kd++WHvklIT4JNehnnVJMi1 FAaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=X1PJCaub; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id tb9-20020a1709078b8900b009655045843fsi390681ejc.204.2023.05.02.13.40.01 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 13:40:01 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=X1PJCaub; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 071BB3851C2C for <ouuuleilei@gmail.com>; Tue, 2 May 2023 20:27:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 071BB3851C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683059259; bh=5YNlKuM0mad9eY7M90EVBkLY+UPPHulvO92sK8gsKmo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=X1PJCaublJKg8JiVzdXd19qjeb6SEA11a5zddPfG1viz5/iyWyvX11rRZFjKwPy4I ypG5JJ71X9usJO1wylV3OIClnBMB8BaCN0fZnfrm+lPfz5svYpWr02RXiQpq+0iRi7 ayXDQ3GgJxrIQiAeWm+vaGA+mEdc9Yrax3U9b+IE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id A22623899016 for <gcc-patches@gcc.gnu.org>; Tue, 2 May 2023 20:26:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A22623899016 Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-658-LGk-fFrENIGcL_KRzHCgcQ-1; Tue, 02 May 2023 16:26:28 -0400 X-MC-Unique: LGk-fFrENIGcL_KRzHCgcQ-1 Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-3ef691d1eebso23257951cf.3 for <gcc-patches@gcc.gnu.org>; Tue, 02 May 2023 13:26:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683059188; x=1685651188; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5YNlKuM0mad9eY7M90EVBkLY+UPPHulvO92sK8gsKmo=; b=EUxVrLFvNYx96v0bxRt/aRLqjelLk5EQfFyUKSlO8XT1gStYvrHMlvn8CsiEz8wrIL +oEzH1BqpeIZRl9fapMDc9O9yooa0zzTmeIgX1Z4JwRs23n66nBLy3aIlVlFMG/M/a9w iUx4RqxG+amlplRdpPcyrBK4ETOK5SQuZXtw7jLEIo/yD6c6XotoeZstzPKeLVrhW20Z i24d6DC+fi6QuneZ2Y524KsPbnCsjvH1HlMfGN/E0t/EJzAzPHY4fdefLAJL72nQID9C JeLk9CT9o6ECQ96YhqkRHZdsEH6thATyZIuG+flSj9+0aHzVgzZ+C4juDSZoctHqFSGh 9j0A== X-Gm-Message-State: AC+VfDyTvbXAeZlUpTfC1YAydRnpqv32HltShMmmmbgRVSKayO2VWY0P bXRBc6CqRwmroCi0pOs/lS9ezKW4XCzLQIny6f5Dsi52Y6U/oVXflq0GyGbXEI2dmaIYl3Rhs3G AIA/PgAvYcxGAQMdZgDaunLuZoHoYJ1utac5HfYlwLzkvmjVs3V+euGDiSxpyjeAvyDApC07NGw == X-Received: by 2002:ac8:5b91:0:b0:3e6:71d6:5d5b with SMTP id a17-20020ac85b91000000b003e671d65d5bmr31183875qta.4.1683059188163; Tue, 02 May 2023 13:26:28 -0700 (PDT) X-Received: by 2002:ac8:5b91:0:b0:3e6:71d6:5d5b with SMTP id a17-20020ac85b91000000b003e671d65d5bmr31183848qta.4.1683059187841; Tue, 02 May 2023 13:26:27 -0700 (PDT) Received: from jason.com (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id h27-20020ac8777b000000b003ee2fb84d0dsm10622622qtu.11.2023.05.02.13.26.26 for <gcc-patches@gcc.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 13:26:27 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [pushed] c++: less invalidate_class_lookup_cache Date: Tue, 2 May 2023 16:26:23 -0400 Message-Id: <20230502202623.1965601-1-jason@redhat.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Jason Merrill via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Jason Merrill <jason@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764816324865256065?= X-GMAIL-MSGID: =?utf-8?q?1764816324865256065?= |
Series |
[pushed] c++: less invalidate_class_lookup_cache
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jason Merrill
May 2, 2023, 8:26 p.m. UTC
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In the testcase below, we push_to_top_level to instantiate f and g, and they can both use the previous_class_level cache from instantiating A<int>. Wiping the cache in pop_from_top_level is not helpful; we'll do that in pushclass if needed. template <class T> struct A { int i; void f() { i = 42; } void g() { i = 24; } }; int main() { A<int> a; a.f(); a.g(); } gcc/cp/ChangeLog: * name-lookup.cc (pop_from_top_level): Don't invalidate_class_lookup_cache. --- gcc/cp/name-lookup.cc | 3 --- 1 file changed, 3 deletions(-) base-commit: bc24c51c0ccd64617864897ad071c98004ffc0a4
diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc index 7c61bc3bf61..8fd5733c1e2 100644 --- a/gcc/cp/name-lookup.cc +++ b/gcc/cp/name-lookup.cc @@ -8205,9 +8205,6 @@ pop_from_top_level (void) auto_cond_timevar tv (TV_NAME_LOOKUP); - /* Clear out class-level bindings cache. */ - if (previous_class_level) - invalidate_class_lookup_cache (); pop_class_stack (); release_tree_vector (current_lang_base);