aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde@tbsaunde.org>2021-06-06 20:13:38 -0400
committerTrevor Saunders <tbsaunde@tbsaunde.org>2021-06-17 04:43:27 -0400
commita165040e11e340f6b397104f23717ef398408e67 (patch)
tree06fc140b824f43bd1413ecc5d7cd175e056fa9b7 /gcc/tree-ssa-loop-ivcanon.c
parent265af872a1f8d7ffda2c4056d1d80a3ec4fc8650 (diff)
downloadgcc-a165040e11e340f6b397104f23717ef398408e67.zip
gcc-a165040e11e340f6b397104f23717ef398408e67.tar.gz
gcc-a165040e11e340f6b397104f23717ef398408e67.tar.bz2
return auto_vec from get_loop_hot_path
This ensures callers take ownership of the returned vector. Signed-off-by: Trevor Saunders <tbsaunde@tbsaunde.org> gcc/ChangeLog: * cfgloop.h (get_loop_hot_path): Return auto_vec<basic_block>. * cfgloopanal.c (get_loop_hot_path): Likewise. * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 3f9e9d0..b1971f8 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -218,7 +218,7 @@ tree_estimate_loop_size (class loop *loop, edge exit, edge edge_to_cancel,
gimple_stmt_iterator gsi;
unsigned int i;
bool after_exit;
- vec<basic_block> path = get_loop_hot_path (loop);
+ auto_vec<basic_block> path = get_loop_hot_path (loop);
size->overall = 0;
size->eliminated_by_peeling = 0;
@@ -342,7 +342,6 @@ tree_estimate_loop_size (class loop *loop, edge exit, edge edge_to_cancel,
- size->last_iteration_eliminated_by_peeling) > upper_bound)
{
free (body);
- path.release ();
return true;
}
}
@@ -379,7 +378,7 @@ tree_estimate_loop_size (class loop *loop, edge exit, edge edge_to_cancel,
size->num_branches_on_hot_path++;
}
}
- path.release ();
+
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "size: %i-%i, last_iteration: %i-%i\n", size->overall,
size->eliminated_by_peeling, size->last_iteration,