]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-threadupdate.c (mark_threaded_blocks): Properly dispose of the jump thread...
authorJeff Law <law@redhat.com>
Wed, 20 May 2015 16:36:30 +0000 (10:36 -0600)
committerJeff Law <law@gcc.gnu.org>
Wed, 20 May 2015 16:36:30 +0000 (10:36 -0600)
       * tree-ssa-threadupdate.c (mark_threaded_blocks): Properly
        dispose of the jump thread path when the jump threading
        opportunity is cancelled.

From-SVN: r223448

gcc/ChangeLog
gcc/tree-ssa-threadupdate.c

index fe4dfc45e5cde67b12e0e8bf9fd43d00f6e3dbdf..27435c675c5393a8f3ecf19060de3d6bcd945f02 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-20  Jeff Law  <law@redhat.com>
+
+       * tree-ssa-threadupdate.c (mark_threaded_blocks): Properly
+       dispose of the jump thread path when the jump threading
+       opportunity is cancelled.
+
 2015-05-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
 
        * diagnostic.c (diagnostic_print_caret_line): Fix off-by-one error
index c5b78a4629af13eb076d46cc5f48f98b64630649..4bccad0156aabc7fbad36a253cf146800c5f84ab 100644 (file)
@@ -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);
            }
        }
     }