remove unnecessary calls to vec::release
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>
Wed, 13 Jul 2016 02:44:59 +0000 (02:44 +0000)
committerTrevor Saunders <tbsaunde@gcc.gnu.org>
Wed, 13 Jul 2016 02:44:59 +0000 (02:44 +0000)
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

gcc/ChangeLog
gcc/tree-data-ref.c
gcc/tree-ssa-alias.c
gcc/tree-vect-stmts.c

index 3a1fc40628a9da297a436cdaad8a47bd82a0a9da..db920bd90a4109385864059c2bae9f66f5c8b6e8 100644 (file)
@@ -1,3 +1,11 @@
+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.
index 44d5db0026d3010005f6f61f3f44c933a5f94401..337d278790a2b3e6ddffd0ffc539fbdd0672ebde 100644 (file)
@@ -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;
 }
 
index 70c24b59446313b7a001f0ca32ab6f1504d8181d..8051a669b37ab79b240d62f364711fa11e20b275 100644 (file)
@@ -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;
 }
 
index 87684f1e2491ccd879932c1b38fa57bb944bbf26..ce5536c69276962bd8bd426f9e032c04e472bd78 100644 (file)
@@ -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
             {