From ede7cba0dd81777994a1d22b582ddb785b949224 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Mon, 3 Nov 2008 16:17:33 +0000 Subject: [PATCH] cfghooks.c (split_block): Set BB_IRREDUCIBLE_LOOP and EDGE_IRREDUCIBLE_LOOP. 2008-11-03 Sebastian Pop * cfghooks.c (split_block): Set BB_IRREDUCIBLE_LOOP and EDGE_IRREDUCIBLE_LOOP. From-SVN: r141549 --- gcc/ChangeLog | 5 +++++ gcc/cfghooks.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32ebb5d077b..5d9bfaa71bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-11-03 Sebastian Pop + + * cfghooks.c (split_block): Set BB_IRREDUCIBLE_LOOP and + EDGE_IRREDUCIBLE_LOOP. + 2008-11-03 Bernd Schmidt * config/bfin/bfin.c (bfin_optimize_loop): Properly handle case diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index 0897b0df565..10c04a8b057 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -425,6 +425,7 @@ edge split_block (basic_block bb, void *i) { basic_block new_bb; + edge res; if (!cfg_hooks->split_block) internal_error ("%s does not support split_block", cfg_hooks->name); @@ -450,7 +451,15 @@ split_block (basic_block bb, void *i) bb->loop_father->latch = new_bb; } - return make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU); + res = make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU); + + if (bb->flags & BB_IRREDUCIBLE_LOOP) + { + new_bb->flags |= BB_IRREDUCIBLE_LOOP; + res->flags |= EDGE_IRREDUCIBLE_LOOP; + } + + return res; } /* Splits block BB just after labels. The newly created edge is returned. */