aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2015-05-20 10:36:30 -0600
committerJeff Law <law@gcc.gnu.org>2015-05-20 10:36:30 -0600
commit2b3ac48e4c3fb903960e61024f4de57697eedbf7 (patch)
tree8b9951f1b47db24c7fef089e1cc32b78e92c07a0 /gcc/tree-ssa-threadupdate.c
parentc3a630ce3e0b06654ec2cbae23182e2928e03143 (diff)
downloadgcc-2b3ac48e4c3fb903960e61024f4de57697eedbf7.zip
gcc-2b3ac48e4c3fb903960e61024f4de57697eedbf7.tar.gz
gcc-2b3ac48e4c3fb903960e61024f4de57697eedbf7.tar.bz2
tree-ssa-threadupdate.c (mark_threaded_blocks): Properly dispose of the jump thread path when...
* tree-ssa-threadupdate.c (mark_threaded_blocks): Properly dispose of the jump thread path when the jump threading opportunity is cancelled. From-SVN: r223448
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index c5b78a4..4bccad0 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -2159,9 +2159,16 @@ mark_threaded_blocks (bitmap threaded_blocks)
{
/* Attach the path to the starting edge if none is yet recorded. */
if ((*path)[0]->e->aux == NULL)
- (*path)[0]->e->aux = path;
- else if (dump_file && (dump_flags & TDF_DETAILS))
- dump_jump_thread_path (dump_file, *path, false);
+ {
+ (*path)[0]->e->aux = path;
+ }
+ else
+ {
+ paths.unordered_remove (i);
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ dump_jump_thread_path (dump_file, *path, false);
+ delete_jump_thread_path (path);
+ }
}
}
/* Second, look for paths that have any other jump thread attached to
@@ -2185,8 +2192,10 @@ mark_threaded_blocks (bitmap threaded_blocks)
else
{
e->aux = NULL;
+ paths.unordered_remove (i);
if (dump_file && (dump_flags & TDF_DETAILS))
dump_jump_thread_path (dump_file, *path, false);
+ delete_jump_thread_path (path);
}
}
}