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 024423858284 for ; Tue, 25 Apr 2023 15:20:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 024423858284 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682436025; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=p43aFk3YMzlbv7EgGDbJSoKAgm4yuUfY1IisegP2p+4=; b=GXNwDulAKdv76MW/qwI4q6Dpj/XaQkATLKveBH0RMicVy7doK8AdCj0xLTQui/PTf3AOs1 BfLa3+s9pnsI4jlQTyMLr0A115jFEHx6HmEAan9ABii2VV5qvJcTMvvixXAvWpXmleqdee /j7sRhUGDKLgxE/rDochrYuDYFSW8M4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-149-4-kgEhKgMT6XhPRTM7PnIA-1; Tue, 25 Apr 2023 11:20:24 -0400 X-MC-Unique: 4-kgEhKgMT6XhPRTM7PnIA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B2FFD88B7A2; Tue, 25 Apr 2023 15:20:23 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.156]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67B4D14171B8; Tue, 25 Apr 2023 15:20:23 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 33PFKKxf2381725 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 25 Apr 2023 17:20:20 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 33PFKJRF2381724; Tue, 25 Apr 2023 17:20:19 +0200 Date: Tue, 25 Apr 2023 17:20:19 +0200 From: Jakub Jelinek To: Richard Biener , Alexandre Oliva Cc: Eric Botcazou , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Avoid creating useless debug temporaries Message-ID: Reply-To: Jakub Jelinek References: <3493207.iIbC2pHGDl@fomalhaut> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: On Tue, Apr 25, 2023 at 05:10:50PM +0200, Richard Biener via Gcc-patches wrote: > On Tue, Apr 25, 2023 at 11:34 AM Eric Botcazou via Gcc-patches > wrote: > > > > Hi, > > > > insert_debug_temp_for_var_def has some strange code whereby it creates debug > > temporaries for SINGLE_RHS (RHS for gimple_assign_single_p) but not for other > > RHS in the same situation. > > It indeed looks odd (likewise the GIMPLE_PHI handling should be > covered by is_gimple_reg ()). > > > Removing it saves 25% of compilation time at -g -O > > for a pathological testcase I have. > > > > Bootstrapped/regtested on x86-64/Linux, OK for the mainline? > > OK. > > probably also helps PR109612 and the other similar PR referenced therein. Haven't looked into detail, but just saving compilation time shouldn't be the only factor when deciding about debug info stuff, another and perhaps even more important would be whether it affects the emitted debug info. One of ways to quantify that was running https://github.com/pmachata/dwlocstat before/after the change on something large, e.g. bootstrapped cc1plus (of course with the patch reverted and stage3 rebuilt so that it is the same code just with possibly different debug info). Jakub