loop.c (loop_optimize): Always find_loop_tree_blocks and unroll_block_trees when...
authorMark Mitchell <mark@codesourcery.com>
Wed, 24 Nov 1999 01:24:59 +0000 (01:24 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 24 Nov 1999 01:24:59 +0000 (01:24 +0000)
* loop.c (loop_optimize): Always find_loop_tree_blocks and
unroll_block_trees when generating debuggable code.

From-SVN: r30647

gcc/ChangeLog
gcc/loop.c
gcc/testsuite/g++.old-deja/g++.other/debug6.C

index 03f507f9ad796bdd7d8fba85a97b502a53a0399f..55f7c7a653ddf2a5a0ae7419f12a81c51118896f 100644 (file)
@@ -1,5 +1,8 @@
 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
 
+       * loop.c (loop_optimize): Always find_loop_tree_blocks and
+       unroll_block_trees when generating debuggable code.
+
        * tree.h (unsave_expr_1): New function.
        (lang_unsave): New variable.
        (get_callee_fndecl): New function.
index 8aeda6e98e58665eae17fb93564e0ebbdecdd519..a1a3803086adf8983a9d2cb69bbd82241d87ea39 100644 (file)
@@ -550,8 +550,12 @@ loop_optimize (f, dumpfile, unroll_p, bct_p)
     if (uid_luid[i] == 0)
       uid_luid[i] = uid_luid[i - 1];
 
-  /* Create a mapping from loops to BLOCK tree nodes.  */
-  if (unroll_p && write_symbols != NO_DEBUG)
+  /* If debugging and unrolling loops, we must replicate the tree
+     nodes corresponding to the BLOCKs inside the loop, so that the
+     original one to one mapping will remain.  We sometimes unroll
+     loops even when unroll_p is false, so we must always do this when
+     debugging.  */
+  if (write_symbols != NO_DEBUG)
     find_loop_tree_blocks ();
 
   /* Determine if the function has indirect jump.  On some systems
@@ -565,10 +569,8 @@ loop_optimize (f, dumpfile, unroll_p, bct_p)
       scan_loop (loop_number_loop_starts[i], loop_number_loop_ends[i],
                 loop_number_loop_cont[i], unroll_p, bct_p);
 
-  /* If debugging and unrolling loops, we must replicate the tree nodes
-     corresponding to the blocks inside the loop, so that the original one
-     to one mapping will remain.  */
-  if (unroll_p && write_symbols != NO_DEBUG)
+  /* Replicate the BLOCKs.  */
+  if (write_symbols != NO_DEBUG)
     unroll_block_trees ();
 
   end_alias_analysis ();
index 8fd5f9f0ecfa8caeadce82548bc2c0aefb6b038c..43f13b936b3a1741eb91fb0795318cbcf2cbdbcf 100644 (file)
@@ -6,8 +6,6 @@
 
 // This causes assember relocation errors
 
-// excess errors test - XFAIL *-*-*
-
 struct X
 {
   virtual ~X () {}