From patchwork Thu Jul 22 19:34:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 59634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 22B741007D1 for ; Fri, 23 Jul 2010 05:34:12 +1000 (EST) Received: (qmail 13137 invoked by alias); 22 Jul 2010 19:34:10 -0000 Received: (qmail 13124 invoked by uid 22791); 22 Jul 2010 19:34:08 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Jul 2010 19:34:04 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 24DE8CB024B for ; Thu, 22 Jul 2010 21:33:59 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bG4N77mVHqt0 for ; Thu, 22 Jul 2010 21:33:59 +0200 (CEST) Received: from adijon-256-1-138-85.w90-13.abo.wanadoo.fr (ADijon-256-1-138-85.w90-13.abo.wanadoo.fr [90.13.25.85]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id F29BECB01D4 for ; Thu, 22 Jul 2010 21:33:58 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Fix formatting issues in get_alias_set Date: Thu, 22 Jul 2010 21:34:05 +0200 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201007222134.05189.ebotcazou@adacore.com> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Tested on x86-64-suse-linux, applied on the mainline as obvious. 2010-07-22 Eric Botcazou * alias.c (get_alias_set): Fix formatting issues. Index: alias.c =================================================================== --- alias.c (revision 162313) +++ alias.c (working copy) @@ -688,9 +688,9 @@ get_alias_set (tree t) conversion embedded treat it like a VIEW_CONVERT_EXPR above, using the memory access type for determining the alias-set. */ if (TREE_CODE (inner) == MEM_REF - && (TYPE_MAIN_VARIANT (TREE_TYPE (inner)) - != TYPE_MAIN_VARIANT - (TREE_TYPE (TREE_TYPE (TREE_OPERAND (inner, 1)))))) + && TYPE_MAIN_VARIANT (TREE_TYPE (inner)) + != TYPE_MAIN_VARIANT + (TREE_TYPE (TREE_TYPE (TREE_OPERAND (inner, 1))))) return get_deref_alias_set (TREE_OPERAND (inner, 1)); /* Otherwise, pick up the outermost object that we could have a pointer @@ -728,10 +728,13 @@ get_alias_set (tree t) return set; return 0; } + t = TYPE_CANONICAL (t); + /* Canonical types shouldn't form a tree nor should the canonical type require structural equality checks. */ - gcc_checking_assert (!TYPE_STRUCTURAL_EQUALITY_P (t) && TYPE_CANONICAL (t) == t); + gcc_checking_assert (TYPE_CANONICAL (t) == t + && !TYPE_STRUCTURAL_EQUALITY_P (t)); /* If this is a type with a known alias set, return it. */ if (TYPE_ALIAS_SET_KNOWN_P (t)) @@ -757,8 +760,7 @@ get_alias_set (tree t) /* There are no objects of FUNCTION_TYPE, so there's no point in using up an alias set for them. (There are, of course, pointers and references to functions, but that's different.) */ - else if (TREE_CODE (t) == FUNCTION_TYPE - || TREE_CODE (t) == METHOD_TYPE) + else if (TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE) set = 0; /* Unless the language specifies otherwise, let vector types alias @@ -776,18 +778,17 @@ get_alias_set (tree t) integer(kind=4)[4] the same alias set or not. Just be pragmatic here and make sure the array and its element type get the same alias set assigned. */ - else if (TREE_CODE (t) == ARRAY_TYPE - && !TYPE_NONALIASED_COMPONENT (t)) + else if (TREE_CODE (t) == ARRAY_TYPE && !TYPE_NONALIASED_COMPONENT (t)) set = get_alias_set (TREE_TYPE (t)); + /* Otherwise make a new alias set for this type. */ else - /* Otherwise make a new alias set for this type. */ set = new_alias_set (); TYPE_ALIAS_SET (t) = set; - /* If this is an aggregate type, we must record any component aliasing - information. */ + /* If this is an aggregate type or a complex type, we must record any + component aliasing information. */ if (AGGREGATE_TYPE_P (t) || TREE_CODE (t) == COMPLEX_TYPE) record_component_aliases (t);