]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use auto_vec for memory release on return
authorJørgen Kvalsvik <j@lambda.is>
Mon, 24 Jun 2024 19:55:46 +0000 (21:55 +0200)
committerJørgen Kvalsvik <j@lambda.is>
Wed, 26 Jun 2024 10:18:47 +0000 (12:18 +0200)
Using auto_vec ensure this memory is cleaned up on function exit.

gcc/ChangeLog:

* tree-profile.cc (find_conditions): Use auto_vec.

gcc/tree-profile.cc

index e4bb689cef589e4c7a26a3b6cb3c793dfa9ab5c0..8c9945847ca46d8303aa471b499490987a87b209 100644 (file)
@@ -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>, vec<basic_block>> exprs;
+    hash_map<int_hash<unsigned, 0>, auto_vec<basic_block, 8>> exprs;
     for (basic_block b : fnblocks)
     {
        const unsigned uid = condition_uid (fn, b);