From patchwork Wed Jun 16 15:53:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Kuvyrkov X-Patchwork-Id: 55901 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 18A3FB7D8B for ; Thu, 17 Jun 2010 01:53:21 +1000 (EST) Received: (qmail 15273 invoked by alias); 16 Jun 2010 15:53:18 -0000 Received: (qmail 15259 invoked by uid 22791); 16 Jun 2010 15:53:17 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, TW_DB, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Jun 2010 15:53:07 +0000 Received: (qmail 18773 invoked from network); 16 Jun 2010 15:53:05 -0000 Received: from unknown (HELO ?172.16.1.24?) (maxim@127.0.0.2) by mail.codesourcery.com with ESMTPA; 16 Jun 2010 15:53:05 -0000 Message-ID: <4C18F35E.4000508@codesourcery.com> Date: Wed, 16 Jun 2010 19:53:02 +0400 From: Maxim Kuvyrkov User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Jeff Law , gcc-patches Subject: 0001-Add-hoist_insn-debug-counter.patch References: <4C18F225.2040509@codesourcery.com> In-Reply-To: <4C18F225.2040509@codesourcery.com> X-IsSubscribed: yes 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 This patch adds new debug counter to the hoisting pass. OK to apply? Thank you, diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def index 33afb0b..56f3461 100644 --- a/gcc/dbgcnt.def +++ b/gcc/dbgcnt.def @@ -158,6 +158,7 @@ DEBUG_COUNTER (gcse2_delete) DEBUG_COUNTER (global_alloc_at_func) DEBUG_COUNTER (global_alloc_at_reg) DEBUG_COUNTER (hoist) +DEBUG_COUNTER (hoist_insn) DEBUG_COUNTER (ia64_sched2) DEBUG_COUNTER (if_conversion) DEBUG_COUNTER (if_after_combine) diff --git a/gcc/gcse.c b/gcc/gcse.c index b0a1868..1dbd2f0 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -4325,7 +4325,7 @@ hoist_code (void) the vast majority of hoistable expressions are only movable from two successors, so raising this threshold is likely to nullify any benefit we get from code hoisting. */ - if (hoistable > 1) + if (hoistable > 1 && dbg_cnt (hoist_insn)) { SET_BIT (hoist_exprs[bb->index], i); found = 1;