aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfglayout.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-02-25 21:00:00 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2004-02-25 20:00:00 +0000
commit12c3874e62ea28f9df3f14e93bba5f624b1a15d9 (patch)
tree8328d527b50b846c05df0b06c0dc56a80978890e /gcc/cfglayout.c
parentb29610b3cfc461e3cd119c6892c31a0832d9daaf (diff)
downloadgcc-12c3874e62ea28f9df3f14e93bba5f624b1a15d9.zip
gcc-12c3874e62ea28f9df3f14e93bba5f624b1a15d9.tar.gz
gcc-12c3874e62ea28f9df3f14e93bba5f624b1a15d9.tar.bz2
basic-block.h (make_eh_edge, [...]): Declare.
* basic-block.h (make_eh_edge, break_superblocks): Declare. * cfgbuild.c (make_eh_edge): Make global. * cfglayout.c (break_superblocks): Likewise; fix memory leak. * except.c (build_post_landing_pads, connect_post_landing_pads, dw2_build_landing_pads, sjlj_emit_function_enter, sjlj_emit_function_exit, sjlj_emit_dispatch_table, sjlj_build_landing_pads): Update CFG. (emit_to_new_bb_before): New function. (finish_eh_generation): Do not rebuild the CFG. From-SVN: r78448
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r--gcc/cfglayout.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 41d92bb..2534965 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -56,7 +56,6 @@ static void change_scope (rtx, tree, tree);
void verify_insn_chain (void);
static void fixup_fallthru_exit_predecessor (void);
static rtx duplicate_insn_chain (rtx, rtx);
-static void break_superblocks (void);
static tree insn_scope (rtx);
rtx
@@ -1144,23 +1143,22 @@ cfg_layout_initialize (void)
}
/* Splits superblocks. */
-static void
+void
break_superblocks (void)
{
sbitmap superblocks;
- int i, need;
+ bool need = false;
+ basic_block bb;
- superblocks = sbitmap_alloc (n_basic_blocks);
+ superblocks = sbitmap_alloc (last_basic_block);
sbitmap_zero (superblocks);
- need = 0;
-
- for (i = 0; i < n_basic_blocks; i++)
- if (BASIC_BLOCK(i)->flags & BB_SUPERBLOCK)
+ FOR_EACH_BB (bb)
+ if (bb->flags & BB_SUPERBLOCK)
{
- BASIC_BLOCK(i)->flags &= ~BB_SUPERBLOCK;
- SET_BIT (superblocks, i);
- need = 1;
+ bb->flags &= ~BB_SUPERBLOCK;
+ SET_BIT (superblocks, bb->index);
+ need = true;
}
if (need)