From patchwork Wed Jul 8 23:12:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 493186 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 E26511409A0 for ; Thu, 9 Jul 2015 09:12:19 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=hZio8wYC; 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=mEbHhk8afwIUQ9x1/SEh+kthXDmHHKHu1cszhFczIXrmb3 RUqVmG3ETTrS+/ylsP4G7Zig2TymOArI20cbACPhCKD4+m1yxcvM1xldzdtW0elx SkN1U8z1l4i4DOFhtYb/FHFLH6GAWJA4HM8GjI5n3ED4420gMjvJROHGhI33A= 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=FCfucLkHspATBzGJQ3It930P9KE=; b=hZio8wYCGg6WzEkPsntr B0SIYDRkjLuu742e5GzRXk4RnU7S+x0YpssgvGR0UZmATO4OBPRzLloeVGUYFYCn Hk6aDLxmkRF8YexOW8IeNb9F59ppNnd0HiMiMnVLhJuHNsg+cvYatkI2IWii55Nq bHoXkIcGm47wNyDcjl65g6U= Received: (qmail 20888 invoked by alias); 8 Jul 2015 23:12:11 -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 20879 invoked by uid 89); 8 Jul 2015 23:12:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL, BAYES_50, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no 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; Wed, 08 Jul 2015 23:12:08 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id DA057AEF0E for ; Wed, 8 Jul 2015 23:12:06 +0000 (UTC) Received: from [10.10.58.53] (vpn-58-53.rdu2.redhat.com [10.10.58.53]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t68NC5Z4000742 for ; Wed, 8 Jul 2015 19:12:06 -0400 Message-ID: <559DAE45.9030502@redhat.com> Date: Wed, 08 Jul 2015 19:12:05 -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] Flatten flags.h X-IsSubscribed: yes While looking the initial results of an include reduction, there were a couple of problematic files that are relatively easy to resolve. This patch addresses flags.h. It includes both options.h and flag-types.h. options.h already includes flag-types.h so including both is kind of silly :-). flags.h appears in 421 files... Only 25 of those files don't already include one of options.h, backend.h, or tm.h (which also includes options.h). Those are the only files which needed addressing. This patch removes the 2 includes, and makes adjustments to the other 25 files.. either removing the include completely if not needed, replacing it with options.h if possible, and as a last resort adding options.h to the source file just before flags.h. In the end, only 2 actually required flags.h itself. Bootstraps on x86_64-unknown-linux-gnu, and regressions are currently running. Also successfully built the 2 epiphany targets as there was a config file touched for that target. Assuming the regression run is clean, OK for trunk? Andrew * flags.h: Don't include flag-types.h or options.h. * opts-common.c: Adjust includes. * opts-global.c: Likewise. * common/config/epiphany/epiphany-common.c: Likewise. * c/c-array-notation.c: Adjust includes. * c/c-objc-common.c: Likewise. * c-family/c-common.h: Adjust includes. * c-family/stub-objc.c: Likewise. * fortran/arith.c: Adjust includes. * fortran/array.c: Likewise. * fortran/check.c: Likewise. * fortran/decl.c: Likewise. * fortran/error.c: Likewise. * fortran/expr.c: Likewise. * fortran/frontend-passes.c: Likewise. * fortran/interface.c: Likewise. * fortran/intrinsic.c: Likewise. * fortran/io.c: Likewise. * fortran/match.c: Likewise. * fortran/openmp.c: Likewise. * fortran/parse.c: Likewise. * fortran/primary.c: Likewise. * fortran/resolve.c: Likewise. * fortran/scanner.c: Likewise. * fortran/simplify.c: Likewise. * fortran/symbol.c: Likewise. * fortran/target-memory.c: Likewise. * jit/dummy-frontend.c: Adjust includes. * jit/jit-common.h: Likewise. * jit/jit-playback.c: Likewise. * lto/lto-lang.c: Adjust includes. Index: flags.h =================================================================== *** flags.h (revision 225530) --- flags.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,28 **** #ifndef GCC_FLAGS_H #define GCC_FLAGS_H - #include "flag-types.h" - #include "options.h" - #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS) /* Names of debug_info_type, for error messages. */ --- 20,25 ---- Index: opts-common.c =================================================================== *** opts-common.c (revision 225530) --- opts-common.c (working copy) *************** along with GCC; see the file COPYING3. *** 22,28 **** #include "intl.h" #include "coretypes.h" #include "opts.h" ! #include "flags.h" #include "diagnostic.h" static void prune_options (struct cl_decoded_option **, unsigned int *); --- 22,28 ---- #include "intl.h" #include "coretypes.h" #include "opts.h" ! #include "options.h" #include "diagnostic.h" static void prune_options (struct cl_decoded_option **, unsigned int *); Index: opts-global.c =================================================================== *** opts-global.c (revision 225531) --- opts-global.c (working copy) *************** along with GCC; see the file COPYING3. *** 23,28 **** --- 23,29 ---- #include "coretypes.h" #include "diagnostic.h" #include "opts.h" + #include "options.h" #include "flags.h" #include "alias.h" #include "backend.h" Index: common/config/epiphany/epiphany-common.c =================================================================== *** common/config/epiphany/epiphany-common.c (revision 225530) --- common/config/epiphany/epiphany-common.c (working copy) *************** along with GCC; see the file COPYING3. *** 23,29 **** #include "coretypes.h" #include "common/common-target.h" #include "opts.h" ! #include "flags.h" #define TARGET_OPTION_OPTIMIZATION_TABLE epiphany_option_optimization_table --- 23,29 ---- #include "coretypes.h" #include "common/common-target.h" #include "opts.h" ! #include "options.h" #define TARGET_OPTION_OPTIMIZATION_TABLE epiphany_option_optimization_table Index: c/c-array-notation.c =================================================================== *** c/c-array-notation.c (revision 225531) --- c/c-array-notation.c (working copy) *************** *** 70,76 **** #include "coretypes.h" #include "tree.h" #include "alias.h" - #include "flags.h" #include "c-tree.h" #include "gimple-expr.h" #include "tree-iterator.h" --- 70,75 ---- Index: c/c-objc-common.c =================================================================== *** c/c-objc-common.c (revision 225531) --- c/c-objc-common.c (working copy) *************** along with GCC; see the file COPYING3. *** 22,28 **** #include "coretypes.h" #include "tree.h" #include "alias.h" - #include "flags.h" #include "c-tree.h" #include "intl.h" #include "c-family/c-pretty-print.h" --- 22,27 ---- Index: c-family/c-common.h =================================================================== *** c-family/c-common.h (revision 225531) --- c-family/c-common.h (working copy) *************** along with GCC; see the file COPYING3. *** 23,29 **** #include "splay-tree.h" #include "cpplib.h" #include "alias.h" - #include "flags.h" #include "tree.h" #include "fold-const.h" --- 23,28 ---- Index: c-family/stub-objc.c =================================================================== *** c-family/stub-objc.c (revision 225531) --- c-family/stub-objc.c (working copy) *************** along with GCC; see the file COPYING3. *** 24,30 **** #include "coretypes.h" #include "alias.h" #include "tree.h" - #include "flags.h" #include "c-common.h" #include "c-objc.h" --- 24,29 ---- Index: fortran/arith.c =================================================================== *** fortran/arith.c (revision 225530) --- fortran/arith.c (working copy) *************** along with GCC; see the file COPYING3. *** 26,32 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "arith.h" #include "target-memory.h" --- 26,32 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "arith.h" #include "target-memory.h" Index: fortran/array.c =================================================================== *** fortran/array.c (revision 225530) --- fortran/array.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,26 **** --- 21,27 ---- #include "config.h" #include "system.h" #include "coretypes.h" + #include "options.h" #include "flags.h" #include "gfortran.h" #include "match.h" Index: fortran/check.c =================================================================== *** fortran/check.c (revision 225530) --- fortran/check.c (working copy) *************** along with GCC; see the file COPYING3. *** 28,34 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "intrinsic.h" #include "constructor.h" --- 28,34 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "intrinsic.h" #include "constructor.h" Index: fortran/decl.c =================================================================== *** fortran/decl.c (revision 225531) --- fortran/decl.c (working copy) *************** along with GCC; see the file COPYING3. *** 24,30 **** #include "gfortran.h" #include "match.h" #include "parse.h" ! #include "flags.h" #include "constructor.h" #include "alias.h" #include "tree.h" --- 24,30 ---- #include "gfortran.h" #include "match.h" #include "parse.h" ! #include "options.h" #include "constructor.h" #include "alias.h" #include "tree.h" Index: fortran/error.c =================================================================== *** fortran/error.c (revision 225530) --- fortran/error.c (working copy) *************** along with GCC; see the file COPYING3. *** 27,33 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "diagnostic.h" --- 27,33 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "diagnostic.h" Index: fortran/expr.c =================================================================== *** fortran/expr.c (revision 225530) --- fortran/expr.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "arith.h" #include "match.h" --- 21,27 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "arith.h" #include "match.h" Index: fortran/frontend-passes.c =================================================================== *** fortran/frontend-passes.c (revision 225530) --- fortran/frontend-passes.c (working copy) *************** along with GCC; see the file COPYING3. *** 23,29 **** #include "coretypes.h" #include "gfortran.h" #include "arith.h" ! #include "flags.h" #include "dependency.h" #include "constructor.h" #include "opts.h" --- 23,29 ---- #include "coretypes.h" #include "gfortran.h" #include "arith.h" ! #include "options.h" #include "dependency.h" #include "constructor.h" #include "opts.h" Index: fortran/interface.c =================================================================== *** fortran/interface.c (revision 225530) --- fortran/interface.c (working copy) *************** along with GCC; see the file COPYING3. *** 66,72 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "match.h" #include "arith.h" --- 66,72 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "match.h" #include "arith.h" Index: fortran/intrinsic.c =================================================================== *** fortran/intrinsic.c (revision 225530) --- fortran/intrinsic.c (working copy) *************** along with GCC; see the file COPYING3. *** 22,28 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "intrinsic.h" --- 22,28 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "intrinsic.h" Index: fortran/io.c =================================================================== *** fortran/io.c (revision 225530) --- fortran/io.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "match.h" #include "parse.h" --- 21,27 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "match.h" #include "parse.h" Index: fortran/match.c =================================================================== *** fortran/match.c (revision 225531) --- fortran/match.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,26 **** --- 21,27 ---- #include "config.h" #include "system.h" #include "coretypes.h" + #include "options.h" #include "flags.h" #include "gfortran.h" #include "match.h" Index: fortran/openmp.c =================================================================== *** fortran/openmp.c (revision 225530) --- fortran/openmp.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #include "config.h" #include "system.h" #include "coretypes.h" - #include "flags.h" #include "gfortran.h" #include "arith.h" #include "match.h" --- 21,26 ---- Index: fortran/parse.c =================================================================== *** fortran/parse.c (revision 225530) --- fortran/parse.c (working copy) *************** along with GCC; see the file COPYING3. *** 22,28 **** #include "system.h" #include #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "match.h" #include "parse.h" --- 22,28 ---- #include "system.h" #include #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "match.h" #include "parse.h" Index: fortran/primary.c =================================================================== *** fortran/primary.c (revision 225530) --- fortran/primary.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "arith.h" #include "match.h" --- 21,27 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "arith.h" #include "match.h" Index: fortran/resolve.c =================================================================== *** fortran/resolve.c (revision 225530) --- fortran/resolve.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "obstack.h" #include "bitmap.h" --- 21,27 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "obstack.h" #include "bitmap.h" Index: fortran/scanner.c =================================================================== *** fortran/scanner.c (revision 225530) --- fortran/scanner.c (working copy) *************** along with GCC; see the file COPYING3. *** 46,52 **** #include "gfortran.h" #include "toplev.h" /* For set_src_pwd. */ #include "debug.h" ! #include "flags.h" #include "cpp.h" #include "scanner.h" --- 46,52 ---- #include "gfortran.h" #include "toplev.h" /* For set_src_pwd. */ #include "debug.h" ! #include "options.h" #include "cpp.h" #include "scanner.h" Index: fortran/simplify.c =================================================================== *** fortran/simplify.c (revision 225530) --- fortran/simplify.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #include "config.h" #include "system.h" #include "coretypes.h" - #include "flags.h" #include "gfortran.h" #include "arith.h" #include "intrinsic.h" --- 21,26 ---- Index: fortran/symbol.c =================================================================== *** fortran/symbol.c (revision 225530) --- fortran/symbol.c (working copy) *************** along with GCC; see the file COPYING3. *** 22,28 **** #include "config.h" #include "system.h" #include "coretypes.h" ! #include "flags.h" #include "gfortran.h" #include "parse.h" #include "match.h" --- 22,28 ---- #include "config.h" #include "system.h" #include "coretypes.h" ! #include "options.h" #include "gfortran.h" #include "parse.h" #include "match.h" Index: fortran/target-memory.c =================================================================== *** fortran/target-memory.c (revision 225531) --- fortran/target-memory.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #include "config.h" #include "system.h" #include "coretypes.h" - #include "flags.h" #include "alias.h" #include "tree.h" #include "fold-const.h" --- 21,26 ---- Index: jit/dummy-frontend.c =================================================================== *** jit/dummy-frontend.c (revision 225531) --- jit/dummy-frontend.c (working copy) *************** along with GCC; see the file COPYING3. *** 22,28 **** #include "coretypes.h" #include "opts.h" #include "alias.h" - #include "flags.h" #include "tree.h" #include "stor-layout.h" #include "inchash.h" --- 22,27 ---- Index: jit/jit-common.h =================================================================== *** jit/jit-common.h (revision 225531) --- jit/jit-common.h (working copy) *************** along with GCC; see the file COPYING3. *** 24,30 **** #include "libgccjit.h" #include "vec.h" - #include "flags.h" #include "tree.h" #include "inchash.h" #include "tree-iterator.h" --- 24,29 ---- Index: jit/jit-playback.c =================================================================== *** jit/jit-playback.c (revision 225531) --- jit/jit-playback.c (working copy) *************** along with GCC; see the file COPYING3. *** 26,32 **** #include "statistics.h" #include "vec.h" #include "alias.h" - #include "flags.h" #include "tree.h" #include "inchash.h" #include "hash-map.h" --- 26,31 ---- Index: lto/lto-lang.c =================================================================== *** lto/lto-lang.c (revision 225531) --- lto/lto-lang.c (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #include "config.h" #include "system.h" #include "coretypes.h" - #include "flags.h" #include "tm.h" #include "function.h" #include "predict.h" --- 21,26 ----