summaryrefslogtreecommitdiff
path: root/gcc/cfghooks.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-03 16:17:33 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2008-11-03 16:17:33 +0000
commit2c3933b87b056dce86c72fc95813f10d528e1a50 (patch)
tree0945fff32b773460231721e9efc16a21d46d6f8c /gcc/cfghooks.c
parentb4e5c32de33a35006cc9aa65a94af1fd9a816cd0 (diff)
downloadgcc-2c3933b87b056dce86c72fc95813f10d528e1a50.tar.gz
2008-11-03 Sebastian Pop <sebastian.pop@amd.com>
* cfghooks.c (split_block): Set BB_IRREDUCIBLE_LOOP and EDGE_IRREDUCIBLE_LOOP. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141549 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r--gcc/cfghooks.c11
1 files changed, 10 insertions, 1 deletions
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. */