diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-10 00:15:58 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-10 00:15:58 +0000 |
commit | 8f8dcce4abc08b582f0124d0b5a053bf36a34db0 (patch) | |
tree | 3634a27519c3d4e86e699e40edd03e6636c09ae2 /gcc/loop.c | |
parent | 8c8eb75026520e93147a7dc390c59c41e432a749 (diff) | |
download | gcc-8f8dcce4abc08b582f0124d0b5a053bf36a34db0.tar.gz |
* basic-block.h (flow_delete_block_noexpunge): Declare.
(expunge_block_nocompact): Declare.
* cfg.c (expunge_block_nocompact): Split out from ...
(expunge_block): ... here.
* cfgrtl.c (can_delete_label_p): Don't use exception_handler_labels.
(flow_delete_block_noexpunge): Split out from ...
(flow_delete_block): ... here.
* cfgcleanup.c (delete_unreachable_blocks): Compact while
removing dead blocks.
* except.c (exception_handler_labels): Remove.
(exception_handler_label_map): New.
(struct eh_region): Add aka member.
(mark_ehl_map_entry, mark_ehl_map, free_region): New.
(ehl_hash, ehl_eq, ehl_free, add_ehl_entry): New.
(for_each_eh_label, for_each_eh_label_1): New.
(init_eh): Register exception_handler_label_map.
(free_eh_status): Use free_region.
(find_exception_handler_labels): Use the map, not the list.
(remove_exception_handler_label): Likewise.
(maybe_remove_eh_handler): Likewise.
(remove_eh_handler): Use the region aka bitmap.
* except.h (exception_handler_labels): Remove.
(for_each_eh_label): Declare.
* jump.c (rebuild_jump_labels): Don't check exception_handler_labels.
* loop.c (invalidate_loops_containing_label): New.
(find_and_verify_loops): Use it. Use for_each_eh_label.
* sched-rgn.c (is_cfg_nonregular): Use
current_function_has_exception_handlers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52100 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/gcc/loop.c b/gcc/loop.c index b51b2a850d7..53b9caa3aa0 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -235,6 +235,7 @@ FILE *loop_dump_stream; /* Forward declarations. */ +static void invalidate_loops_containing_label PARAMS ((rtx)); static void find_and_verify_loops PARAMS ((rtx, struct loops *)); static void mark_loop_jump PARAMS ((rtx, struct loop *)); static void prescan_loop PARAMS ((struct loop *)); @@ -2609,6 +2610,17 @@ prescan_loop (loop) } } +/* Invalidate all loops containing LABEL. */ + +static void +invalidate_loops_containing_label (label) + rtx label; +{ + struct loop *loop; + for (loop = uid_loop[INSN_UID (label)]; loop; loop = loop->outer) + loop->invalid = 1; +} + /* Scan the function looking for loops. Record the start and end of each loop. Also mark as invalid loops any loops that contain a setjmp or are branched to from outside the loop. */ @@ -2695,23 +2707,12 @@ find_and_verify_loops (f, loops) /* Any loop containing a label used in an initializer must be invalidated, because it can be jumped into from anywhere. */ - for (label = forced_labels; label; label = XEXP (label, 1)) - { - for (loop = uid_loop[INSN_UID (XEXP (label, 0))]; - loop; loop = loop->outer) - loop->invalid = 1; - } + invalidate_loops_containing_label (XEXP (label, 0)); /* Any loop containing a label used for an exception handler must be invalidated, because it can be jumped into from anywhere. */ - - for (label = exception_handler_labels; label; label = XEXP (label, 1)) - { - for (loop = uid_loop[INSN_UID (XEXP (label, 0))]; - loop; loop = loop->outer) - loop->invalid = 1; - } + for_each_eh_label (invalidate_loops_containing_label); /* Now scan all insn's in the function. If any JUMP_INSN branches into a loop that it is not contained within, that loop is marked invalid. @@ -2735,11 +2736,7 @@ find_and_verify_loops (f, loops) { rtx note = find_reg_note (insn, REG_LABEL, NULL_RTX); if (note) - { - for (loop = uid_loop[INSN_UID (XEXP (note, 0))]; - loop; loop = loop->outer) - loop->invalid = 1; - } + invalidate_loops_containing_label (XEXP (note, 0)); } if (GET_CODE (insn) != JUMP_INSN) |