diff options
author | Trevor Saunders <tbsaunde+gcc@tbsaunde.org> | 2017-05-14 00:39:23 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2017-05-14 00:39:23 +0000 |
commit | 6fa95e0961bc15efa5ff52fc7358aee78a16a33c (patch) | |
tree | cb4fb40255dee04a4d085d4a1614b8d8b295cd27 /gcc/cfganal.c | |
parent | 35bfaf4d537dbf181575c9568a54da33d45a30ad (diff) | |
download | gcc-6fa95e0961bc15efa5ff52fc7358aee78a16a33c.zip gcc-6fa95e0961bc15efa5ff52fc7358aee78a16a33c.tar.gz gcc-6fa95e0961bc15efa5ff52fc7358aee78a16a33c.tar.bz2 |
make inverted_post_order_compute() operate on a vec
gcc/ChangeLog:
2017-05-13 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* cfganal.c (inverted_post_order_compute): Change argument type
to vec *.
* cfganal.h (inverted_post_order_compute): Adjust prototype.
* df-core.c (rest_of_handle_df_initialize): Adjust.
(rest_of_handle_df_finish): Likewise.
(df_analyze_1): Likewise.
(df_analyze): Likewise.
(loop_inverted_post_order_compute): Change argument to be a vec *.
(df_analyze_loop): Adjust.
(df_get_n_blocks): Likewise.
(df_get_postorder): Likewise.
* df.h (struct df_d): Change field to be a vec.
* lcm.c (compute_laterin): Adjust.
(compute_available): Likewise.
* lra-lives.c (lra_create_live_ranges_1): Likewise.
* tree-ssa-dce.c (remove_dead_stmt): Likewise.
* tree-ssa-pre.c (compute_antic): Likewise.
From-SVN: r248027
Diffstat (limited to 'gcc/cfganal.c')
-rw-r--r-- | gcc/cfganal.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/cfganal.c b/gcc/cfganal.c index 27b453c..a3a6ea8 100644 --- a/gcc/cfganal.c +++ b/gcc/cfganal.c @@ -790,12 +790,12 @@ dfs_find_deadend (basic_block bb) and start looking for a "dead end" from that block and do another inverted traversal from that block. */ -int -inverted_post_order_compute (int *post_order, +void +inverted_post_order_compute (vec<int> *post_order, sbitmap *start_points) { basic_block bb; - int post_order_num = 0; + post_order->reserve_exact (n_basic_blocks_for_fn (cfun)); if (flag_checking) verify_no_unreachable_blocks (); @@ -863,13 +863,13 @@ inverted_post_order_compute (int *post_order, time, check its predecessors. */ stack.quick_push (ei_start (pred->preds)); else - post_order[post_order_num++] = pred->index; + post_order->quick_push (pred->index); } else { if (bb != EXIT_BLOCK_PTR_FOR_FN (cfun) && ei_one_before_end_p (ei)) - post_order[post_order_num++] = bb->index; + post_order->quick_push (bb->index); if (!ei_one_before_end_p (ei)) ei_next (&stack.last ()); @@ -927,9 +927,7 @@ inverted_post_order_compute (int *post_order, while (!stack.is_empty ()); /* EXIT_BLOCK is always included. */ - post_order[post_order_num++] = EXIT_BLOCK; - - return post_order_num; + post_order->quick_push (EXIT_BLOCK); } /* Compute the depth first search order of FN and store in the array |