diff options
author | Jeff Law <law@redhat.com> | 2013-09-25 09:33:34 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2013-09-25 09:33:34 -0600 |
commit | af33629e0a154de55f8b5c4459d9e09eee403b71 (patch) | |
tree | 1dfdaa7e4acd2b6fce294316b85339816660856f | |
parent | ed0d30514f77227b7d1d89c855f9791db102180e (diff) | |
download | gcc-af33629e0a154de55f8b5c4459d9e09eee403b71.zip gcc-af33629e0a154de55f8b5c4459d9e09eee403b71.tar.gz gcc-af33629e0a154de55f8b5c4459d9e09eee403b71.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-threadedge.c | 7 | ||||
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdca495..b6b751b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index 47db280..2ca56342 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -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); } diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 4131128..fd5234c 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -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. */ |