From patchwork Thu Jun 25 13:19:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 488451 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 E3F491402DE for ; Thu, 25 Jun 2015 23:19:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=YXfqDiME; 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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=kGeYpidKav9VQs641JQNh+MSzEGlCOhI1sdBXH7jIU0vhB +Rb1QTJIuEHIBuVT8Dz9VxfzzNUXPNF4Uetf2SC7euOQtrF3DNZPtjIpgW3vqtrC GDd45xbkBnG+eFzC4Ml7+UG7nBklpUT2cI0JQ6pHQFbsLBVNfDVBzgECeRsXU= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=5jbMTR6wAdf7CFd4S8t4ZMLRDgI=; b=YXfqDiMEUt1ZKb0t6PyR nqzDUcWBv+ca5jzaLNMmS5CYRDDeH5+n68kn8NQLCu00/eKlxnyJI9hYDjZhvfMP MY1Jr1l+lGWSGSl/2kp+AbS7KdGWiGkV28jef1DyLWDXn2bbh93HZ+fW+8qxMo29 xJUhM1sUmhndqZ01jOPincQ= Received: (qmail 86119 invoked by alias); 25 Jun 2015 13:19:28 -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 86109 invoked by uid 89); 25 Jun 2015 13:19:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 25 Jun 2015 13:19:26 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 41C7C376B93 for ; Thu, 25 Jun 2015 13:19:25 +0000 (UTC) Received: from [10.10.51.143] (unused [10.10.51.143] (may be forged)) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5PDJOKr012895 for ; Thu, 25 Jun 2015 09:19:24 -0400 Message-ID: <558BFFDC.5070701@redhat.com> Date: Thu, 25 Jun 2015 09:19:24 -0400 From: Andrew MacLeod User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: gcc-patches Subject: [patch 1/4] Reduce alias.h dependencies X-IsSubscribed: yes This patch moves the alias_set_type typedef from alias.h into coretypes. Many common header files depend on the type, such as (but not limited to) gimple.h tree_ssa_alias.h rtl.h tree_core.h emit_rtl.h asan.h langhooks.h A fully flattened branch requires alias.h in 294 source files in libbackend.a. By moving that typedef into coretypes, the need for alias.h is reduced to just 27 files, all of which need the prototypes. I removed alias.h from from a couple of header files which no longer need it. I wont remove it from all the source files until I am slightly further along and do a mass reduction of includes. Bootstraps on x86_64-unknown-linux-gnu with no new regressions. Also builds stage 1 on all the targets in config-list.mk. OK for trunk? Andrew * alias.h (alias_set_type): Move typedef. * coretypes.h (alias_set_type): Relocate typedef here. * rtl.h: Don't include alias.h. * jit/jit-common.h: Likewise Index: alias.h =================================================================== *** alias.h (revision 224602) --- alias.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,33 **** #ifndef GCC_ALIAS_H #define GCC_ALIAS_H - /* The type of an alias set. Code currently assumes that variables of - this type can take the values 0 (the alias set which aliases - everything) and -1 (sometimes indicating that the alias set is - unknown, sometimes indicating a memory barrier) and -2 (indicating - that the alias set should be set to a unique value but has not been - set yet). */ - typedef int alias_set_type; - extern alias_set_type new_alias_set (void); extern alias_set_type get_alias_set (tree); extern alias_set_type get_deref_alias_set (tree); --- 20,25 ---- Index: coretypes.h =================================================================== *** coretypes.h (revision 224602) --- coretypes.h (working copy) *************** enum var_init_status *** 210,215 **** --- 210,222 ---- VAR_INIT_STATUS_INITIALIZED }; + /* The type of an alias set. Code currently assumes that variables of + this type can take the values 0 (the alias set which aliases + everything) and -1 (sometimes indicating that the alias set is + unknown, sometimes indicating a memory barrier) and -2 (indicating + that the alias set should be set to a unique value but has not been + set yet). */ + typedef int alias_set_type; struct edge_def; typedef struct edge_def *edge; Index: rtl.h =================================================================== *** rtl.h (revision 224602) --- rtl.h (working copy) *************** along with GCC; see the file COPYING3. *** 38,44 **** #include "is-a.h" #endif /* GENERATOR_FILE */ - #include "alias.h" #include "flags.h" /* Value used by some passes to "recognize" noop moves as valid --- 38,43 ---- Index: jit/jit-common.h =================================================================== *** jit/jit-common.h (revision 224602) --- jit/jit-common.h (working copy) *************** along with GCC; see the file COPYING3. *** 24,30 **** #include "libgccjit.h" #include "vec.h" - #include "alias.h" #include "flags.h" #include "symtab.h" #include "inchash.h" --- 24,29 ----