From patchwork Sun Apr 17 07:00:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Revital Eres X-Patchwork-Id: 1053 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:48:39 -0000 Delivered-To: patches@linaro.org Received: by 10.220.158.206 with SMTP id g14cs323vcx; Sun, 17 Apr 2011 00:00:27 -0700 (PDT) Received: by 10.14.127.68 with SMTP id c44mr1169338eei.68.1303023626496; Sun, 17 Apr 2011 00:00:26 -0700 (PDT) Received: from mail-ey0-f178.google.com (mail-ey0-f178.google.com [209.85.215.178]) by mx.google.com with ESMTPS id w16si9718148eei.40.2011.04.17.00.00.24 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Apr 2011 00:00:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) client-ip=209.85.215.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.178 is neither permitted nor denied by best guess record for domain of revital.eres@linaro.org) smtp.mail=revital.eres@linaro.org Received: by eya25 with SMTP id 25so1282818eya.37 for ; Sun, 17 Apr 2011 00:00:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.99.137 with SMTP id u9mr3415231ebn.107.1303023624754; Sun, 17 Apr 2011 00:00:24 -0700 (PDT) Received: by 10.213.10.144 with HTTP; Sun, 17 Apr 2011 00:00:24 -0700 (PDT) Date: Sun, 17 Apr 2011 10:00:24 +0300 Message-ID: Subject: [PATCH, SMS] Avoid considering debug_insn when calculating SCCs From: Revital Eres To: zaks@il.ibm.com, gcc-patches@gcc.gnu.org Cc: Patch Tracking Hello, The attached patch avoids considering debug_insn when calculating SCCs. With this change the existence of debug_insn does not influence the scheduling order and rec_MII. Bootstrap and regtest on ppc64-redhat-linux and regtest on arm-linux-gnueabi. OK for mainline? Thanks, Revital Changelog: * ddg.c (find_nodes_on_paths): Ignore DEBUG_INSNs. === modified file 'gcc/ddg.c' --- gcc/ddg.c 2011-03-27 07:11:08 +0000 +++ gcc/ddg.c 2011-04-11 12:04:54 +0000 @@ -1116,13 +1116,19 @@ find_nodes_on_paths (sbitmap result, ddg { ddg_edge_ptr e; ddg_node_ptr u_node = &g->nodes[u]; - + + /* Ignore DEBUG_INSNs when calculating the SCCs to avoid their + influence on the scheduling order and rec_mii. */ + if (DEBUG_INSN_P (u_node->insn)) + continue; + for (e = u_node->out; e != (ddg_edge_ptr) 0; e = e->next_out) { ddg_node_ptr v_node = e->dest; int v = v_node->cuid; - if (!TEST_BIT (reachable_from, v)) + /* Ignore DEBUG_INSN when calculating the SCCs. */ + if (!TEST_BIT (reachable_from, v) && !DEBUG_INSN_P (v_node->insn)) { SET_BIT (reachable_from, v); SET_BIT (tmp, v); @@ -1146,12 +1152,18 @@ find_nodes_on_paths (sbitmap result, ddg ddg_edge_ptr e; ddg_node_ptr u_node = &g->nodes[u]; + /* Ignore DEBUG_INSNs when calculating the SCCs to avoid their + influence on the scheduling order and rec_mii. */ + if (DEBUG_INSN_P (u_node->insn)) + continue; + for (e = u_node->in; e != (ddg_edge_ptr) 0; e = e->next_in) { ddg_node_ptr v_node = e->src; int v = v_node->cuid; - if (!TEST_BIT (reach_to, v)) + /* Ignore DEBUG_INSN when calculating the SCCs. */ + if (!TEST_BIT (reach_to, v) && !DEBUG_INSN_P (v_node->insn)) { SET_BIT (reach_to, v); SET_BIT (tmp, v);