From: Trevor Saunders Date: Wed, 13 Jul 2016 02:44:59 +0000 (+0000) Subject: remove unnecessary calls to vec::release X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a0e3b5ac35c0f2b2b7b93aee81ddb10a45ff6d3;p=gcc.git remove unnecessary calls to vec::release There's no point in calling release () on an auto_vec just before it goes out of scope. gcc/ChangeLog: 2016-07-12 Trevor Saunders * tree-data-ref.c (find_data_references_in_stmt): Remove unnecessary call to vec::release. (graphite_find_data_references_in_stmt): Likewise. * tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Likewise. * tree-vect-stmts.c (vectorizable_condition): Likewise. From-SVN: r238286 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a1fc40628a..db920bd90a4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-07-12 Trevor Saunders + + * tree-data-ref.c (find_data_references_in_stmt): Remove + unnecessary call to vec::release. + (graphite_find_data_references_in_stmt): Likewise. + * tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Likewise. + * tree-vect-stmts.c (vectorizable_condition): Likewise. + 2016-07-12 Trevor Saunders * cfgexpand.c (expand_used_vars): Make the type of a local variable auto_vec. diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 44d5db0026d..337d278790a 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -3999,7 +3999,7 @@ find_data_references_in_stmt (struct loop *nest, gimple *stmt, gcc_assert (dr != NULL); datarefs->safe_push (dr); } - references.release (); + return ret; } @@ -4029,7 +4029,6 @@ graphite_find_data_references_in_stmt (loop_p nest, loop_p loop, gimple *stmt, datarefs->safe_push (dr); } - references.release (); return ret; } diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 70c24b59446..8051a669b37 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -865,7 +865,7 @@ nonoverlapping_component_refs_of_decl_p (tree ref1, tree ref2) if (TREE_CODE (ref1) == MEM_REF) { if (!integer_zerop (TREE_OPERAND (ref1, 1))) - goto may_overlap; + return false; ref1 = TREE_OPERAND (TREE_OPERAND (ref1, 0), 0); } @@ -878,7 +878,7 @@ nonoverlapping_component_refs_of_decl_p (tree ref1, tree ref2) if (TREE_CODE (ref2) == MEM_REF) { if (!integer_zerop (TREE_OPERAND (ref2, 1))) - goto may_overlap; + return false; ref2 = TREE_OPERAND (TREE_OPERAND (ref2, 0), 0); } @@ -898,7 +898,7 @@ nonoverlapping_component_refs_of_decl_p (tree ref1, tree ref2) do { if (component_refs1.is_empty ()) - goto may_overlap; + return false; ref1 = component_refs1.pop (); } while (!RECORD_OR_UNION_TYPE_P (TREE_TYPE (TREE_OPERAND (ref1, 0)))); @@ -906,7 +906,7 @@ nonoverlapping_component_refs_of_decl_p (tree ref1, tree ref2) do { if (component_refs2.is_empty ()) - goto may_overlap; + return false; ref2 = component_refs2.pop (); } while (!RECORD_OR_UNION_TYPE_P (TREE_TYPE (TREE_OPERAND (ref2, 0)))); @@ -914,7 +914,7 @@ nonoverlapping_component_refs_of_decl_p (tree ref1, tree ref2) /* Beware of BIT_FIELD_REF. */ if (TREE_CODE (ref1) != COMPONENT_REF || TREE_CODE (ref2) != COMPONENT_REF) - goto may_overlap; + return false; tree field1 = TREE_OPERAND (ref1, 1); tree field2 = TREE_OPERAND (ref2, 1); @@ -927,12 +927,10 @@ nonoverlapping_component_refs_of_decl_p (tree ref1, tree ref2) /* We cannot disambiguate fields in a union or qualified union. */ if (type1 != type2 || TREE_CODE (type1) != RECORD_TYPE) - goto may_overlap; + return false; if (field1 != field2) { - component_refs1.release (); - component_refs2.release (); /* A field and its representative need to be considered the same. */ if (DECL_BIT_FIELD_REPRESENTATIVE (field1) == field2 @@ -946,9 +944,6 @@ nonoverlapping_component_refs_of_decl_p (tree ref1, tree ref2) } } -may_overlap: - component_refs1.release (); - component_refs2.release (); return false; } diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 87684f1e249..ce5536c6927 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -7686,9 +7686,6 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi, if (!masked) vec_oprnds1 = vec_defs.pop (); vec_oprnds0 = vec_defs.pop (); - - ops.release (); - vec_defs.release (); } else {