]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-threadupdate.c (thread_single_edge): Use delete_jump_thread instead of open...
authorJeff Law <law@redhat.com>
Wed, 20 May 2015 02:21:29 +0000 (20:21 -0600)
committerJeff Law <law@gcc.gnu.org>
Wed, 20 May 2015 02:21:29 +0000 (20:21 -0600)
       * tree-ssa-threadupdate.c (thread_single_edge): Use delete_jump_thread
        instead of open-coded version.  Also delete the jump thread created
        within this function.

From-SVN: r223431

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

index 95326a3f5aa0b0e1a441f7e3787e2494db9b4c28..95114fa00a4c50712b0d1ee63af72258bda2cc43 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-20  Jeff Law  <law@redhat.com>
+
+       * tree-ssa-threadupdate.c (thread_single_edge): Use delete_jump_thread
+       instead of open-coded version.  Also delete the jump thread created
+       within this function.
+
 2015-05-20  Alan Modra  <amodra@gmail.com>
 
        * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Return
index 0d61c1860ef7ee05778bb1eba5f2f589d953e464..c5b78a4629af13eb076d46cc5f48f98b64630649 100644 (file)
@@ -1647,9 +1647,7 @@ thread_single_edge (edge e)
   vec<jump_thread_edge *> *path = THREAD_PATH (e);
   edge eto = (*path)[1]->e;
 
-  for (unsigned int i = 0; i < path->length (); i++)
-    delete (*path)[i];
-  delete path;
+  delete_jump_thread_path (path);
   e->aux = NULL;
 
   thread_stats.num_threaded_edges++;
@@ -1693,6 +1691,7 @@ thread_single_edge (edge e)
   redirect_edge_and_branch (e, rd.dup_blocks[0]);
   flush_pending_stmts (e);
 
+  delete_jump_thread_path (npath);
   return rd.dup_blocks[0];
 }