From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 575633851885 for ; Wed, 23 Nov 2022 17:49:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 575633851885 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.96,187,1665475200"; d="scan'208";a="87486137" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 23 Nov 2022 09:49:25 -0800 IronPort-SDR: Iz3+hwSOQ9CKx8EA/hyWBIaBO2yB5UjJXceprLU9EkRl9yq/sm1drZ7YVtxJhyjcZWS6WhRgmV HHd4tWChYDAfHDQgonolYTPnIFSiiRVH2+eeIfz615/0htj8j8FIGlJ3HMg8eOW958jUZnJnVt 63t1Bmvlw5uZVcjVt2jrSOaQiejz73XqzrxT4cD9+3LLTA9Sjy9KTDMKlNN33n2X9cH4r7K34m zatIzHhkQvQ5zeYjAFE9iJTRX7EYr7WZgC/xhP4S/9GjXbce0aHe3rsTOMchbTZwQyN1aTRouc R14= Date: Wed, 23 Nov 2022 17:49:19 +0000 From: Joseph Myers To: Jakub Jelinek CC: Marek Polacek , Subject: Re: [PATCH] c: Fix compile time hog in c_genericize [PR107127] In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3109.9 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no 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 Wed, 23 Nov 2022, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The complex multiplications result in deeply nested set of many SAVE_EXPRs, > which takes even on fast machines over 5 minutes to walk. > This patch fixes that by using walk_tree_without_duplicates where it is > instant. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2022-11-23 Andrew Pinski > Jakub Jelinek > > PR c/107127 > * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates > instead of walk_tree for c_genericize_control_r. > > * gcc.dg/pr107127.c: New test. OK. -- Joseph S. Myers joseph@codesourcery.com