]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ddg.c (create_ddg): Exclude nodes of debug_insn in counting nodes of a loop.
authorBingfeng Mei <bmei@broadcom.com>
Mon, 19 Jul 2010 09:18:14 +0000 (09:18 +0000)
committerBingfeng Mei <meibf@gcc.gnu.org>
Mon, 19 Jul 2010 09:18:14 +0000 (09:18 +0000)
2010-07-19  Bingfeng Mei  <bmei@broadcom.com>
* ddg.c (create_ddg): Exclude nodes of debug_insn in counting nodes
        of a loop.
        * loop-doloop.c (doloop_condition_get): Skip possible debug_insn.

From-SVN: r162300

gcc/ChangeLog
gcc/ddg.c
gcc/loop-doloop.c

index 3384d60b428b694f075a212392103a835436079a..9175244bd2c657224688edef3b0f09cde575c795 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-19  Bingfeng Mei  <bmei@broadcom.com>
+       * ddg.c (create_ddg): Exclude nodes of debug_insn in counting nodes
+        of a loop.
+        * loop-doloop.c (doloop_condition_get): Skip possible debug_insn.
+
 2010-07-19  Iain Sandoe  <iains@gcc.gnu.org>
 
        * config/i386/darwin.h: Define darwin_emit_branch_islands.
index 295c4e8da81cf1ec7690829c3c92a150e26cfef1..0a20ed612914a73f3c9c8e8cbca5ecfb045fc021 100644 (file)
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -488,7 +488,7 @@ create_ddg (basic_block bb, int closing_branch_deps)
     }
 
   /* There is nothing to do for this BB.  */
-  if (num_nodes <= 1)
+  if ((num_nodes - g->num_debug) <= 1)
     {
       free (g);
       return NULL;
index 47a81edaec9eed1ac7f54780e18dc2377b773b9c..4f0850b7702a5015ab71dc891ab7344199fa202b 100644 (file)
@@ -104,11 +104,11 @@ doloop_condition_get (rtx doloop_pat)
   if (GET_CODE (pattern) != PARALLEL)
     {
       rtx cond;
+      rtx prev_insn = prev_nondebug_insn (doloop_pat);
 
       /* We expect the decrement to immediately precede the branch.  */
 
-      if ((PREV_INSN (doloop_pat) == NULL_RTX)
-          || !INSN_P (PREV_INSN (doloop_pat)))
+      if (prev_insn == NULL_RTX || !INSN_P (prev_insn))
         return 0;
 
       cmp = pattern;