summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-07 06:14:15 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-07 06:14:15 +0000
commit0d9e7a5e1514e20af3a2eb2e89739f2d362f482a (patch)
tree710e59e353d684b5781d79e6d8725a5a5754308b /gcc
parent9d4547b22985663818de5a847885b7b436715a45 (diff)
downloadppe42-gcc-0d9e7a5e1514e20af3a2eb2e89739f2d362f482a.tar.gz
ppe42-gcc-0d9e7a5e1514e20af3a2eb2e89739f2d362f482a.zip
PR tree-optimization/17806
* cfghooks.c (split_edge): Update IRREDUCIBLE_LOOP flags. * cfgloopmanip.c (loop_split_edge_with): Updating of IRREDUCIBLE_LOOP flags moved to split_edge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88665 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cfghooks.c8
-rw-r--r--gcc/cfgloopmanip.c10
3 files changed, 16 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e43edb9646b..541807b98e9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-10-07 Zdenek Dvorak <dvorakz@suse.cz>
+
+ PR tree-optimization/17806
+ * cfghooks.c (split_edge): Update IRREDUCIBLE_LOOP flags.
+ * cfgloopmanip.c (loop_split_edge_with): Updating of IRREDUCIBLE_LOOP
+ flags moved to split_edge.
+
2004-10-07 Eric Botcazou <ebotcazou@libertysurf.fr>
PR middle-end/17285
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index e6a624c3550..948c2b4c13d 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -389,6 +389,7 @@ split_edge (edge e)
gcov_type count = e->count;
int freq = EDGE_FREQUENCY (e);
edge f;
+ bool irr = (e->flags & EDGE_IRREDUCIBLE_LOOP) != 0;
if (!cfg_hooks->split_edge)
internal_error ("%s does not support split_edge.", cfg_hooks->name);
@@ -399,6 +400,13 @@ split_edge (edge e)
EDGE_SUCC (ret, 0)->probability = REG_BR_PROB_BASE;
EDGE_SUCC (ret, 0)->count = count;
+ if (irr)
+ {
+ ret->flags |= BB_IRREDUCIBLE_LOOP;
+ EDGE_PRED (ret, 0)->flags |= EDGE_IRREDUCIBLE_LOOP;
+ EDGE_SUCC (ret, 0)->flags |= EDGE_IRREDUCIBLE_LOOP;
+ }
+
if (dom_computed[CDI_DOMINATORS])
set_immediate_dominator (CDI_DOMINATORS, ret, EDGE_PRED (ret, 0)->src);
diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c
index e5ec7bddaab..6d47756f588 100644
--- a/gcc/cfgloopmanip.c
+++ b/gcc/cfgloopmanip.c
@@ -1241,7 +1241,6 @@ loop_split_edge_with (edge e, rtx insns)
{
basic_block src, dest, new_bb;
struct loop *loop_c;
- edge new_e;
src = e->src;
dest = e->dest;
@@ -1252,14 +1251,7 @@ loop_split_edge_with (edge e, rtx insns)
new_bb = split_edge (e);
add_bb_to_loop (new_bb, loop_c);
- new_bb->flags = insns ? BB_SUPERBLOCK : 0;
-
- new_e = EDGE_SUCC (new_bb, 0);
- if (e->flags & EDGE_IRREDUCIBLE_LOOP)
- {
- new_bb->flags |= BB_IRREDUCIBLE_LOOP;
- new_e->flags |= EDGE_IRREDUCIBLE_LOOP;
- }
+ new_bb->flags |= (insns ? BB_SUPERBLOCK : 0);
if (insns)
emit_insn_after (insns, BB_END (new_bb));
OpenPOWER on IntegriCloud