aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJørgen Kvalsvik <j@lambda.is>2024-06-28 08:35:31 +0200
committerJørgen Kvalsvik <j@lambda.is>2024-06-28 15:36:06 +0200
commit86451e10f6e3bad0c719a9e30f1d9dea36819025 (patch)
tree441c042fe60331132e3def07a552c753917b591f
parentff6e8b7f09712bd7ddfcd2830b286421f23abef9 (diff)
downloadgcc-86451e10f6e3bad0c719a9e30f1d9dea36819025.zip
gcc-86451e10f6e3bad0c719a9e30f1d9dea36819025.tar.gz
gcc-86451e10f6e3bad0c719a9e30f1d9dea36819025.tar.bz2
Use move-aware auto_vec in map
Using auto_vec rather than vec for means the vectors are release automatically upon return, to stop the leak. The problem seems is that auto_vec<T, N> is not really move-aware, only the <T, 0> specialization is. gcc/ChangeLog: * tree-profile.cc (find_conditions): Use auto_vec without embedded storage.
-rw-r--r--gcc/tree-profile.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc
index 8c99458..153c932 100644
--- a/gcc/tree-profile.cc
+++ b/gcc/tree-profile.cc
@@ -876,7 +876,7 @@ find_conditions (struct function *fn)
make_top_index (fnblocks, ctx.B1, ctx.top_index);
/* Bin the Boolean expressions so that exprs[id] -> [x1, x2, ...]. */
- hash_map<int_hash<unsigned, 0>, auto_vec<basic_block, 8>> exprs;
+ hash_map<int_hash<unsigned, 0>, auto_vec<basic_block>> exprs;
for (basic_block b : fnblocks)
{
const unsigned uid = condition_uid (fn, b);