Commit 4a0e3b5a by Trevor Saunders Committed by Trevor Saunders

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  <tbsaunde+gcc@tbsaunde.org>

	* 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
parent 8c681247
2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* 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 <tbsaunde+gcc@tbsaunde.org>
* cfgexpand.c (expand_used_vars): Make the type of a local variable auto_vec.
* genmatch.c (lower_for): Likewise.
* haifa-sched.c (haifa_sched_init): Likewise.
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment