aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>2003-01-16 16:49:20 +0100
committerZdenek Dvorak <rakdver@gcc.gnu.org>2003-01-16 15:49:20 +0000
commit16f2b86aa8ed073f59186ab1cff028c17aa87145 (patch)
tree282c8a9e170d09ff46347e800edda163a0ea8f54 /gcc
parentc1b50e4978a214de1df4b7f61395bee83a924426 (diff)
downloadgcc-16f2b86aa8ed073f59186ab1cff028c17aa87145.zip
gcc-16f2b86aa8ed073f59186ab1cff028c17aa87145.tar.gz
gcc-16f2b86aa8ed073f59186ab1cff028c17aa87145.tar.bz2
cfgloop.c (flow_loops_find): Fix handling of abnormal edges.
2003-01-16 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> * cfgloop.c (flow_loops_find): Fix handling of abnormal edges. From-SVN: r61393
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cfgloop.c17
2 files changed, 13 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8dedbee..fa92014 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2003-01-16 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+
+ * cfgloop.c (flow_loops_find): Fix handling of abnormal edges.
+
2003-01-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* dbxout.c (lastfile, cwd): Fix `unused' warning.
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c
index da958c2..b93302e 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -804,19 +804,20 @@ flow_loops_find (loops, flags)
header->loop_depth = 0;
+ /* If we have an abnormal predecessor, do not consider the
+ loop (not worth the problems). */
+ for (e = header->pred; e; e = e->pred_next)
+ if (e->flags & EDGE_ABNORMAL)
+ break;
+ if (e)
+ continue;
+
for (e = header->pred; e; e = e->pred_next)
{
basic_block latch = e->src;
if (e->flags & EDGE_ABNORMAL)
- {
- if (more_latches)
- {
- RESET_BIT (headers, header->index);
- num_loops--;
- }
- break;
- }
+ abort ();
/* Look for back edges where a predecessor is dominated
by this block. A natural loop has a single entry