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
This commit is contained in:
parent
ed0d30514f
commit
af33629e0a
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user