From patchwork Thu Sep 3 05:26:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tbsaunde+gcc@tbsaunde.org X-Patchwork-Id: 513830 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8BD90140273 for ; Thu, 3 Sep 2015 15:27:12 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=OaGp2yPE; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=gh6PBzP8i2Nz6t7S8KmAh869CnvY9PtQ1MpX/cguo5aElnhcwxSHX h29dsNcYHQWgXyJr2DvASQxsDxzj48yVhy4qmSOAVRRjCb6U2DU5AJzLZt6zn2ZN KT0mboWwUmfBtnNoPwNbaiENjkL655s7eF5DlkptYrPxEfCd2SfkC0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:in-reply-to:references; s=default; bh=8xTzcgHCsZ0t+cPGzfWMQyJG96Q=; b=OaGp2yPEbkwuFhrFnN/zff61uyHx E4Y5AvpM0loYOtNsTv1vqQGbHn242WIG3MjmjulrX4LvaJpH8SRNGfMIatupV3ea J4dVkF3PvdO9uad2rY9nyloKXdXAsHPAO0mVqCXgY8G5G6nFKaiDcX3qsbDTuHMw +1h5jPSDx4X4Kww= Received: (qmail 90019 invoked by alias); 3 Sep 2015 05:26:54 -0000 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 Received: (qmail 89985 invoked by uid 89); 3 Sep 2015 05:26:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 03 Sep 2015 05:26:51 +0000 Received: from iceball.corp.tor1.mozilla.com (unknown [66.207.208.102]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 3A15EC07C for ; Thu, 3 Sep 2015 05:26:50 +0000 (UTC) From: tbsaunde+gcc@tbsaunde.org To: gcc-patches@gcc.gnu.org Subject: [PATCH 01/10] don't typedef alias_set_entry and unhide pointerness Date: Thu, 3 Sep 2015 01:26:37 -0400 Message-Id: <1441258006-10575-2-git-send-email-tbsaunde+gcc@tbsaunde.org> In-Reply-To: <1441258006-10575-1-git-send-email-tbsaunde+gcc@tbsaunde.org> References: <1441258006-10575-1-git-send-email-tbsaunde+gcc@tbsaunde.org> X-IsSubscribed: yes From: Trevor Saunders gcc/ChangeLog: 2015-09-02 Trevor Saunders * alias.c (alias_set_entry_d): Rename to alias_set_entry. (alias_set_entry): Remove typedef. (alias_set_subset_of): Adjust. (alias_sets_conflict_p): Likewise. (init_alias_set_entry): Likewise. (get_alias_set): Likewise. (new_alias_set): Likewise. (record_alias_subset): Likewise. --- gcc/alias.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/gcc/alias.c b/gcc/alias.c index 4681e3f..a0e8616 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -134,7 +134,7 @@ along with GCC; see the file COPYING3. If not see struct alias_set_hash : int_hash {}; -struct GTY(()) alias_set_entry_d { +struct GTY(()) alias_set_entry { /* The alias set number, as stored in MEM_ALIAS_SET. */ alias_set_type alias_set; @@ -158,7 +158,6 @@ struct GTY(()) alias_set_entry_d { /* Nonzero if is_pointer or if one of childs have has_pointer set. */ bool has_pointer; }; -typedef struct alias_set_entry_d *alias_set_entry; static int rtx_equal_for_memref_p (const_rtx, const_rtx); static int memrefs_conflict_p (int, rtx, int, rtx, HOST_WIDE_INT); @@ -167,7 +166,7 @@ static int base_alias_check (rtx, rtx, rtx, rtx, machine_mode, machine_mode); static rtx find_base_value (rtx); static int mems_in_disjoint_alias_sets_p (const_rtx, const_rtx); -static alias_set_entry get_alias_set_entry (alias_set_type); +static alias_set_entry *get_alias_set_entry (alias_set_type); static tree decl_for_component_ref (tree); static int write_dependence_p (const_rtx, const_rtx, machine_mode, rtx, @@ -288,7 +287,7 @@ static bool copying_arguments; /* The splay-tree used to store the various alias set entries. */ -static GTY (()) vec *alias_sets; +static GTY (()) vec *alias_sets; /* Build a decomposed reference object for querying the alias-oracle from the MEM rtx and store it in *REF. @@ -395,7 +394,7 @@ rtx_refs_may_alias_p (const_rtx x, const_rtx mem, bool tbaa_p) /* Returns a pointer to the alias set entry for ALIAS_SET, if there is such an entry, or NULL otherwise. */ -static inline alias_set_entry +static inline alias_set_entry * get_alias_set_entry (alias_set_type alias_set) { return (*alias_sets)[alias_set]; @@ -417,7 +416,7 @@ mems_in_disjoint_alias_sets_p (const_rtx mem1, const_rtx mem2) bool alias_set_subset_of (alias_set_type set1, alias_set_type set2) { - alias_set_entry ase2; + alias_set_entry *ase2; /* Everything is a subset of the "aliases everything" set. */ if (set2 == 0) @@ -453,7 +452,7 @@ alias_set_subset_of (alias_set_type set1, alias_set_type set2) get_alias_set for more details. */ if (ase2 && ase2->has_pointer) { - alias_set_entry ase1 = get_alias_set_entry (set1); + alias_set_entry *ase1 = get_alias_set_entry (set1); if (ase1 && ase1->is_pointer) { @@ -477,8 +476,8 @@ alias_set_subset_of (alias_set_type set1, alias_set_type set2) int alias_sets_conflict_p (alias_set_type set1, alias_set_type set2) { - alias_set_entry ase1; - alias_set_entry ase2; + alias_set_entry *ase1; + alias_set_entry *ase2; /* The easy case. */ if (alias_sets_must_conflict_p (set1, set2)) @@ -808,10 +807,10 @@ alias_ptr_types_compatible_p (tree t1, tree t2) /* Create emptry alias set entry. */ -alias_set_entry +alias_set_entry * init_alias_set_entry (alias_set_type set) { - alias_set_entry ase = ggc_alloc (); + alias_set_entry *ase = ggc_alloc (); ase->alias_set = set; ase->children = NULL; ase->has_zero_child = false; @@ -1057,7 +1056,7 @@ get_alias_set (tree t) /* We treat pointer types specially in alias_set_subset_of. */ if (POINTER_TYPE_P (t) && set) { - alias_set_entry ase = get_alias_set_entry (set); + alias_set_entry *ase = get_alias_set_entry (set); if (!ase) ase = init_alias_set_entry (set); ase->is_pointer = true; @@ -1075,8 +1074,8 @@ new_alias_set (void) if (flag_strict_aliasing) { if (alias_sets == 0) - vec_safe_push (alias_sets, (alias_set_entry) 0); - vec_safe_push (alias_sets, (alias_set_entry) 0); + vec_safe_push (alias_sets, (alias_set_entry *) NULL); + vec_safe_push (alias_sets, (alias_set_entry *) NULL); return alias_sets->length () - 1; } else @@ -1099,8 +1098,8 @@ new_alias_set (void) void record_alias_subset (alias_set_type superset, alias_set_type subset) { - alias_set_entry superset_entry; - alias_set_entry subset_entry; + alias_set_entry *superset_entry; + alias_set_entry *subset_entry; /* It is possible in complex type situations for both sets to be the same, in which case we can ignore this operation. */