* tree-ssa-threadedge.c (thread_across_edge): Use foo.last () rather
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Sep 2013 15:33:34 +0000 (15:33 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Sep 2013 15:33:34 +0000 (15:33 +0000)
        than foo[foo.length () - 1] to access last member in a vec.
        * tree-ssa-threadupdate.c (register_jump_thread): Similarly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202892 138bc75d-0d04-0410-961f-82ee72b054a4

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

index fdca495..b6b751b 100644 (file)
@@ -1,3 +1,9 @@
+2013-09-25  Jeff Law  <law@redhat.com>
+
+       * tree-ssa-threadedge.c (thread_across_edge): Use foo.last () rather
+       than foo[foo.length () - 1] to access last member in a vec.
+       * tree-ssa-threadupdate.c (register_jump_thread): Similarly.
+
 2013-09-25  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/58521
index 47db280..2ca5634 100644 (file)
@@ -947,8 +947,7 @@ thread_across_edge (gimple dummy_cond,
            }
 
          remove_temporary_equivalences (stack);
-         propagate_threaded_block_debug_into (path[path.length () - 1]->dest,
-                                              e->dest);
+         propagate_threaded_block_debug_into (path.last ()->dest, e->dest);
          register_jump_thread (path, false);
          path.release ();
          return;
@@ -987,7 +986,7 @@ thread_across_edge (gimple dummy_cond,
        path.safe_push (taken_edge);
        found = false;
        if ((e->flags & EDGE_DFS_BACK) == 0
-           || ! cond_arg_set_in_bb (path[path.length () - 1], e->dest))
+           || ! cond_arg_set_in_bb (path.last (), e->dest))
          found = thread_around_empty_blocks (taken_edge,
                                              dummy_cond,
                                              handle_dominating_asserts,
@@ -999,7 +998,7 @@ thread_across_edge (gimple dummy_cond,
           record the jump threading opportunity.  */
        if (found)
          {
-           propagate_threaded_block_debug_into (path[path.length () - 1]->dest,
+           propagate_threaded_block_debug_into (path.last ()->dest,
                                                 taken_edge->dest);
            register_jump_thread (path, true);
          }
index 4131128..fd5234c 100644 (file)
@@ -1401,7 +1401,7 @@ register_jump_thread (vec<edge> path, bool through_joiner)
   if (!through_joiner)
     e3 = NULL;
   else
-    e3 = path[path.length () - 1];
+    e3 = path.last ();
 
   /* This can occur if we're jumping to a constant address or
      or something similar.  Just get out now.  */