]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gimple.c (gimple_types_compatible_p_1): Remove redundant type attribute comparisons.
authorRichard Guenther <rguenther@suse.de>
Fri, 13 Jul 2012 08:15:10 +0000 (08:15 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 13 Jul 2012 08:15:10 +0000 (08:15 +0000)
2012-07-13  Richard Guenther  <rguenther@suse.de>

* gimple.c (gimple_types_compatible_p_1): Remove redundant
type attribute comparisons.
(gimple_canonical_types_compatible_p): Likewise.

From-SVN: r189453

gcc/ChangeLog
gcc/gimple.c

index e5637bfb274809d7052ad53521fe8da22ca278e9..1415b3837d4ffd590f803b6aaf2757aa2cc291af 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-13  Richard Guenther  <rguenther@suse.de>
+
+       * gimple.c (gimple_types_compatible_p_1): Remove redundant
+       type attribute comparisons.
+       (gimple_canonical_types_compatible_p): Likewise.
+
 2012-07-12  Hans-Peter Nilsson  <hp@axis.com>
 
        PR rtl-optimization/53176
index 398cb1f93e45ef7b5adcfa12d72892519b66f0d4..b419591d3ec3dea7b0695ff9ebf8438d238c4823 100644 (file)
@@ -3422,10 +3422,6 @@ gimple_types_compatible_p_1 (tree t1, tree t2, type_pair_t p,
        goto different_types;
     }
 
-  /* If their attributes are not the same they can't be the same type.  */
-  if (!attribute_list_equal (TYPE_ATTRIBUTES (t1), TYPE_ATTRIBUTES (t2)))
-    goto different_types;
-
   /* Do type-specific comparisons.  */
   switch (TREE_CODE (t1))
     {
@@ -4449,10 +4445,6 @@ gimple_canonical_types_compatible_p (tree t1, tree t2)
       return true;
     }
 
-  /* If their attributes are not the same they can't be the same type.  */
-  if (!attribute_list_equal (TYPE_ATTRIBUTES (t1), TYPE_ATTRIBUTES (t2)))
-    return false;
-
   /* Do type-specific comparisons.  */
   switch (TREE_CODE (t1))
     {
@@ -4499,13 +4491,6 @@ gimple_canonical_types_compatible_p (tree t1, tree t2)
        }
 
     case METHOD_TYPE:
-      /* Method types should belong to the same class.  */
-      if (!gimple_canonical_types_compatible_p
-            (TYPE_METHOD_BASETYPE (t1), TYPE_METHOD_BASETYPE (t2)))
-       return false;
-
-      /* Fallthru  */
-
     case FUNCTION_TYPE:
       /* Function types are the same if the return type and arguments types
         are the same.  */