Commit af33629e by Jeff Law Committed by Jeff Law

tree-ssa-threadedge.c (thread_across_edge): Use foo.last () rather than…

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-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.

From-SVN: r202892
parent ed0d3051
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> 2013-09-25 Richard Biener <rguenther@suse.de>
PR middle-end/58521 PR middle-end/58521
......
...@@ -947,8 +947,7 @@ thread_across_edge (gimple dummy_cond, ...@@ -947,8 +947,7 @@ thread_across_edge (gimple dummy_cond,
} }
remove_temporary_equivalences (stack); remove_temporary_equivalences (stack);
propagate_threaded_block_debug_into (path[path.length () - 1]->dest, propagate_threaded_block_debug_into (path.last ()->dest, e->dest);
e->dest);
register_jump_thread (path, false); register_jump_thread (path, false);
path.release (); path.release ();
return; return;
...@@ -987,7 +986,7 @@ thread_across_edge (gimple dummy_cond, ...@@ -987,7 +986,7 @@ thread_across_edge (gimple dummy_cond,
path.safe_push (taken_edge); path.safe_push (taken_edge);
found = false; found = false;
if ((e->flags & EDGE_DFS_BACK) == 0 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, found = thread_around_empty_blocks (taken_edge,
dummy_cond, dummy_cond,
handle_dominating_asserts, handle_dominating_asserts,
...@@ -999,7 +998,7 @@ thread_across_edge (gimple dummy_cond, ...@@ -999,7 +998,7 @@ thread_across_edge (gimple dummy_cond,
record the jump threading opportunity. */ record the jump threading opportunity. */
if (found) if (found)
{ {
propagate_threaded_block_debug_into (path[path.length () - 1]->dest, propagate_threaded_block_debug_into (path.last ()->dest,
taken_edge->dest); taken_edge->dest);
register_jump_thread (path, true); register_jump_thread (path, true);
} }
......
...@@ -1401,7 +1401,7 @@ register_jump_thread (vec<edge> path, bool through_joiner) ...@@ -1401,7 +1401,7 @@ register_jump_thread (vec<edge> path, bool through_joiner)
if (!through_joiner) if (!through_joiner)
e3 = NULL; e3 = NULL;
else else
e3 = path[path.length () - 1]; e3 = path.last ();
/* This can occur if we're jumping to a constant address or /* This can occur if we're jumping to a constant address or
or something similar. Just get out now. */ or something similar. Just get out now. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment