From patchwork Fri Jun 3 14:47:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 98593 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 B71A7B6FAC for ; Sat, 4 Jun 2011 00:51:44 +1000 (EST) Received: (qmail 15354 invoked by alias); 3 Jun 2011 14:51:42 -0000 Received: (qmail 15345 invoked by uid 22791); 3 Jun 2011 14:51:42 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Jun 2011 14:51:22 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p53EpMOx001563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 3 Jun 2011 10:51:22 -0400 Received: from freie.oliva.athome.lsd.ic.unicamp.br (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p53EpHcq015418 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 3 Jun 2011 10:51:21 -0400 Received: from livre.localdomain (livre-to-gw.oliva.athome.lsd.ic.unicamp.br [172.31.160.19]) by freie.oliva.athome.lsd.ic.unicamp.br (8.14.4/8.14.4) with ESMTP id p53Ep7dQ022638 for ; Fri, 3 Jun 2011 11:51:07 -0300 Received: from livre.localdomain (aoliva@localhost.localdomain [127.0.0.1]) by livre.localdomain (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p53El8qh021510; Fri, 3 Jun 2011 11:47:08 -0300 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id p53El7Lb021508; Fri, 3 Jun 2011 11:47:08 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Subject: don't force debug insns after their PREV_INSNs Date: Fri, 03 Jun 2011 11:47:07 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) 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 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=677681 can be “fixed” by disabling the artificial dependency of a debug insn on its previous insn. Debug insns will often depend on their prevs anyway, in a use/def relationship, but if the def was (re)moved or the use was reset, this artificial dep helped keep the debug insn “in place”. Being a very imperfect heuristic, it's not clear that it helps more than it harms. Thoughts? Regstrapped on x86_64-linux-gnu and i686-linux-gnu. for gcc/ChangeLog from Alexandre Oliva * sched-deps.c (sched_analyze_insn): Don't force debug insns to follow their original predecessors. Index: gcc/sched-deps.c =================================================================== --- gcc/sched-deps.c.orig 2011-02-24 09:54:12.016654388 -0300 +++ gcc/sched-deps.c 2011-02-24 09:55:48.456918435 -0300 @@ -2816,7 +2816,7 @@ sched_analyze_insn (struct deps_desc *de additional analysis can modify the generated code. */ prev = PREV_INSN (insn); - - if (prev && NONDEBUG_INSN_P (prev)) - add_dependence (insn, prev, REG_DEP_ANTI); } else