From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id AD3E03858410 for ; Thu, 28 Oct 2021 15:24:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AD3E03858410 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-107-jkzQ2st6NdWCEAWntTX0-A-1; Thu, 28 Oct 2021 11:24:29 -0400 X-MC-Unique: jkzQ2st6NdWCEAWntTX0-A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B83E68066F6 for ; Thu, 28 Oct 2021 15:24:28 +0000 (UTC) Received: from abulafia.quesejoda.com (unknown [10.39.193.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 99DF026DC1; Thu, 28 Oct 2021 15:24:02 +0000 (UTC) Received: from abulafia.quesejoda.com (localhost [127.0.0.1]) by abulafia.quesejoda.com (8.16.1/8.15.2) with ESMTPS id 19SFNxJo522438 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 28 Oct 2021 17:24:00 +0200 Received: (from aldyh@localhost) by abulafia.quesejoda.com (8.16.1/8.16.1/Submit) id 19SFNxj6522437; Thu, 28 Oct 2021 17:23:59 +0200 From: Aldy Hernandez To: GCC patches Subject: [PATCH] path relation oracle: Remove SSA's being killed from the equivalence list. Date: Thu, 28 Oct 2021 17:23:54 +0200 Message-Id: <20211028152354.522386-1-aldyh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-13.0 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_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2021 15:24:33 -0000 Same thing as the relational change. Walk any equivalences that have been registered on the path, and remove the name being killed. The only reason we had added the equivalence with itself earlier is so we wouldn't search any further in the equivalency list. So if we are removing all references to it, then we no longer need to add a "kill" record. Will push pending tests on x86-64 Linux. Co-authored-by: Andrew MacLeod gcc/ChangeLog: * value-relation.cc (path_oracle::killing_def): Walk the equivalency list and remove SSA from any equivalencies. --- gcc/value-relation.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gcc/value-relation.cc b/gcc/value-relation.cc index 0ad4f7a9495..512b51ce022 100644 --- a/gcc/value-relation.cc +++ b/gcc/value-relation.cc @@ -1298,17 +1298,17 @@ path_oracle::killing_def (tree ssa) } unsigned v = SSA_NAME_VERSION (ssa); - bitmap b = BITMAP_ALLOC (&m_bitmaps); - bitmap_set_bit (b, v); - equiv_chain *ptr = (equiv_chain *) obstack_alloc (&m_chain_obstack, - sizeof (equiv_chain)); - ptr->m_names = b; - ptr->m_bb = NULL; - ptr->m_next = m_equiv.m_next; - m_equiv.m_next = ptr; - bitmap_ior_into (m_equiv.m_names, b); - // Walk the relation list an remove SSA from any relations. + // Walk the equivalency list and remove SSA from any equivalencies. + if (bitmap_bit_p (m_equiv.m_names, v)) + { + bitmap_clear_bit (m_equiv.m_names, v); + for (equiv_chain *ptr = m_equiv.m_next; ptr; ptr = ptr->m_next) + if (bitmap_bit_p (ptr->m_names, v)) + bitmap_clear_bit (ptr->m_names, v); + } + + // Walk the relation list and remove SSA from any relations. if (!bitmap_bit_p (m_relations.m_names, v)) return; -- 2.31.1