aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-11-24 01:24:59 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-11-24 01:24:59 +0000
commit428248f7944d289104751f05dc49d0e0c359f161 (patch)
treee6df572b38809b1b0fe04e7c064457c61bf14891 /gcc/loop.c
parent582db8e43021e33373aafbb03eafe6985fc4a0e8 (diff)
downloadgcc-428248f7944d289104751f05dc49d0e0c359f161.zip
gcc-428248f7944d289104751f05dc49d0e0c359f161.tar.gz
gcc-428248f7944d289104751f05dc49d0e0c359f161.tar.bz2
loop.c (loop_optimize): Always find_loop_tree_blocks and unroll_block_trees when generating debuggable code.
* loop.c (loop_optimize): Always find_loop_tree_blocks and unroll_block_trees when generating debuggable code. From-SVN: r30647
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 8aeda6e..a1a3803 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -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 ();