From patchwork Mon Nov 26 17:58:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 201998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B5CB02C008C for ; Tue, 27 Nov 2012 05:01:20 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1354557682; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Cc:Subject:Date:Message-ID:User-Agent: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=6Y0PATw CoIZ+1w9/Aw/zAzb3UWw=; b=aBwzEm96YrzSGEp7O52wyZTGVslu9XcQ4lfKMhk 1W7iqUPZaFfQVEDf7nAVr0Vd9xsupJP0hSyI0tuKqejIxMdNIuDJa+OGBRJ4t+bS xxPxQ2O1Z1isJGdhbUo9D0NeOnkCVVvRy3Se3j36fHqNO2G+gwLL6EI57GRdm3qP xXAU= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Cc:Subject:Date:Message-ID:User-Agent:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=aKv1F3fmEKciJ4lu+aTS1X2ecjfhbvJhxMFeufdOkLwXxNlzca4+EZd/Vgzd1I 440RKNykf9e/3JC52Q3MWjF3sDv7KpkKoosvnUG7C4zQEDJ6yy8Zsipl7DQ7WE+p IW3TqIsRpanEL8KWgut02Fx5sbg3fhmtkfbLYRgWsQQZ4=; Received: (qmail 2525 invoked by alias); 26 Nov 2012 18:01:12 -0000 Received: (qmail 2512 invoked by uid 22791); 26 Nov 2012 18:01:10 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Nov 2012 18:01:04 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 936ACCB22C9; Mon, 26 Nov 2012 19:01:07 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UOC7BM1X3rcH; Mon, 26 Nov 2012 19:01:07 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 5766ECB1B5A; Mon, 26 Nov 2012 19:01:07 +0100 (CET) From: Eric Botcazou To: Steven Bosscher Cc: gcc-patches@gcc.gnu.org, Jakub Jelinek Subject: Re: [patch] reorg.c janitor patch 2: handle DEBUG_INSN Date: Mon, 26 Nov 2012 18:58:46 +0100 Message-ID: <1830912.piUK0vDJFk@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.16-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: References: <20121125220903.GJ2315@tucnak.redhat.com> MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org > If that is true, then why are there so many post var-tracking passes > using NONDEBUG_INSN_P and/or looking for the DEBUG_INSN code? See e.g. > shorten_branches, reorg.c, various machine reorgs, etc. They are very likely overzealous. > For example from reorg.c:redundant_insn() in the loop "/* Scan > backwards looking for a match. */": > > 151731 nemet if (!NONDEBUG_INSN_P (trial)) > 99 kenner continue; > 151731 nemet --insns_to_search; > > This was introduced to fix PR41349. Apparently DEBUG_INSN live on > beyond var-tracking...? I think that the fix for this PR was really about NOTEs and not DEBUG_INSNs. I'm going to test the following patchlet on the SPARC: Index: reorg.c =================================================================== --- reorg.c (revision 193748) +++ reorg.c (working copy) @@ -1628,7 +1628,7 @@ redundant_insn (rtx insn, rtx target, rt if (LABEL_P (trial)) return 0; - if (!NONDEBUG_INSN_P (trial)) + if (!INSN_P (trial)) continue; --insns_to_search; @@ -1731,7 +1731,7 @@ redundant_insn (rtx insn, rtx target, rt trial && !LABEL_P (trial) && insns_to_search > 0; trial = PREV_INSN (trial)) { - if (!NONDEBUG_INSN_P (trial)) + if (!INSN_P (trial)) continue; --insns_to_search;