From patchwork Wed Jun 16 15:53:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 0001-Add-hoist_insn-debug-counter.patch Date: Wed, 16 Jun 2010 05:53:02 -0000 From: Maxim Kuvyrkov X-Patchwork-Id: 55901 Message-Id: <4C18F35E.4000508@codesourcery.com> To: Jeff Law , gcc-patches 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;