* [patch 0/9] Flattening and initial module rebuilding @ 2015-07-07 13:40 Andrew MacLeod 2015-07-07 13:43 ` [patch 1/9] header additions and aggregators Andrew MacLeod ` (9 more replies) 0 siblings, 10 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:40 UTC (permalink / raw) To: gcc-patches This is a series of 9 patches which does some flattening, some module building, and some basic cleanups. I am presenting them as 9 patches for easier review. The latter couple of patches affect a lot of the same files that follow on patches then adjust, I've decided NOT to put the automated changes in with each of those patches. There are 8 patches showing the key changes, and then the 9th patch is an aggregate of the first 8 key changes, plus the final result of the impact on all the source files. This is the only patch I'd like to commit. The automated tools which generate the source changes have been significantly enhanced. When a header is flattened, the source file is checked for the existence of the headers which need moving, and any which are already present are left if they are in the right order. Any duplicate are also removed. A similar process is used when an aggregation file like backend.h or ssa.h is processed. Any occurrences of the aggregated headers are removed from the source file so there are no duplicates. The aggregated headers are typically only placed in a source file if 3 or more of the headers would be replaced. (ie, if only bitmap.h is included, I don't just blindly put backend.h in the file.) This number came from analysis of a fully flattened and include-reduced tree, and seemed to be the sweet spot. With the aggregation and flattening, the order of some includes can get shifted around with other files in between, so the tools also ensure there is a "blessed" order which will make sure than any pre-reqs are always available. Right now, its primarily: config.h system.h coretypes.h backend.h tree.h gimple.h rtl.h df.h ssa.h And if any of the aggregators are not present, then any headers which make up the aggregator are in the same relative position. The tools actually produced all these patches with no tweaking to solve compilation failures.. which was very helpful. The old ones needed some guidance and were a bit finicky. I can adjust any of this quite easily, or present them in a different way if you don't like it this way. Again, my goal is to check in just the final patch which does all the work of first 8 patches. It would be a lot less turmoil on the branch. I can do it in smaller chunks if need be. Andrew ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 1/9] header additions and aggregators 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod @ 2015-07-07 13:43 ` Andrew MacLeod 2015-07-07 13:44 ` [patch 2/9] flatten regset.h Andrew MacLeod ` (8 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:43 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 2452 bytes --] This patch implements most of the core concepts described in my previous email (https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01846.html) It goes into detail of the analysis which resulted in this layout. Most of the unnecessary prerequisites have been removed, so we can start introducing back some of the required files. The changes in this patch: * symtab.h is required for tree-core.h to compile, so include it. * rtl.h does not require flagfs.h, but it does need hard-reg-set.h, and it turns out that any build files which need rtl.h actually have hard-reg-set.h available... so we can simply include it there. Furthermore, now that hard-reg-set.h is being included, all the conditional compilation code on HARD_CONST can also be removed. This removes a subtle ordering that you needed to make sure hard-reg-set.h was included before rtl.h, or certain routines didn't appear to be available. * regs.h includes both hard-reg-set.h and rtl.h. Turns out 153 of the 155 files which include regs.h also included rtl.h already... so simple remove the includes. * cfg.h requires dominance to compile, so include it. * gimple.h requires tree-ssa-alias.h and gimple-expr.h to compile, so include them * introduce backend.h which includes the files most frequently required by libbackend.a objects. they are tm.h, function.h, bitmap.h, sbitmap.h, predict.h, basic-block.h, and cfg.h gimple-ssa.h does not need tree-hasher.h., so remove it. * Introduce ssa.h as an aggregator for commonly needs ssa files. I originally thought I could use tree-ssa-operands.h, but alas, there are ordering issues where many of the headers require the contents of tree-ssa-operands.h. So I'd either have to put all these includes at the bottom of the file, or create a new file. I think a new file is a better solution. This patch actually compiles as is, but there are a number of followup manipulations in the final source update. For each source file, any includes which occur in one of these files are removed, avoiding duplicates. In the case of backend.h and ssa.h, any backend file which used 3 or more of the aggregated includes are replaced with the aggregator. Further aggregations may be done for front end and other components after the include reduction is eventually performed. Bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. Andrew [-- Attachment #2: 1-module.patch --] [-- Type: text/x-patch, Size: 7859 bytes --] * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. Index: tree-core.h =================================================================== *** tree-core.h (revision 224988) --- tree-core.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,25 **** --- 20,27 ---- #ifndef GCC_TREE_CORE_H #define GCC_TREE_CORE_H + #include "symtab.h" + /* This file contains all the data structures that define the 'tree' type. There are no accessor macros nor functions in this file. Only the basic data structures, extern declarations and type definitions. */ Index: rtl.h =================================================================== *** rtl.h (revision 224988) --- rtl.h (working copy) *************** along with GCC; see the file COPYING3. *** 38,44 **** #include "is-a.h" #endif /* GENERATOR_FILE */ ! #include "flags.h" /* Value used by some passes to "recognize" noop moves as valid instructions. */ --- 38,44 ---- #include "is-a.h" #endif /* GENERATOR_FILE */ ! #include "hard-reg-set.h" /* Value used by some passes to "recognize" noop moves as valid instructions. */ *************** extern bool val_signbit_known_clear_p (m *** 2880,2888 **** /* In reginfo.c */ extern machine_mode choose_hard_reg_mode (unsigned int, unsigned int, bool); - #ifdef HARD_CONST extern const HARD_REG_SET &simplifiable_subregs (const subreg_shape &); - #endif /* In emit-rtl.c */ extern rtx set_for_reg_notes (rtx); --- 2880,2886 ---- *************** extern int reg_overlap_mentioned_p (cons *** 2939,2948 **** extern const_rtx set_of (const_rtx, const_rtx); extern void record_hard_reg_sets (rtx, const_rtx, void *); extern void record_hard_reg_uses (rtx *, void *); - #ifdef HARD_CONST extern void find_all_hard_regs (const_rtx, HARD_REG_SET *); extern void find_all_hard_reg_sets (const rtx_insn *, HARD_REG_SET *, bool); - #endif extern void note_stores (const_rtx, void (*) (rtx, const_rtx, void *), void *); extern void note_uses (rtx *, void (*) (rtx *, void *), void *); extern int dead_or_set_p (const_rtx, const_rtx); --- 2937,2944 ---- *************** extern bool can_assign_to_reg_without_cl *** 3572,3580 **** extern rtx fis_get_condition (rtx_insn *); /* In ira.c */ - #ifdef HARD_CONST extern HARD_REG_SET eliminable_regset; - #endif extern void mark_elimination (int, int); /* In reginfo.c */ --- 3568,3574 ---- *************** extern void init_reg_sets (void); *** 3590,3598 **** extern void regclass (rtx, int); extern void reg_scan (rtx_insn *, unsigned int); extern void fix_register (const char *, int, int); - #ifdef HARD_CONST extern const HARD_REG_SET *valid_mode_changes_for_regno (unsigned int); - #endif /* In reload1.c */ extern int function_invariant_p (const_rtx); --- 3584,3590 ---- *************** extern void _fatal_insn (const char *, c *** 3709,3715 **** /* reginfo.c */ extern tree GTY(()) global_regs_decl[FIRST_PSEUDO_REGISTER]; - #ifdef HARD_CONST /* Information about the function that is propagated by the RTL backend. Available only for functions that has been already assembled. */ --- 3701,3706 ---- *************** struct GTY(()) cgraph_rtl_info { *** 3723,3729 **** /* Set if function_used_regs is valid. */ unsigned function_used_regs_valid: 1; }; - #endif #endif /* ! GCC_RTL_H */ --- 3714,3719 ---- Index: regs.h =================================================================== *** regs.h (revision 225452) --- regs.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,28 **** #ifndef GCC_REGS_H #define GCC_REGS_H - #include "hard-reg-set.h" - #include "rtl.h" - #define REG_BYTES(R) mode_size[(int) GET_MODE (R)] /* When you only have the mode of a pseudo register before it has a hard --- 20,25 ---- Index: cfg.h =================================================================== *** cfg.h (revision 224988) --- cfg.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,25 **** --- 20,27 ---- #ifndef GCC_CFG_H #define GCC_CFG_H + #include "dominance.h" + /* What sort of profiling information we have. */ enum profile_status_d { Index: gimple.h =================================================================== *** gimple.h (revision 224989) --- gimple.h (working copy) *************** along with GCC; see the file COPYING3. *** 22,27 **** --- 22,30 ---- #ifndef GCC_GIMPLE_H #define GCC_GIMPLE_H + #include "tree-ssa-alias.h" + #include "gimple-expr.h" + typedef gimple gimple_seq_node; enum gimple_code { Index: backend.h =================================================================== *** backend.h (revision 0) --- backend.h (working copy) *************** *** 0 **** --- 1,33 ---- + /* Common Backend requirements. + + Copyright (C) 2015 Free Software Foundation, Inc. + Contributed by Andrew MacLeod <amacleod@redhat.com> + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 3, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ + + #ifndef GCC_BACKEND_H + #define GCC_BACKEND_H + + #include "tm.h" + #include "function.h" + #include "bitmap.h" + #include "sbitmap.h" + #include "predict.h" + #include "basic-block.h" + #include "cfg.h" + + #endif /*GCC_BACKEND_H */ Index: gimple-ssa.h =================================================================== *** gimple-ssa.h (revision 224988) --- gimple-ssa.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #ifndef GCC_GIMPLE_SSA_H #define GCC_GIMPLE_SSA_H - #include "tree-hasher.h" #include "tree-ssa-operands.h" /* This structure is used to map a gimple statement to a label, --- 21,26 ---- Index: ssa.h =================================================================== *** ssa.h (revision 0) --- ssa.h (working copy) *************** *** 0 **** --- 1,29 ---- + /* Common SSA files + Copyright (C) 2015 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 3, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ + + #ifndef GCC_SSA_H + #define GCC_SSA_H + + #include "stringpool.h" + #include "gimple-ssa.h" + #include "tree-ssanames.h" + #include "tree-phinodes.h" + #include "ssa-iterators.h" + + #endif /* GCC_SSA_H */ ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 2/9] flatten regset.h 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod 2015-07-07 13:43 ` [patch 1/9] header additions and aggregators Andrew MacLeod @ 2015-07-07 13:44 ` Andrew MacLeod 2015-07-07 13:45 ` [patch 3/9] Flatten lra-int.h Andrew MacLeod ` (7 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:44 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 622 bytes --] This patch flattens regset.h. it only includes bitmap.h which will come from backend.h and hard-reg-set.h which is going to be included by rtl.h. The vast majority of files which include regset already include rtl.h, so its almost never needed. This patch shows the result on all files in a virgin state (ie, as if no other patch has been applied) note sel-sched-ir.h and df.h both include regset.h.. its flattened into them as well, but will later come out when those 2 are flattened. bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. [-- Attachment #2: 2-regset.patch --] [-- Type: text/x-patch, Size: 2820 bytes --] * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Adjust includes. * df.h: Likewise. * dse.c: Likewise. * cgraphunit.c: Likewise. Index: regset.h =================================================================== *** regset.h (revision 225452) --- regset.h (working copy) *************** along with GCC; see the file COPYING3. *** 30,37 **** the latter option, a good start would be to change everything allocated on the reg_obstack to regset. */ - #include "bitmap.h" /* For bitmap_iterator. */ - #include "hard-reg-set.h" /* Head of register set linked list. */ typedef bitmap_head regset_head; --- 30,35 ---- Index: sel-sched-ir.h =================================================================== *** sel-sched-ir.h (revision 225452) --- sel-sched-ir.h (working copy) *************** along with GCC; see the file COPYING3. *** 23,32 **** /* For state_t. */ #include "insn-attr.h" #include "regset.h" /* For reg_note. */ #include "rtl.h" - #include "bitmap.h" #include "sched-int.h" #include "cfgloop.h" --- 23,33 ---- /* For state_t. */ #include "insn-attr.h" + #include "bitmap.h" + #include "hard-reg-set.h" #include "regset.h" /* For reg_note. */ #include "rtl.h" #include "sched-int.h" #include "cfgloop.h" Index: df.h =================================================================== *** df.h (revision 225452) --- df.h (working copy) *************** along with GCC; see the file COPYING3. *** 26,36 **** #define GCC_DF_H #include "bitmap.h" #include "regset.h" #include "sbitmap.h" #include "predict.h" #include "tm.h" - #include "hard-reg-set.h" #include "function.h" #include "alloc-pool.h" #include "timevar.h" --- 26,36 ---- #define GCC_DF_H #include "bitmap.h" + #include "hard-reg-set.h" #include "regset.h" #include "sbitmap.h" #include "predict.h" #include "tm.h" #include "function.h" #include "alloc-pool.h" #include "timevar.h" Index: dse.c =================================================================== *** dse.c (revision 225452) --- dse.c (working copy) *************** along with GCC; see the file COPYING3. *** 35,40 **** --- 35,41 ---- #include "tm_p.h" #include "regs.h" #include "hard-reg-set.h" + #include "bitmap.h" #include "regset.h" #include "flags.h" #include "dominance.h" Index: cgraphunit.c =================================================================== *** cgraphunit.c (revision 225452) --- cgraphunit.c (working copy) *************** along with GCC; see the file COPYING3. *** 214,219 **** --- 214,220 ---- #include "lto-streamer.h" #include "except.h" #include "cfgloop.h" + #include "bitmap.h" #include "regset.h" /* FIXME: For reg_obstack. */ #include "context.h" #include "pass_manager.h" ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 3/9] Flatten lra-int.h 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod 2015-07-07 13:43 ` [patch 1/9] header additions and aggregators Andrew MacLeod 2015-07-07 13:44 ` [patch 2/9] flatten regset.h Andrew MacLeod @ 2015-07-07 13:45 ` Andrew MacLeod 2015-07-07 13:46 ` [patch 5/9] Flatten ira-int.h Andrew MacLeod ` (6 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:45 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 301 bytes --] This patch flattens lra-int.h. It currently clumps 7 includes, which no file needs more than 4. Flatten it here and find a better aggregator for rtl related files later. Bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. [-- Attachment #2: 3-lra.patch --] [-- Type: text/x-patch, Size: 4544 bytes --] * lra-int.h: Flatten completely. * lra-assigns.c: Adjust includes. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. Index: lra-int.h =================================================================== *** lra-int.h (revision 225452) --- lra-int.h (working copy) *************** along with GCC; see the file COPYING3. I *** 21,34 **** #ifndef GCC_LRA_INT_H #define GCC_LRA_INT_H - #include "lra.h" - #include "bitmap.h" - #include "recog.h" - #include "insn-attr.h" - #include "insn-codes.h" - #include "insn-config.h" - #include "regs.h" - #define lra_assert(c) gcc_checking_assert (c) /* The parameter used to prevent infinite reloading for an insn. Each --- 21,26 ---- Index: lra-assigns.c =================================================================== *** lra-assigns.c (revision 225452) --- lra-assigns.c (working copy) *************** along with GCC; see the file COPYING3. I *** 109,114 **** --- 109,118 ---- #include "ira.h" #include "sparseset.h" #include "params.h" + #include "lra.h" + #include "bitmap.h" + #include "insn-attr.h" + #include "insn-codes.h" #include "lra-int.h" /* Current iteration number of the pass and current iteration number Index: lra-coalesce.c =================================================================== *** lra-coalesce.c (revision 225452) --- lra-coalesce.c (working copy) *************** along with GCC; see the file COPYING3. I *** 74,79 **** --- 74,83 ---- #include "timevar.h" #include "ira.h" #include "alloc-pool.h" + #include "lra.h" + #include "bitmap.h" + #include "insn-attr.h" + #include "insn-codes.h" #include "lra-int.h" #include "df.h" Index: lra-constraints.c =================================================================== *** lra-constraints.c (revision 225452) --- lra-constraints.c (working copy) *************** *** 144,149 **** --- 144,152 ---- #include "ira.h" #include "rtl-error.h" #include "params.h" + #include "lra.h" + #include "bitmap.h" + #include "insn-attr.h" #include "lra-int.h" /* Value of LRA_CURR_RELOAD_NUM at the beginning of BB of the current Index: lra-eliminations.c =================================================================== *** lra-eliminations.c (revision 225452) --- lra-eliminations.c (working copy) *************** along with GCC; see the file COPYING3. I *** 87,92 **** --- 87,95 ---- #include "df.h" #include "ira.h" #include "rtl-error.h" + #include "lra.h" + #include "bitmap.h" + #include "insn-attr.h" #include "lra-int.h" /* This structure is used to record information about hard register Index: lra-lives.c =================================================================== *** lra-lives.c (revision 225452) --- lra-lives.c (working copy) *************** along with GCC; see the file COPYING3. I *** 58,63 **** --- 58,67 ---- #include "df.h" #include "ira.h" #include "sparseset.h" + #include "lra.h" + #include "bitmap.h" + #include "insn-attr.h" + #include "insn-codes.h" #include "lra-int.h" /* Program points are enumerated by numbers from range Index: lra-remat.c =================================================================== *** lra-remat.c (revision 225452) --- lra-remat.c (working copy) *************** along with GCC; see the file COPYING3. I *** 87,92 **** --- 87,96 ---- #include "ira.h" #include "sparseset.h" #include "params.h" + #include "lra.h" + #include "bitmap.h" + #include "insn-attr.h" + #include "insn-codes.h" #include "lra-int.h" /* Number of candidates for rematerialization. */ Index: lra-spills.c =================================================================== *** lra-spills.c (revision 225452) --- lra-spills.c (working copy) *************** along with GCC; see the file COPYING3. I *** 88,93 **** --- 88,97 ---- #include "timevar.h" #include "target.h" #include "alloc-pool.h" + #include "lra.h" + #include "bitmap.h" + #include "insn-attr.h" + #include "insn-codes.h" #include "lra-int.h" #include "ira.h" #include "df.h" Index: lra.c =================================================================== *** lra.c (revision 225452) --- lra.c (working copy) *************** along with GCC; see the file COPYING3. I *** 139,144 **** --- 139,147 ---- #include "target.h" #include "ira.h" #include "alloc-pool.h" + #include "lra.h" + #include "bitmap.h" + #include "insn-attr.h" #include "lra-int.h" #include "df.h" ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 5/9] Flatten ira-int.h 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod ` (2 preceding siblings ...) 2015-07-07 13:45 ` [patch 3/9] Flatten lra-int.h Andrew MacLeod @ 2015-07-07 13:46 ` Andrew MacLeod 2015-07-07 13:46 ` [patch 4/9] Flatten sel-sched-dump.h and sel-sched-ir.h Andrew MacLeod ` (5 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:46 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 372 bytes --] Flatten ira-int.h, yet another header that includes cfgloop.h. Most of the includes from here do actually make it into the source files, so once the include reduction is completed and we see if they are actually needed, some may go back in. Bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. [-- Attachment #2: 5-ira.patch --] [-- Type: text/x-patch, Size: 4291 bytes --] * ira-int.h: Flatten includes. * ira-build.c: Adjust includes. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * target-globals.c: Likewise. Index: ira-int.h =================================================================== *** ira-int.h (revision 225452) --- ira-int.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,30 **** #ifndef GCC_IRA_INT_H #define GCC_IRA_INT_H - #include "cfgloop.h" - #include "ira.h" - #include "alloc-pool.h" - /* To provide consistency in naming, all IRA external variables, functions, common typedefs start with prefix ira_. */ --- 21,26 ---- Index: ira-build.c =================================================================== *** ira-build.c (revision 225452) --- ira-build.c (working copy) *************** along with GCC; see the file COPYING3. *** 40,45 **** --- 40,48 ---- #include "df.h" #include "reload.h" #include "sparseset.h" + #include "cfgloop.h" + #include "ira.h" + #include "alloc-pool.h" #include "ira-int.h" #include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */ Index: ira-color.c =================================================================== *** ira-color.c (revision 225452) --- ira-color.c (working copy) *************** along with GCC; see the file COPYING3. *** 51,56 **** --- 51,59 ---- #include "reload.h" #include "params.h" #include "df.h" + #include "cfgloop.h" + #include "ira.h" + #include "alloc-pool.h" #include "ira-int.h" typedef struct allocno_hard_regs *allocno_hard_regs_t; Index: ira-conflicts.c =================================================================== *** ira-conflicts.c (revision 225452) --- ira-conflicts.c (working copy) *************** along with GCC; see the file COPYING3. *** 37,42 **** --- 37,45 ---- #include "params.h" #include "df.h" #include "sparseset.h" + #include "cfgloop.h" + #include "ira.h" + #include "alloc-pool.h" #include "ira-int.h" #include "addresses.h" Index: ira-costs.c =================================================================== *** ira-costs.c (revision 225452) --- ira-costs.c (working copy) *************** along with GCC; see the file COPYING3. *** 50,55 **** --- 50,58 ---- #include "diagnostic-core.h" #include "target.h" #include "params.h" + #include "cfgloop.h" + #include "ira.h" + #include "alloc-pool.h" #include "ira-int.h" /* The flags is set up every time when we calculate pseudo register Index: ira-emit.c =================================================================== *** ira-emit.c (revision 225452) --- ira-emit.c (working copy) *************** along with GCC; see the file COPYING3. *** 100,105 **** --- 100,108 ---- #include "params.h" #include "reload.h" #include "df.h" + #include "cfgloop.h" + #include "ira.h" + #include "alloc-pool.h" #include "ira-int.h" Index: ira-lives.c =================================================================== *** ira-lives.c (revision 225452) --- ira-lives.c (working copy) *************** along with GCC; see the file COPYING3. *** 39,44 **** --- 39,47 ---- #include "df.h" #include "sbitmap.h" #include "sparseset.h" + #include "cfgloop.h" + #include "ira.h" + #include "alloc-pool.h" #include "ira-int.h" /* The code in this file is similar to one in global but the code Index: ira.c =================================================================== *** ira.c (revision 225452) --- ira.c (working copy) *************** along with GCC; see the file COPYING3. *** 403,408 **** --- 403,411 ---- #include "except.h" #include "reload.h" #include "diagnostic-core.h" + #include "cfgloop.h" + #include "ira.h" + #include "alloc-pool.h" #include "ira-int.h" #include "lra.h" #include "dce.h" Index: target-globals.c =================================================================== *** target-globals.c (revision 225452) --- target-globals.c (working copy) *************** along with GCC; see the file COPYING3. *** 45,50 **** --- 45,52 ---- #include "optabs.h" #include "libfuncs.h" #include "cfgloop.h" + #include "ira.h" + #include "alloc-pool.h" #include "ira-int.h" #include "builtins.h" #include "gcse.h" ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 4/9] Flatten sel-sched-dump.h and sel-sched-ir.h 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod ` (3 preceding siblings ...) 2015-07-07 13:46 ` [patch 5/9] Flatten ira-int.h Andrew MacLeod @ 2015-07-07 13:46 ` Andrew MacLeod 2015-07-07 14:01 ` Alexander Monakov 2015-07-07 13:47 ` [patch 6/9] Flatten gimple-streamer.h Andrew MacLeod ` (4 subsequent siblings) 9 siblings, 1 reply; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:46 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 364 bytes --] This patch flattens both sel-sched-dump.h and sel-sched-ir.h. Both these files end up including cfgloop.h, so in preparation for flattening cfgloop.h, flatten these. Note they actually have only a small effect on what includes them. Bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. [-- Attachment #2: 4-sel-sched.patch --] [-- Type: text/x-patch, Size: 2704 bytes --] * sel-sched-dump.h: Flatten includes. * sel-sched-ir.h: Flatten includes. * sel-sched-dump.c: Adjust includes. * sel-sched-ir.c: Adjust includes. * sel-sched.c: Adjust includes. Index: sel-sched-dump.h =================================================================== *** sel-sched-dump.h (revision 225452) --- sel-sched-dump.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,29 **** #ifndef GCC_SEL_SCHED_DUMP_H #define GCC_SEL_SCHED_DUMP_H - #include "sel-sched-ir.h" - - /* These values control the dumping of control flow graph to the .dot file. */ enum sel_dump_cfg_def { --- 21,26 ---- Index: sel-sched-ir.h =================================================================== *** sel-sched-ir.h (revision 225452) --- sel-sched-ir.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,35 **** #ifndef GCC_SEL_SCHED_IR_H #define GCC_SEL_SCHED_IR_H - /* For state_t. */ - #include "insn-attr.h" - #include "regset.h" - /* For reg_note. */ - #include "rtl.h" - #include "bitmap.h" - #include "sched-int.h" - #include "cfgloop.h" - /* tc_t is a short for target context. This is a state of the target backend. */ typedef void *tc_t; --- 21,26 ---- Index: sel-sched-dump.c =================================================================== *** sel-sched-dump.c (revision 225452) --- sel-sched-dump.c (working copy) *************** along with GCC; see the file COPYING3. *** 40,45 **** --- 40,49 ---- #include "target.h" #ifdef INSN_SCHEDULING + #include "regset.h" + #include "bitmap.h" + #include "sched-int.h" + #include "cfgloop.h" #include "sel-sched-ir.h" #include "sel-sched-dump.h" \f Index: sel-sched-ir.c =================================================================== *** sel-sched-ir.c (revision 225452) --- sel-sched-ir.c (working copy) *************** along with GCC; see the file COPYING3. *** 49,54 **** --- 49,57 ---- #include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */ #ifdef INSN_SCHEDULING + #include "regset.h" + #include "bitmap.h" + #include "cfgloop.h" #include "sel-sched-ir.h" /* We don't have to use it except for sel_print_insn. */ #include "sel-sched-dump.h" Index: sel-sched.c =================================================================== *** sel-sched.c (revision 225452) --- sel-sched.c (working copy) *************** along with GCC; see the file COPYING3. *** 49,54 **** --- 49,58 ---- #include "rtl-iter.h" #ifdef INSN_SCHEDULING + #include "regset.h" + #include "rtl.h" + #include "bitmap.h" + #include "cfgloop.h" #include "sel-sched-ir.h" #include "sel-sched-dump.h" #include "sel-sched.h" ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 4/9] Flatten sel-sched-dump.h and sel-sched-ir.h 2015-07-07 13:46 ` [patch 4/9] Flatten sel-sched-dump.h and sel-sched-ir.h Andrew MacLeod @ 2015-07-07 14:01 ` Alexander Monakov 2015-07-07 14:07 ` Andrew MacLeod 0 siblings, 1 reply; 22+ messages in thread From: Alexander Monakov @ 2015-07-07 14:01 UTC (permalink / raw) To: Andrew MacLeod; +Cc: gcc-patches On Tue, 7 Jul 2015, Andrew MacLeod wrote: > This patch flattens both sel-sched-dump.h and sel-sched-ir.h. Both these files > end up including cfgloop.h, so in preparation for flattening cfgloop.h, > flatten these. Note they actually have only a small effect on what includes > them. This patch removes #include "insn-attr.h" from sel-sched-ir.h without adding it to .c files. I'm curious how it works, is that file now arranged to be included elsewhere? (sorry if I missed it, but the patch series does not seem to mention insn-attr.h specifically) Thanks. Alexander ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 4/9] Flatten sel-sched-dump.h and sel-sched-ir.h 2015-07-07 14:01 ` Alexander Monakov @ 2015-07-07 14:07 ` Andrew MacLeod 0 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 14:07 UTC (permalink / raw) To: Alexander Monakov; +Cc: gcc-patches On 07/07/2015 10:01 AM, Alexander Monakov wrote: > On Tue, 7 Jul 2015, Andrew MacLeod wrote: > >> This patch flattens both sel-sched-dump.h and sel-sched-ir.h. Both these files >> end up including cfgloop.h, so in preparation for flattening cfgloop.h, >> flatten these. Note they actually have only a small effect on what includes >> them. > This patch removes #include "insn-attr.h" from sel-sched-ir.h without adding > it to .c files. I'm curious how it works, is that file now arranged to be > included elsewhere? (sorry if I missed it, but the patch series does not seem > to mention insn-attr.h specifically) > > Thanks. > Alexander That is because every file which includes sel-sched-ir.h already included insn-attr.h so didn't need adjustment... Andrew ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 6/9] Flatten gimple-streamer.h 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod ` (4 preceding siblings ...) 2015-07-07 13:46 ` [patch 4/9] Flatten sel-sched-dump.h and sel-sched-ir.h Andrew MacLeod @ 2015-07-07 13:47 ` Andrew MacLeod 2015-07-07 13:49 ` [patch 7/9] Flatten cfgloop.h Andrew MacLeod ` (3 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:47 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 234 bytes --] This one is amusing... 3 header files, all of them already included in all the files which include this. Bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. [-- Attachment #2: 6-gimple-streamer.patch --] [-- Type: text/x-patch, Size: 501 bytes --] * gimple-streamer.h: Remove all includes. Index: gimple-streamer.h =================================================================== *** gimple-streamer.h (revision 225452) --- gimple-streamer.h (working copy) *************** along with GCC; see the file COPYING3. *** 22,30 **** #ifndef GCC_GIMPLE_STREAMER_H #define GCC_GIMPLE_STREAMER_H - #include "tm.h" - #include "hard-reg-set.h" - #include "function.h" #include "lto-streamer.h" /* In gimple-streamer-in.c */ --- 22,27 ---- ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 7/9] Flatten cfgloop.h 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod ` (5 preceding siblings ...) 2015-07-07 13:47 ` [patch 6/9] Flatten gimple-streamer.h Andrew MacLeod @ 2015-07-07 13:49 ` Andrew MacLeod 2015-07-07 13:50 ` [patch 8/9] Flatten df.h Andrew MacLeod ` (2 subsequent siblings) 9 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:49 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 473 bytes --] This patch flattens cfgloop.h. cfgloopmanip.h is utilized by numerous files which include cfgloop.h, so it seems to make sense to leave it here. The other 3 header files are going to form part of backend.h, so take them out. I didn't bother posting the changes to all the source files since aggregating with backend.h would undo every one. Bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. [-- Attachment #2: 7-cfgloop.patch --] [-- Type: text/x-patch, Size: 503 bytes --] * cfgloop.h: Remove all #includes except cfgloopmanip.h. Index: cfgloop.h =================================================================== *** cfgloop.h (revision 225452) --- cfgloop.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,28 **** #ifndef GCC_CFGLOOP_H #define GCC_CFGLOOP_H - #include "bitmap.h" - #include "sbitmap.h" - #include "function.h" #include "cfgloopmanip.h" /* Structure to hold decision about unrolling/peeling. */ --- 20,25 ---- ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 8/9] Flatten df.h 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod ` (6 preceding siblings ...) 2015-07-07 13:49 ` [patch 7/9] Flatten cfgloop.h Andrew MacLeod @ 2015-07-07 13:50 ` Andrew MacLeod 2015-07-07 13:51 ` [patch 9/9] Final patch with all changes Andrew MacLeod 2015-07-07 22:21 ` [patch 0/9] Flattening and initial module rebuilding Jeff Law 9 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:50 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 714 bytes --] This patch fixes up df.h. It contains 5 headers that will form part of backend.has well as hard-reg-set.h which is now going to be included by rtl.h. The other 3 includes are required for df.h to compile, and it makes sense to leave them here. furthermore, resource.h, sched-int.h and valtrack.h all include df.h, amongst other things, so flatten them as well. Now only source files will include df.h and we can see if it may belong in some other aggregator (or even become one) after include reduction. All the requisite adjustments to source files will be in the final patch. Bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. [-- Attachment #2: 8-df.patch --] [-- Type: text/x-patch, Size: 2146 bytes --] * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. Index: resource.h =================================================================== *** resource.h (revision 225452) --- resource.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,28 **** #ifndef GCC_RESOURCE_H #define GCC_RESOURCE_H - #include "hard-reg-set.h" - #include "df.h" - /* Macro to clear all resources. */ #define CLEAR_RESOURCE(RES) \ do { (RES)->memory = (RES)->volatil = (RES)->cc = 0; \ --- 20,25 ---- Index: sched-int.h =================================================================== *** sched-int.h (revision 225452) --- sched-int.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,32 **** #ifndef GCC_SCHED_INT_H #define GCC_SCHED_INT_H - #include "insn-attr.h" - #ifdef INSN_SCHEDULING - #include "df.h" - /* Identificator of a scheduler pass. */ enum sched_pass_id_t { SCHED_PASS_UNKNOWN, SCHED_RGN_PASS, SCHED_EBB_PASS, SCHED_SMS_PASS, SCHED_SEL_PASS }; --- 21,28 ---- Index: valtrack.h =================================================================== *** valtrack.h (revision 225452) --- valtrack.h (working copy) *************** along with GCC; see the file COPYING3. *** 22,31 **** #ifndef GCC_VALTRACK_H #define GCC_VALTRACK_H - #include "bitmap.h" - #include "df.h" - #include "rtl.h" - /* Debug uses of dead regs. */ /* Entry that maps a dead pseudo (REG) used in a debug insns that dies --- 22,27 ---- Index: df.h =================================================================== *** df.h (revision 225452) --- df.h (working copy) *************** along with GCC; see the file COPYING3. *** 25,37 **** #ifndef GCC_DF_H #define GCC_DF_H - #include "bitmap.h" #include "regset.h" - #include "sbitmap.h" - #include "predict.h" - #include "tm.h" - #include "hard-reg-set.h" - #include "function.h" #include "alloc-pool.h" #include "timevar.h" --- 25,31 ---- ^ permalink raw reply [flat|nested] 22+ messages in thread
* [patch 9/9] Final patch with all changes 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod ` (7 preceding siblings ...) 2015-07-07 13:50 ` [patch 8/9] Flatten df.h Andrew MacLeod @ 2015-07-07 13:51 ` Andrew MacLeod 2015-07-07 22:03 ` Pedro Alves 2015-07-07 22:21 ` [patch 0/9] Flattening and initial module rebuilding Jeff Law 9 siblings, 1 reply; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 13:51 UTC (permalink / raw) To: gcc-patches [-- Attachment #1: Type: text/plain, Size: 431 bytes --] This is the big daddy. THe first patch is an aggregation of the header file changes from the first 8 patches. The second patch is adjustments to the gen*.c build files to remove duplicate includes and such. The third patch is the net cumulative effect on all the source files. Bootstraps from scratch on x86_64-unknown-linux-gnu with no new regressions. Also compiles all the files in config-list.mk. OK for trunk? Andrew [-- Attachment #2: 9-header.patch --] [-- Type: text/x-patch, Size: 13752 bytes --] * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. Index: tree-core.h =================================================================== *** tree-core.h (revision 225452) --- tree-core.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,25 **** --- 20,27 ---- #ifndef GCC_TREE_CORE_H #define GCC_TREE_CORE_H + #include "symtab.h" + /* This file contains all the data structures that define the 'tree' type. There are no accessor macros nor functions in this file. Only the basic data structures, extern declarations and type definitions. */ Index: rtl.h =================================================================== *** rtl.h (revision 225452) --- rtl.h (working copy) *************** along with GCC; see the file COPYING3. *** 38,44 **** #include "is-a.h" #endif /* GENERATOR_FILE */ ! #include "flags.h" /* Value used by some passes to "recognize" noop moves as valid instructions. */ --- 38,44 ---- #include "is-a.h" #endif /* GENERATOR_FILE */ ! #include "hard-reg-set.h" /* Value used by some passes to "recognize" noop moves as valid instructions. */ *************** extern bool val_signbit_known_clear_p (m *** 2880,2888 **** /* In reginfo.c */ extern machine_mode choose_hard_reg_mode (unsigned int, unsigned int, bool); - #ifdef HARD_CONST extern const HARD_REG_SET &simplifiable_subregs (const subreg_shape &); - #endif /* In emit-rtl.c */ extern rtx set_for_reg_notes (rtx); --- 2880,2886 ---- *************** extern int reg_overlap_mentioned_p (cons *** 2939,2948 **** extern const_rtx set_of (const_rtx, const_rtx); extern void record_hard_reg_sets (rtx, const_rtx, void *); extern void record_hard_reg_uses (rtx *, void *); - #ifdef HARD_CONST extern void find_all_hard_regs (const_rtx, HARD_REG_SET *); extern void find_all_hard_reg_sets (const rtx_insn *, HARD_REG_SET *, bool); - #endif extern void note_stores (const_rtx, void (*) (rtx, const_rtx, void *), void *); extern void note_uses (rtx *, void (*) (rtx *, void *), void *); extern int dead_or_set_p (const_rtx, const_rtx); --- 2937,2944 ---- *************** extern bool can_assign_to_reg_without_cl *** 3572,3580 **** extern rtx fis_get_condition (rtx_insn *); /* In ira.c */ - #ifdef HARD_CONST extern HARD_REG_SET eliminable_regset; - #endif extern void mark_elimination (int, int); /* In reginfo.c */ --- 3568,3574 ---- *************** extern void init_reg_sets (void); *** 3590,3598 **** extern void regclass (rtx, int); extern void reg_scan (rtx_insn *, unsigned int); extern void fix_register (const char *, int, int); - #ifdef HARD_CONST extern const HARD_REG_SET *valid_mode_changes_for_regno (unsigned int); - #endif /* In reload1.c */ extern int function_invariant_p (const_rtx); --- 3584,3590 ---- *************** extern void _fatal_insn (const char *, c *** 3709,3715 **** /* reginfo.c */ extern tree GTY(()) global_regs_decl[FIRST_PSEUDO_REGISTER]; - #ifdef HARD_CONST /* Information about the function that is propagated by the RTL backend. Available only for functions that has been already assembled. */ --- 3701,3706 ---- *************** struct GTY(()) cgraph_rtl_info { *** 3723,3729 **** /* Set if function_used_regs is valid. */ unsigned function_used_regs_valid: 1; }; - #endif #endif /* ! GCC_RTL_H */ --- 3714,3719 ---- Index: regs.h =================================================================== *** regs.h (revision 225452) --- regs.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,28 **** #ifndef GCC_REGS_H #define GCC_REGS_H - #include "hard-reg-set.h" - #include "rtl.h" - #define REG_BYTES(R) mode_size[(int) GET_MODE (R)] /* When you only have the mode of a pseudo register before it has a hard --- 20,25 ---- Index: cfg.h =================================================================== *** cfg.h (revision 225452) --- cfg.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,25 **** --- 20,27 ---- #ifndef GCC_CFG_H #define GCC_CFG_H + #include "dominance.h" + /* What sort of profiling information we have. */ enum profile_status_d { Index: gimple.h =================================================================== *** gimple.h (revision 225452) --- gimple.h (working copy) *************** along with GCC; see the file COPYING3. *** 22,27 **** --- 22,30 ---- #ifndef GCC_GIMPLE_H #define GCC_GIMPLE_H + #include "tree-ssa-alias.h" + #include "gimple-expr.h" + typedef gimple gimple_seq_node; enum gimple_code { Index: backend.h =================================================================== *** backend.h (revision 0) --- backend.h (working copy) *************** *** 0 **** --- 1,33 ---- + /* Common Backend requirements. + + Copyright (C) 2015 Free Software Foundation, Inc. + Contributed by Andrew MacLeod <amacleod@redhat.com> + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 3, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ + + #ifndef GCC_BACKEND_H + #define GCC_BACKEND_H + + #include "tm.h" + #include "function.h" + #include "bitmap.h" + #include "sbitmap.h" + #include "predict.h" + #include "basic-block.h" + #include "cfg.h" + + #endif /*GCC_BACKEND_H */ Index: gimple-ssa.h =================================================================== *** gimple-ssa.h (revision 225452) --- gimple-ssa.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #ifndef GCC_GIMPLE_SSA_H #define GCC_GIMPLE_SSA_H - #include "tree-hasher.h" #include "tree-ssa-operands.h" /* This structure is used to map a gimple statement to a label, --- 21,26 ---- Index: ssa.h =================================================================== *** ssa.h (revision 0) --- ssa.h (working copy) *************** *** 0 **** --- 1,29 ---- + /* Common SSA files + Copyright (C) 2015 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 3, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + <http://www.gnu.org/licenses/>. */ + + #ifndef GCC_SSA_H + #define GCC_SSA_H + + #include "stringpool.h" + #include "gimple-ssa.h" + #include "tree-ssanames.h" + #include "tree-phinodes.h" + #include "ssa-iterators.h" + + #endif /* GCC_SSA_H */ Index: regset.h =================================================================== *** regset.h (revision 225452) --- regset.h (working copy) *************** along with GCC; see the file COPYING3. *** 30,37 **** the latter option, a good start would be to change everything allocated on the reg_obstack to regset. */ - #include "bitmap.h" /* For bitmap_iterator. */ - #include "hard-reg-set.h" /* Head of register set linked list. */ typedef bitmap_head regset_head; --- 30,35 ---- Index: sel-sched-ir.h =================================================================== *** sel-sched-ir.h (revision 225452) --- sel-sched-ir.h (working copy) *************** along with GCC; see the file COPYING3. *** 22,34 **** #define GCC_SEL_SCHED_IR_H /* For state_t. */ - #include "insn-attr.h" - #include "regset.h" /* For reg_note. */ - #include "rtl.h" - #include "bitmap.h" - #include "sched-int.h" - #include "cfgloop.h" /* tc_t is a short for target context. This is a state of the target backend. */ --- 22,28 ---- Index: lra-int.h =================================================================== *** lra-int.h (revision 225452) --- lra-int.h (working copy) *************** along with GCC; see the file COPYING3. I *** 21,34 **** #ifndef GCC_LRA_INT_H #define GCC_LRA_INT_H - #include "lra.h" - #include "bitmap.h" - #include "recog.h" - #include "insn-attr.h" - #include "insn-codes.h" - #include "insn-config.h" - #include "regs.h" - #define lra_assert(c) gcc_checking_assert (c) /* The parameter used to prevent infinite reloading for an insn. Each --- 21,26 ---- Index: sel-sched-dump.h =================================================================== *** sel-sched-dump.h (revision 225452) --- sel-sched-dump.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,27 **** #ifndef GCC_SEL_SCHED_DUMP_H #define GCC_SEL_SCHED_DUMP_H - #include "sel-sched-ir.h" /* These values control the dumping of control flow graph to the .dot file. */ --- 21,26 ---- Index: ira-int.h =================================================================== *** ira-int.h (revision 225452) --- ira-int.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,30 **** #ifndef GCC_IRA_INT_H #define GCC_IRA_INT_H - #include "cfgloop.h" - #include "ira.h" - #include "alloc-pool.h" - /* To provide consistency in naming, all IRA external variables, functions, common typedefs start with prefix ira_. */ --- 21,26 ---- Index: gimple-streamer.h =================================================================== *** gimple-streamer.h (revision 225452) --- gimple-streamer.h (working copy) *************** along with GCC; see the file COPYING3. *** 22,30 **** #ifndef GCC_GIMPLE_STREAMER_H #define GCC_GIMPLE_STREAMER_H - #include "tm.h" - #include "hard-reg-set.h" - #include "function.h" #include "lto-streamer.h" /* In gimple-streamer-in.c */ --- 22,27 ---- Index: cfgloop.h =================================================================== *** cfgloop.h (revision 225452) --- cfgloop.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,28 **** #ifndef GCC_CFGLOOP_H #define GCC_CFGLOOP_H - #include "bitmap.h" - #include "sbitmap.h" - #include "function.h" #include "cfgloopmanip.h" /* Structure to hold decision about unrolling/peeling. */ --- 20,25 ---- Index: resource.h =================================================================== *** resource.h (revision 225452) --- resource.h (working copy) *************** along with GCC; see the file COPYING3. *** 20,28 **** #ifndef GCC_RESOURCE_H #define GCC_RESOURCE_H - #include "hard-reg-set.h" - #include "df.h" - /* Macro to clear all resources. */ #define CLEAR_RESOURCE(RES) \ do { (RES)->memory = (RES)->volatil = (RES)->cc = 0; \ --- 20,25 ---- Index: sched-int.h =================================================================== *** sched-int.h (revision 225452) --- sched-int.h (working copy) *************** along with GCC; see the file COPYING3. *** 21,32 **** #ifndef GCC_SCHED_INT_H #define GCC_SCHED_INT_H - #include "insn-attr.h" - #ifdef INSN_SCHEDULING - #include "df.h" - /* Identificator of a scheduler pass. */ enum sched_pass_id_t { SCHED_PASS_UNKNOWN, SCHED_RGN_PASS, SCHED_EBB_PASS, SCHED_SMS_PASS, SCHED_SEL_PASS }; --- 21,28 ---- Index: valtrack.h =================================================================== *** valtrack.h (revision 225452) --- valtrack.h (working copy) *************** along with GCC; see the file COPYING3. *** 22,31 **** #ifndef GCC_VALTRACK_H #define GCC_VALTRACK_H - #include "bitmap.h" - #include "df.h" - #include "rtl.h" - /* Debug uses of dead regs. */ /* Entry that maps a dead pseudo (REG) used in a debug insns that dies --- 22,27 ---- Index: df.h =================================================================== *** df.h (revision 225452) --- df.h (working copy) *************** along with GCC; see the file COPYING3. *** 25,37 **** #ifndef GCC_DF_H #define GCC_DF_H - #include "bitmap.h" #include "regset.h" - #include "sbitmap.h" - #include "predict.h" - #include "tm.h" - #include "hard-reg-set.h" - #include "function.h" #include "alloc-pool.h" #include "timevar.h" --- 25,31 ---- [-- Attachment #3: 9-gen.patch --] [-- Type: text/x-patch, Size: 17920 bytes --] * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. Index: genattrtab.c =================================================================== *** genattrtab.c (revision 225452) --- genattrtab.c (working copy) *************** write_header (FILE *outf) *** 5103,5118 **** fprintf (outf, "#include \"config.h\"\n"); fprintf (outf, "#include \"system.h\"\n"); fprintf (outf, "#include \"coretypes.h\"\n"); ! fprintf (outf, "#include \"tm.h\"\n"); ! fprintf (outf, "#include \"input.h\"\n"); fprintf (outf, "#include \"alias.h\"\n"); - fprintf (outf, "#include \"symtab.h\"\n"); fprintf (outf, "#include \"options.h\"\n"); - fprintf (outf, "#include \"tree.h\"\n"); fprintf (outf, "#include \"varasm.h\"\n"); fprintf (outf, "#include \"stor-layout.h\"\n"); fprintf (outf, "#include \"calls.h\"\n"); - fprintf (outf, "#include \"rtl.h\"\n"); fprintf (outf, "#include \"insn-attr.h\"\n"); fprintf (outf, "#include \"tm_p.h\"\n"); fprintf (outf, "#include \"insn-config.h\"\n"); --- 5103,5116 ---- fprintf (outf, "#include \"config.h\"\n"); fprintf (outf, "#include \"system.h\"\n"); fprintf (outf, "#include \"coretypes.h\"\n"); ! fprintf (outf, "#include \"backend.h\"\n"); ! fprintf (outf, "#include \"tree.h\"\n"); ! fprintf (outf, "#include \"rtl.h\"\n"); fprintf (outf, "#include \"alias.h\"\n"); fprintf (outf, "#include \"options.h\"\n"); fprintf (outf, "#include \"varasm.h\"\n"); fprintf (outf, "#include \"stor-layout.h\"\n"); fprintf (outf, "#include \"calls.h\"\n"); fprintf (outf, "#include \"insn-attr.h\"\n"); fprintf (outf, "#include \"tm_p.h\"\n"); fprintf (outf, "#include \"insn-config.h\"\n"); *************** write_header (FILE *outf) *** 5122,5130 **** fprintf (outf, "#include \"output.h\"\n"); fprintf (outf, "#include \"toplev.h\"\n"); fprintf (outf, "#include \"flags.h\"\n"); - fprintf (outf, "#include \"function.h\"\n"); fprintf (outf, "#include \"emit-rtl.h\"\n"); - fprintf (outf, "#include \"predict.h\"\n"); fprintf (outf, "\n"); fprintf (outf, "#define operands recog_data.operand\n\n"); } --- 5120,5126 ---- Index: genautomata.c =================================================================== *** genautomata.c (revision 225452) --- genautomata.c (working copy) *************** main (int argc, char **argv) *** 9673,9681 **** "#include \"system.h\"\n" "#include \"coretypes.h\"\n" "#include \"tm.h\"\n" - "#include \"input.h\"\n" "#include \"alias.h\"\n" - "#include \"symtab.h\"\n" "#include \"tree.h\"\n" "#include \"varasm.h\"\n" "#include \"stor-layout.h\"\n" --- 9673,9679 ---- Index: genconditions.c =================================================================== *** genconditions.c (revision 225452) --- genconditions.c (working copy) *************** write_header (void) *** 87,92 **** --- 87,94 ---- #include \"hard-reg-set.h\"\n\ #include \"predict.h\"\n\ #include \"basic-block.h\"\n\ + #include \"bitmap.h\"\n\ + #include \"df.h\"\n\ #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ #include \"reload.h\"\n\ Index: genemit.c =================================================================== *** genemit.c (revision 225452) --- genemit.c (working copy) *************** from the machine description file `md'. *** 744,761 **** printf ("#include \"config.h\"\n"); printf ("#include \"system.h\"\n"); printf ("#include \"coretypes.h\"\n"); ! printf ("#include \"tm.h\"\n"); ! printf ("#include \"input.h\"\n"); ! printf ("#include \"alias.h\"\n"); ! printf ("#include \"symtab.h\"\n"); printf ("#include \"tree.h\"\n"); printf ("#include \"varasm.h\"\n"); printf ("#include \"stor-layout.h\"\n"); printf ("#include \"calls.h\"\n"); - printf ("#include \"rtl.h\"\n"); printf ("#include \"tm_p.h\"\n"); - printf ("#include \"hard-reg-set.h\"\n"); - printf ("#include \"function.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"insn-config.h\"\n"); printf ("#include \"expmed.h\"\n"); --- 744,757 ---- printf ("#include \"config.h\"\n"); printf ("#include \"system.h\"\n"); printf ("#include \"coretypes.h\"\n"); ! printf ("#include \"backend.h\"\n"); printf ("#include \"tree.h\"\n"); + printf ("#include \"rtl.h\"\n"); + printf ("#include \"alias.h\"\n"); printf ("#include \"varasm.h\"\n"); printf ("#include \"stor-layout.h\"\n"); printf ("#include \"calls.h\"\n"); printf ("#include \"tm_p.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"insn-config.h\"\n"); printf ("#include \"expmed.h\"\n"); *************** from the machine description file `md'. *** 769,783 **** printf ("#include \"dfp.h\"\n"); printf ("#include \"output.h\"\n"); printf ("#include \"recog.h\"\n"); ! printf ("#include \"predict.h\"\n"); ! printf ("#include \"basic-block.h\"\n"); printf ("#include \"resource.h\"\n"); printf ("#include \"reload.h\"\n"); printf ("#include \"diagnostic-core.h\"\n"); printf ("#include \"regs.h\"\n"); printf ("#include \"tm-constrs.h\"\n"); printf ("#include \"ggc.h\"\n"); - printf ("#include \"basic-block.h\"\n"); printf ("#include \"dumpfile.h\"\n"); printf ("#include \"target.h\"\n\n"); printf ("#define FAIL return (end_sequence (), _val)\n"); --- 765,777 ---- printf ("#include \"dfp.h\"\n"); printf ("#include \"output.h\"\n"); printf ("#include \"recog.h\"\n"); ! printf ("#include \"df.h\"\n"); printf ("#include \"resource.h\"\n"); printf ("#include \"reload.h\"\n"); printf ("#include \"diagnostic-core.h\"\n"); printf ("#include \"regs.h\"\n"); printf ("#include \"tm-constrs.h\"\n"); printf ("#include \"ggc.h\"\n"); printf ("#include \"dumpfile.h\"\n"); printf ("#include \"target.h\"\n\n"); printf ("#define FAIL return (end_sequence (), _val)\n"); Index: gengtype.c =================================================================== *** gengtype.c (revision 225452) --- gengtype.c (working copy) *************** open_base_files (void) *** 1710,1730 **** { /* The order of files here matters very much. */ static const char *const ifiles[] = { ! "config.h", "system.h", "coretypes.h", "tm.h", "insn-codes.h", ! "splay-tree.h", "obstack.h", "bitmap.h", "input.h", ! "alias.h", "symtab.h", "options.h", ! "tree.h", "fold-const.h", "rtl.h", ! "hard-reg-set.h", "predict.h", ! "function.h", "insn-config.h", "flags.h", ! "tree.h", "expmed.h", "dojump.h", "explow.h", "calls.h", "emit-rtl.h", "varasm.h", "stmt.h", ! "expr.h", "alloc-pool.h", ! "basic-block.h", "cselib.h", "insn-addr.h", ! "optabs.h", "libfuncs.h", "debug.h", ! "dominance.h", "cfg.h", "basic-block.h", ! "tree-ssa-alias.h", "internal-fn.h", "gimple-fold.h", "tree-eh.h", ! "gimple-expr.h", "is-a.h", ! "gimple.h", "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h", "tree-phinodes.h", "ssa-iterators.h", "stringpool.h", "tree-ssanames.h", "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h", "tree-ssa-loop-manip.h", "tree-ssa-loop-niter.h", "tree-into-ssa.h", "tree-dfa.h", --- 1710,1722 ---- { /* The order of files here matters very much. */ static const char *const ifiles[] = { ! "config.h", "system.h", "coretypes.h", "backend.h", "tree.h", ! "rtl.h", "gimple.h", "fold-const.h", "insn-codes.h", "splay-tree.h", ! "alias.h", "insn-config.h", "flags.h", "expmed.h", "dojump.h", "explow.h", "calls.h", "emit-rtl.h", "varasm.h", "stmt.h", ! "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h", "optabs.h", ! "libfuncs.h", "debug.h", "internal-fn.h", "gimple-fold.h", "tree-eh.h", ! "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h", "tree-phinodes.h", "ssa-iterators.h", "stringpool.h", "tree-ssanames.h", "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h", "tree-ssa-loop-manip.h", "tree-ssa-loop-niter.h", "tree-into-ssa.h", "tree-dfa.h", Index: genopinit.c =================================================================== *** genopinit.c (revision 225452) --- genopinit.c (working copy) *************** main (int argc, char **argv) *** 464,494 **** "#include \"config.h\"\n" "#include \"system.h\"\n" "#include \"coretypes.h\"\n" ! "#include \"tm.h\"\n" ! "#include \"hash-set.h\"\n" ! "#include \"machmode.h\"\n" ! "#include \"vec.h\"\n" ! "#include \"double-int.h\"\n" ! "#include \"input.h\"\n" ! "#include \"alias.h\"\n" ! "#include \"symtab.h\"\n" ! "#include \"wide-int.h\"\n" ! "#include \"inchash.h\"\n" "#include \"tree.h\"\n" "#include \"varasm.h\"\n" "#include \"stor-layout.h\"\n" "#include \"calls.h\"\n" - "#include \"rtl.h\"\n" - "#include \"predict.h\"\n" "#include \"tm_p.h\"\n" "#include \"flags.h\"\n" "#include \"insn-config.h\"\n" - "#include \"hashtab.h\"\n" - "#include \"hard-reg-set.h\"\n" - "#include \"function.h\"\n" - "#include \"statistics.h\"\n" - "#include \"real.h\"\n" - "#include \"fixed-value.h\"\n" "#include \"expmed.h\"\n" "#include \"dojump.h\"\n" "#include \"explow.h\"\n" --- 464,479 ---- "#include \"config.h\"\n" "#include \"system.h\"\n" "#include \"coretypes.h\"\n" ! "#include \"backend.h\"\n" "#include \"tree.h\"\n" + "#include \"rtl.h\"\n" + "#include \"alias.h\"\n" "#include \"varasm.h\"\n" "#include \"stor-layout.h\"\n" "#include \"calls.h\"\n" "#include \"tm_p.h\"\n" "#include \"flags.h\"\n" "#include \"insn-config.h\"\n" "#include \"expmed.h\"\n" "#include \"dojump.h\"\n" "#include \"explow.h\"\n" Index: genoutput.c =================================================================== *** genoutput.c (revision 225452) --- genoutput.c (working copy) *************** output_prologue (void) *** 226,254 **** printf ("#include \"config.h\"\n"); printf ("#include \"system.h\"\n"); printf ("#include \"coretypes.h\"\n"); ! printf ("#include \"tm.h\"\n"); printf ("#include \"flags.h\"\n"); - printf ("#include \"ggc.h\"\n"); - printf ("#include \"hash-set.h\"\n"); - printf ("#include \"machmode.h\"\n"); - printf ("#include \"vec.h\"\n"); - printf ("#include \"double-int.h\"\n"); - printf ("#include \"input.h\"\n"); printf ("#include \"alias.h\"\n"); - printf ("#include \"symtab.h\"\n"); - printf ("#include \"wide-int.h\"\n"); - printf ("#include \"inchash.h\"\n"); - printf ("#include \"tree.h\"\n"); printf ("#include \"varasm.h\"\n"); printf ("#include \"stor-layout.h\"\n"); printf ("#include \"calls.h\"\n"); - printf ("#include \"rtl.h\"\n"); - printf ("#include \"hashtab.h\"\n"); - printf ("#include \"hard-reg-set.h\"\n"); - printf ("#include \"function.h\"\n"); - printf ("#include \"statistics.h\"\n"); - printf ("#include \"real.h\"\n"); - printf ("#include \"fixed-value.h\"\n"); printf ("#include \"insn-config.h\"\n"); printf ("#include \"expmed.h\"\n"); printf ("#include \"dojump.h\"\n"); --- 226,239 ---- printf ("#include \"config.h\"\n"); printf ("#include \"system.h\"\n"); printf ("#include \"coretypes.h\"\n"); ! printf ("#include \"backend.h\"\n"); ! printf ("#include \"tree.h\"\n"); ! printf ("#include \"rtl.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"alias.h\"\n"); printf ("#include \"varasm.h\"\n"); printf ("#include \"stor-layout.h\"\n"); printf ("#include \"calls.h\"\n"); printf ("#include \"insn-config.h\"\n"); printf ("#include \"expmed.h\"\n"); printf ("#include \"dojump.h\"\n"); *************** output_prologue (void) *** 266,272 **** printf ("#include \"output.h\"\n"); printf ("#include \"target.h\"\n"); printf ("#include \"tm-constrs.h\"\n"); - printf ("#include \"predict.h\"\n"); } static void --- 251,256 ---- Index: genpeep.c =================================================================== *** genpeep.c (revision 225452) --- genpeep.c (working copy) *************** from the machine description file `md'. *** 363,390 **** printf ("#include \"config.h\"\n"); printf ("#include \"system.h\"\n"); printf ("#include \"coretypes.h\"\n"); ! printf ("#include \"tm.h\"\n"); printf ("#include \"insn-config.h\"\n"); - printf ("#include \"hash-set.h\"\n"); - printf ("#include \"machmode.h\"\n"); - printf ("#include \"vec.h\"\n"); - printf ("#include \"double-int.h\"\n"); - printf ("#include \"input.h\"\n"); printf ("#include \"alias.h\"\n"); - printf ("#include \"symtab.h\"\n"); - printf ("#include \"wide-int.h\"\n"); - printf ("#include \"inchash.h\"\n"); - printf ("#include \"tree.h\"\n"); printf ("#include \"varasm.h\"\n"); printf ("#include \"stor-layout.h\"\n"); printf ("#include \"calls.h\"\n"); - printf ("#include \"rtl.h\"\n"); printf ("#include \"tm_p.h\"\n"); printf ("#include \"regs.h\"\n"); printf ("#include \"output.h\"\n"); printf ("#include \"recog.h\"\n"); printf ("#include \"except.h\"\n"); - printf ("#include \"function.h\"\n"); printf ("#include \"diagnostic-core.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"tm-constrs.h\"\n\n"); --- 363,381 ---- printf ("#include \"config.h\"\n"); printf ("#include \"system.h\"\n"); printf ("#include \"coretypes.h\"\n"); ! printf ("#include \"backend.h\"\n"); ! printf ("#include \"tree.h\"\n"); ! printf ("#include \"rtl.h\"\n"); printf ("#include \"insn-config.h\"\n"); printf ("#include \"alias.h\"\n"); printf ("#include \"varasm.h\"\n"); printf ("#include \"stor-layout.h\"\n"); printf ("#include \"calls.h\"\n"); printf ("#include \"tm_p.h\"\n"); printf ("#include \"regs.h\"\n"); printf ("#include \"output.h\"\n"); printf ("#include \"recog.h\"\n"); printf ("#include \"except.h\"\n"); printf ("#include \"diagnostic-core.h\"\n"); printf ("#include \"flags.h\"\n"); printf ("#include \"tm-constrs.h\"\n\n"); Index: genpreds.c =================================================================== *** genpreds.c (revision 225452) --- genpreds.c (working copy) *************** write_insn_preds_c (void) *** 1523,1559 **** #include \"config.h\"\n\ #include \"system.h\"\n\ #include \"coretypes.h\"\n\ ! #include \"tm.h\"\n\ #include \"rtl.h\"\n\ - #include \"hash-set.h\"\n\ - #include \"machmode.h\"\n\ - #include \"hash-map.h\"\n\ - #include \"vec.h\"\n\ - #include \"double-int.h\"\n\ - #include \"input.h\"\n\ #include \"alias.h\"\n\ - #include \"symtab.h\"\n\ - #include \"wide-int.h\"\n\ - #include \"inchash.h\"\n\ - #include \"tree.h\"\n\ #include \"varasm.h\"\n\ #include \"stor-layout.h\"\n\ #include \"calls.h\"\n\ #include \"tm_p.h\"\n\ - #include \"hashtab.h\"\n\ - #include \"hash-set.h\"\n\ - #include \"vec.h\"\n\ - #include \"machmode.h\"\n\ - #include \"hard-reg-set.h\"\n\ - #include \"input.h\"\n\ - #include \"function.h\"\n\ #include \"insn-config.h\"\n\ #include \"recog.h\"\n\ #include \"output.h\"\n\ #include \"flags.h\"\n\ ! #include \"hard-reg-set.h\"\n\ ! #include \"predict.h\"\n\ ! #include \"basic-block.h\"\n\ #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ #include \"reload.h\"\n\ --- 1523,1541 ---- #include \"config.h\"\n\ #include \"system.h\"\n\ #include \"coretypes.h\"\n\ ! #include \"backend.h\"\n\ ! #include \"tree.h\"\n\ #include \"rtl.h\"\n\ #include \"alias.h\"\n\ #include \"varasm.h\"\n\ #include \"stor-layout.h\"\n\ #include \"calls.h\"\n\ #include \"tm_p.h\"\n\ #include \"insn-config.h\"\n\ #include \"recog.h\"\n\ #include \"output.h\"\n\ #include \"flags.h\"\n\ ! #include \"df.h\"\n\ #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ #include \"reload.h\"\n\ Index: genrecog.c =================================================================== *** genrecog.c (revision 225452) --- genrecog.c (working copy) *************** write_header (void) *** 4179,4208 **** #include \"config.h\"\n\ #include \"system.h\"\n\ #include \"coretypes.h\"\n\ ! #include \"tm.h\"\n\ #include \"rtl.h\"\n\ #include \"tm_p.h\"\n\ - #include \"hashtab.h\"\n\ - #include \"hash-set.h\"\n\ - #include \"vec.h\"\n\ - #include \"machmode.h\"\n\ - #include \"hard-reg-set.h\"\n\ - #include \"input.h\"\n\ - #include \"function.h\"\n\ #include \"emit-rtl.h\"\n\ #include \"insn-config.h\"\n\ #include \"recog.h\"\n\ #include \"output.h\"\n\ #include \"flags.h\"\n\ ! #include \"hard-reg-set.h\"\n\ ! #include \"predict.h\"\n\ ! #include \"basic-block.h\"\n\ #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ #include \"reload.h\"\n\ #include \"regs.h\"\n\ #include \"tm-constrs.h\"\n\ - #include \"predict.h\"\n\ \n"); puts ("\n\ --- 4179,4198 ---- #include \"config.h\"\n\ #include \"system.h\"\n\ #include \"coretypes.h\"\n\ ! #include \"backend.h\"\n\ #include \"rtl.h\"\n\ #include \"tm_p.h\"\n\ #include \"emit-rtl.h\"\n\ #include \"insn-config.h\"\n\ #include \"recog.h\"\n\ #include \"output.h\"\n\ #include \"flags.h\"\n\ ! #include \"df.h\"\n\ #include \"resource.h\"\n\ #include \"diagnostic-core.h\"\n\ #include \"reload.h\"\n\ #include \"regs.h\"\n\ #include \"tm-constrs.h\"\n\ \n"); puts ("\n\ [-- Attachment #4: 9-all.patch.Z --] [-- Type: application/x-compress, Size: 87307 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 9/9] Final patch with all changes 2015-07-07 13:51 ` [patch 9/9] Final patch with all changes Andrew MacLeod @ 2015-07-07 22:03 ` Pedro Alves 2015-07-07 22:10 ` Andrew MacLeod 0 siblings, 1 reply; 22+ messages in thread From: Pedro Alves @ 2015-07-07 22:03 UTC (permalink / raw) To: Andrew MacLeod, gcc-patches On 07/07/2015 02:51 PM, Andrew MacLeod wrote: > *** sel-sched-ir.h (revision 225452) > --- sel-sched-ir.h (working copy) > *************** along with GCC; see the file COPYING3. > *** 22,34 **** > #define GCC_SEL_SCHED_IR_H > > /* For state_t. */ > - #include "insn-attr.h" > - #include "regset.h" > /* For reg_note. */ > - #include "rtl.h" > - #include "bitmap.h" > - #include "sched-int.h" > - #include "cfgloop.h" > Should probably drop those "For state_t/reg_note." comments too. Thanks, Pedro Alves ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 9/9] Final patch with all changes 2015-07-07 22:03 ` Pedro Alves @ 2015-07-07 22:10 ` Andrew MacLeod 0 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 22:10 UTC (permalink / raw) To: Pedro Alves, gcc-patches On 07/07/2015 06:03 PM, Pedro Alves wrote: > On 07/07/2015 02:51 PM, Andrew MacLeod wrote: >> *** sel-sched-ir.h (revision 225452) >> --- sel-sched-ir.h (working copy) >> *************** along with GCC; see the file COPYING3. >> *** 22,34 **** >> #define GCC_SEL_SCHED_IR_H >> >> /* For state_t. */ >> - #include "insn-attr.h" >> - #include "regset.h" >> /* For reg_note. */ >> - #include "rtl.h" >> - #include "bitmap.h" >> - #include "sched-int.h" >> - #include "cfgloop.h" >> > Should probably drop those "For state_t/reg_note." comments too. > > Thanks, > Pedro Alves Ah right. Previous version had them removed. Missed them when I rebuilt the patch. Thanks Andrew ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 0/9] Flattening and initial module rebuilding 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod ` (8 preceding siblings ...) 2015-07-07 13:51 ` [patch 9/9] Final patch with all changes Andrew MacLeod @ 2015-07-07 22:21 ` Jeff Law 2015-07-07 23:53 ` Andrew MacLeod 9 siblings, 1 reply; 22+ messages in thread From: Jeff Law @ 2015-07-07 22:21 UTC (permalink / raw) To: Andrew MacLeod, gcc-patches On 07/07/2015 07:40 AM, Andrew MacLeod wrote: > This is a series of 9 patches which does some flattening, some module > building, and some basic cleanups. > > I am presenting them as 9 patches for easier review. The latter couple > of patches affect a lot of the same files that follow on patches then > adjust, I've decided NOT to put the automated changes in with each of > those patches. > > There are 8 patches showing the key changes, and then the 9th patch is > an aggregate of the first 8 key changes, plus the final result of the > impact on all the source files. This is the only patch I'd like to commit. > > The automated tools which generate the source changes have been > significantly enhanced. When a header is flattened, the source file is > checked for the existence of the headers which need moving, and any > which are already present are left if they are in the right order. Any > duplicate are also removed. > > A similar process is used when an aggregation file like backend.h or > ssa.h is processed. Any occurrences of the aggregated headers are > removed from the source file so there are no duplicates. The aggregated > headers are typically only placed in a source file if 3 or more of the > headers would be replaced. (ie, if only bitmap.h is included, I don't > just blindly put backend.h in the file.) This number came from > analysis of a fully flattened and include-reduced tree, and seemed to be > the sweet spot. > > With the aggregation and flattening, the order of some includes can > get shifted around with other files in between, so the tools also ensure > there is a "blessed" order which will make sure than any pre-reqs are > always available. Right now, its primarily: > > config.h > system.h > coretypes.h > backend.h > tree.h > gimple.h > rtl.h > df.h > ssa.h > > And if any of the aggregators are not present, then any headers which > make up the aggregator are in the same relative position. > > The tools actually produced all these patches with no tweaking to solve > compilation failures.. which was very helpful. The old ones needed some > guidance and were a bit finicky. > > I can adjust any of this quite easily, or present them in a different > way if you don't like it this way. Again, my goal is to check in just > the final patch which does all the work of first 8 patches. It would > be a lot less turmoil on the branch. I can do it in smaller chunks if > need be. The set of 9 patches is fine for the trunk. Just a few discussion points... One of the things I keep thinking about as these changes fly by is your scripts. Is there a reasonable possibility for you to add your scripts to the contrib/ directory or something similar to aid us in any future header file refactoring? Yes, I know that in theory we should never have to do this again, but I also know that reality can be rather different. Presumably the aggregators, by policy, are to have #includes and nothing else, right? If so, we might want a comment to that effect in them. It's a bit of a shame that function.h is in backend.h, along with predict (which is presumably needed by basic-block/cfg?). Jeff ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 0/9] Flattening and initial module rebuilding 2015-07-07 22:21 ` [patch 0/9] Flattening and initial module rebuilding Jeff Law @ 2015-07-07 23:53 ` Andrew MacLeod 2015-07-08 22:43 ` Jeff Law 0 siblings, 1 reply; 22+ messages in thread From: Andrew MacLeod @ 2015-07-07 23:53 UTC (permalink / raw) To: Jeff Law, gcc-patches On 07/07/2015 06:21 PM, Jeff Law wrote: > On 07/07/2015 07:40 AM, Andrew MacLeod wrote: >> >> I can adjust any of this quite easily, or present them in a different >> way if you don't like it this way. Again, my goal is to check in just >> the final patch which does all the work of first 8 patches. It would >> be a lot less turmoil on the branch. I can do it in smaller chunks if >> need be. > The set of 9 patches is fine for the trunk. Just a few discussion > points... > > One of the things I keep thinking about as these changes fly by is > your scripts. Is there a reasonable possibility for you to add your > scripts to the contrib/ directory or something similar to aid us in > any future header file refactoring? Yes, I know that in theory we > should never have to do this again, but I also know that reality can > be rather different. yes, with a bit of tweaking and enhancement they can be generally useful. They are all in python. And no one is allowed to make comments like "OMG thats so inefficient" or "what a horrible way to do that" :-) My goal was getting things done and sometimes the brute force approach works great when the machine sare fast enough :_) > > Presumably the aggregators, by policy, are to have #includes and > nothing else, right? If so, we might want a comment to that effect in > them. Yeah, will do. > > It's a bit of a shame that function.h is in backend.h, along with > predict (which is presumably needed by basic-block/cfg?). > Yeah,once things settle down someone could tweak things more. If I make the tools available, people can do their own analysis and adjusting. function.h provides cfun which is used all over the place..9 backend header files use it,and a few like gimple.h actually require struct function to be defined. predict.h is actually required by gimple.h for a few reasons, enum be_predictor is used in parameter lists and a few inlines use the TAKEN, NOT_TAKEN macros Its also needed by cfghooks.h, and betwen those 2 files, its just needed by a very good chunk of the backend. .. 219 of the 263 files which include backend.h need it. We could move the 2 enums and TAKEN/NOT_TAKEN to coretypes or something like that and it would probably cut the requirements for it by a *lot*. Andrew For the sake of amusement, here's the output from my initial include reduction logs for each file. Its basically all the unique errors produced by trying to remove the header from every source file in libbackend.a: predict.h: gimple_h : use of enum âbr_predictorâ without previous declaration gimple_h : use of enum âpredictionâ without previous declaration gimple_h : âTAKENâ was not declared in this scope gimple_h : âNOT_TAKENâ was not declared in this scope cfghooks_h : use of enum âbr_predictorâ without previous declaration (1) : predict_h -> cfghooks_h use of enum âbr_predictorâ without previous declaration (4) : predict_h -> gimple_h use of enum âbr_predictorâ without previous declaration use of enum âpredictionâ without previous declaration âTAKENâ was not declared in this scope âNOT_TAKENâ was not declared in this scope function.h: emit_rtl_h : field âexprâ has incomplete type âexpr_statusâ emit_rtl_h : field âemitâ has incomplete type âemit_statusâ emit_rtl_h : field âvarasmâ has incomplete type âvarasm_statusâ emit_rtl_h : field âsubsectionsâ has incomplete type âfunction_subsectionsâ emit_rtl_h : field âehâ has incomplete type ârtl_ehâ emit_rtl_h : invalid use of incomplete type âstruct sequence_stackâ gimple_h : invalid use of incomplete type âstruct functionâ gimple_ssa_h : invalid use of incomplete type âconst struct functionâ gimple_ssa_h : âcfunâ was not declared in this scope tree_ssanames_h : âcfunâ was not declared in this scope cfgloop_h : âloops_for_fnâ was not declared in this scope cfgloop_h : âcurrent_loopsâ was not declared in this scope cfgloop_h : âcfunâ was not declared in this scope cilk_h : invalid use of incomplete type âstruct functionâ ssa_iterators_h : âcfunâ was not declared in this scope tree_scalar_evolution_h : âcfunâ was not declared in this scope (1) : function_h -> tree_scalar_evolution_h âcfunâ was not declared in this scope (1) : function_h -> tree_ssanames_h âcfunâ was not declared in this scope (1) : function_h -> ssa_iterators_h âcfunâ was not declared in this scope (1) : function_h -> cilk_h invalid use of incomplete type âstruct functionâ (1) : function_h -> gimple_h invalid use of incomplete type âstruct functionâ (2) : function_h -> gimple_ssa_h invalid use of incomplete type âconst struct functionâ âcfunâ was not declared in this scope (3) : function_h -> cfgloop_h âloops_for_fnâ was not declared in this scope âcurrent_loopsâ was not declared in this scope âcfunâ was not declared in this scope (6) : function_h -> emit_rtl_h field âexprâ has incomplete type âexpr_statusâ field âemitâ has incomplete type âemit_statusâ field âvarasmâ has incomplete type âvarasm_statusâ field âsubsectionsâ has incomplete type âfunction_subsectionsâ field âehâ has incomplete type ârtl_ehâ invalid use of incomplete type âstruct sequence_stackâ ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 0/9] Flattening and initial module rebuilding 2015-07-07 23:53 ` Andrew MacLeod @ 2015-07-08 22:43 ` Jeff Law 2015-07-09 2:43 ` Andrew MacLeod 0 siblings, 1 reply; 22+ messages in thread From: Jeff Law @ 2015-07-08 22:43 UTC (permalink / raw) To: Andrew MacLeod, gcc-patches On 07/07/2015 05:53 PM, Andrew MacLeod wrote: > yes, with a bit of tweaking and enhancement they can be generally > useful. They are all in python. And no one is allowed to make comments > like "OMG thats so inefficient" or "what a horrible way to do that" > :-) My goal was getting things done and sometimes the brute force > approach works great when the machine sare fast enough :_) Works for me... I'm sure Martin S. is cringing at my python scripts right now, so I completely understand. >> It's a bit of a shame that function.h is in backend.h, along with >> predict (which is presumably needed by basic-block/cfg?). >> > > Yeah,once things settle down someone could tweak things more. If I make > the tools available, people can do their own analysis and adjusting. > > function.h provides cfun which is used all over the place..9 backend > header files use it,and a few like gimple.h actually require struct > function to be defined. Right. I suspect that we may want to look at cleaning that up a bit in the future. There's bits in there that are relatively backend specific, some bits that look like front-end things, and cfun which is a context container. Untangling that mess is likely to be painful. > > predict.h is actually required by gimple.h for a few reasons, enum > be_predictor is used in parameter lists and a few inlines use the TAKEN, > NOT_TAKEN macros > Its also needed by cfghooks.h, and betwen those 2 files, its just needed > by a very good chunk of the backend. .. 219 of the 263 files which > include backend.h need it. > We could move the 2 enums and TAKEN/NOT_TAKEN to coretypes or something > like that and it would probably cut the requirements for it by a *lot*. Might be something for a follow-up (moving the enums). Jeff ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 0/9] Flattening and initial module rebuilding 2015-07-08 22:43 ` Jeff Law @ 2015-07-09 2:43 ` Andrew MacLeod 2015-07-09 16:29 ` Jeff Law 2015-07-09 17:06 ` Andrew MacLeod 0 siblings, 2 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-09 2:43 UTC (permalink / raw) To: Jeff Law, gcc-patches On 07/08/2015 06:43 PM, Jeff Law wrote: > On 07/07/2015 05:53 PM, Andrew MacLeod wrote: >> yes, with a bit of tweaking and enhancement they can be generally >> useful. They are all in python. And no one is allowed to make comments >> like "OMG thats so inefficient" or "what a horrible way to do that" >> :-) My goal was getting things done and sometimes the brute force >> approach works great when the machine sare fast enough :_) > Works for me... I'm sure Martin S. is cringing at my python scripts > right now, so I completely understand. > yeah, dmalcolm is not allowed to look at them :-) > >> >> predict.h is actually required by gimple.h for a few reasons, enum >> be_predictor is used in parameter lists and a few inlines use the TAKEN, >> NOT_TAKEN macros >> Its also needed by cfghooks.h, and betwen those 2 files, its just needed >> by a very good chunk of the backend. .. 219 of the 263 files which >> include backend.h need it. >> We could move the 2 enums and TAKEN/NOT_TAKEN to coretypes or something >> like that and it would probably cut the requirements for it by a *lot*. > Might be something for a follow-up (moving the enums). > > blah, not so trivial. One of the primary things predict.h does is create enum br_predictor by including predict,def.. so moving that enum doesnt really make sense. Fixing gimple,h isn't too bad, I could split the prediction stuff out into gimple-predict.h and include it in the 4 places its needed (as you might be able to tell, Ive tried this :-) However, it doesn't do much good. cfghooks.h is included by basic-block.h.. which is needed virtually everywhere :-P There are just 2 entries in the hooks table which require 'enum br_predictor', but I dont think it makes sense to move things out of the cfghook structure.. I suppose once could create a prediction_hooks structure.. and put it in predict_hooks.h... but I think thats probably going to far to avoid including a file which makes some logical sense.. The other option is to pull cfghooks.h out of basic-block.h and include it seperately on its own.. What is the reason its in there now? It appears to not have a cyclic dependency which is the usual reason to have an include in the middle of a file. Or perhaps the reason no longer exists? There is a comment at the top of cfghooks.h : /* Only basic-block.h includes this. */ but no rationale. I moved it to the very bottom of the file and everything still seems to compile fine I can try flattening it out of basic-block.h and only including it in places that need it... that should eliminate the need to put predict.h in a lot of places I would think. Andrew ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 0/9] Flattening and initial module rebuilding 2015-07-09 2:43 ` Andrew MacLeod @ 2015-07-09 16:29 ` Jeff Law 2015-07-09 17:06 ` Andrew MacLeod 1 sibling, 0 replies; 22+ messages in thread From: Jeff Law @ 2015-07-09 16:29 UTC (permalink / raw) To: Andrew MacLeod, gcc-patches On 07/08/2015 08:42 PM, Andrew MacLeod wrote: > blah, not so trivial. One of the primary things predict.h does is > create enum br_predictor by including predict,def.. so moving that enum > doesnt really make sense. > > Fixing gimple,h isn't too bad, I could split the prediction stuff out > into gimple-predict.h and include it in the 4 places its needed (as you > might be able to tell, Ive tried this :-) > > However, it doesn't do much good. cfghooks.h is included by > basic-block.h.. which is needed virtually everywhere :-P I don't guess we're approaching a world where the front-ends don't need basic-block (and thus cfghooks, predictions, etc etc). > The other option is to pull cfghooks.h out of basic-block.h and include > it seperately on its own.. What is the reason its in there now? It > appears to not have a cyclic dependency which is the usual reason to > have an include in the middle of a file. Or perhaps the reason no > longer exists? There is a comment at the top of cfghooks.h : > /* Only basic-block.h includes this. */ > but no rationale. I don't recall. It may have seemed to make sense at the time :-) You'd have to do the archaeology and even if you did, you might not get an answer. > > I moved it to the very bottom of the file and everything still seems to > compile fine I can try flattening it out of basic-block.h and only > including it in places that need it... that should eliminate the need to > put predict.h in a lot of places I would think. If it's not too much trouble, seems like it might be worth trying. It just feels like the prediction bits shouldn't be that pervasive. jeff ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 0/9] Flattening and initial module rebuilding 2015-07-09 2:43 ` Andrew MacLeod 2015-07-09 16:29 ` Jeff Law @ 2015-07-09 17:06 ` Andrew MacLeod 2015-07-09 17:48 ` Jeff Law 1 sibling, 1 reply; 22+ messages in thread From: Andrew MacLeod @ 2015-07-09 17:06 UTC (permalink / raw) To: Jeff Law, gcc-patches [-- Attachment #1: Type: text/plain, Size: 3932 bytes --] On 07/08/2015 10:42 PM, Andrew MacLeod wrote: > On 07/08/2015 06:43 PM, Jeff Law wrote: >>> predict.h is actually required by gimple.h for a few reasons, enum >>> be_predictor is used in parameter lists and a few inlines use the >>> TAKEN, >>> NOT_TAKEN macros >>> Its also needed by cfghooks.h, and betwen those 2 files, its just >>> needed >>> by a very good chunk of the backend. .. 219 of the 263 files which >>> include backend.h need it. >>> We could move the 2 enums and TAKEN/NOT_TAKEN to coretypes or something >>> like that and it would probably cut the requirements for it by a *lot*. >> Might be something for a follow-up (moving the enums). >> >> > blah, not so trivial. One of the primary things predict.h does is > create enum br_predictor by including predict,def.. so moving that > enum doesnt really make sense. > > Fixing gimple,h isn't too bad, I could split the prediction stuff out > into gimple-predict.h and include it in the 4 places its needed (as > you might be able to tell, Ive tried this :-) > > However, it doesn't do much good. cfghooks.h is included by > basic-block.h.. which is needed virtually everywhere :-P > > There are just 2 entries in the hooks table which require 'enum > br_predictor', but I dont think it makes sense to move things out of > the cfghook structure.. I suppose once could create a prediction_hooks > structure.. and put it in predict_hooks.h... but I think thats > probably going to far to avoid including a file which makes some > logical sense.. > > The other option is to pull cfghooks.h out of basic-block.h and > include it seperately on its own.. What is the reason its in there > now? It appears to not have a cyclic dependency which is the usual > reason to have an include in the middle of a file. Or perhaps the > reason no longer exists? There is a comment at the top of cfghooks.h : > /* Only basic-block.h includes this. */ > but no rationale. > > I moved it to the very bottom of the file and everything still seems > to compile fine I can try flattening it out of basic-block.h and > only including it in places that need it... that should eliminate the > need to put predict.h in a lot of places I would think. > ok, so the results are in. a bit painful to unravel :-) these are the steps - Splitting the prediction bits of gimple.h out to gimple-predict.h and putting that file where it matters (5 files as it turns out) - Next split cfghooks.h out from basic-block.h and put it in the files that it is needed in. - then I moved predict.h out of backend.h I added it as an include to cfghooks.h and gimple-predict.h and adjusted source files accordingly.. - Finally, try to remove the extraneous cfghooks.h and predict.h files. caveat, I did no reductions on config/* files nor on languages beyond stage1 builds... havent gotten to enhancing to tool to deal with that yet.. its coming as a part of the general include reduction.. so I'll havdle these bits then. . Then result using numbers which exclude those caveat files: predict.h ends up in 68 files out of the original 179 it was in by itself. . ( ie excluding files with cfghooks.h or gimple-predict.h) cfghooks.h ends up in 89 of the original 268 that basic-block was present in. The total result affect 227 files. Now, predict.h is *still* more pervasive than it needs to be, but thats a different patch :-). There are a set of routines in there like optimize_{fucntion,loop,edge,bb}_for{speed,size}_p() that are the reason half the files need it. those should probably be moved somewhere else since they aren't really prediction related :-P Maybe a better spot will show up when the rest of the include reductions are done. I've attached a patch. It bootstraps on x86_64-unknown-linux-gnu, and I'm running regressions. To be safe, I'll run config-list.mk overnight to be sure. assuming its all fine, OK for trunk then? Andrew [-- Attachment #2: predict.patch.Z --] [-- Type: application/x-compress, Size: 21201 bytes --] ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 0/9] Flattening and initial module rebuilding 2015-07-09 17:06 ` Andrew MacLeod @ 2015-07-09 17:48 ` Jeff Law 2015-07-09 18:00 ` Andrew MacLeod 0 siblings, 1 reply; 22+ messages in thread From: Jeff Law @ 2015-07-09 17:48 UTC (permalink / raw) To: Andrew MacLeod, gcc-patches On 07/09/2015 11:06 AM, Andrew MacLeod wrote: > On 07/08/2015 10:42 PM, Andrew MacLeod wrote: >> On 07/08/2015 06:43 PM, Jeff Law wrote: >>>> predict.h is actually required by gimple.h for a few reasons, enum >>>> be_predictor is used in parameter lists and a few inlines use the >>>> TAKEN, >>>> NOT_TAKEN macros >>>> Its also needed by cfghooks.h, and betwen those 2 files, its just >>>> needed >>>> by a very good chunk of the backend. .. 219 of the 263 files which >>>> include backend.h need it. >>>> We could move the 2 enums and TAKEN/NOT_TAKEN to coretypes or something >>>> like that and it would probably cut the requirements for it by a *lot*. >>> Might be something for a follow-up (moving the enums). >>> >>> >> blah, not so trivial. One of the primary things predict.h does is >> create enum br_predictor by including predict,def.. so moving that >> enum doesnt really make sense. >> >> Fixing gimple,h isn't too bad, I could split the prediction stuff out >> into gimple-predict.h and include it in the 4 places its needed (as >> you might be able to tell, Ive tried this :-) >> >> However, it doesn't do much good. cfghooks.h is included by >> basic-block.h.. which is needed virtually everywhere :-P >> >> There are just 2 entries in the hooks table which require 'enum >> br_predictor', but I dont think it makes sense to move things out of >> the cfghook structure.. I suppose once could create a prediction_hooks >> structure.. and put it in predict_hooks.h... but I think thats >> probably going to far to avoid including a file which makes some >> logical sense.. >> >> The other option is to pull cfghooks.h out of basic-block.h and >> include it seperately on its own.. What is the reason its in there >> now? It appears to not have a cyclic dependency which is the usual >> reason to have an include in the middle of a file. Or perhaps the >> reason no longer exists? There is a comment at the top of cfghooks.h : >> /* Only basic-block.h includes this. */ >> but no rationale. >> >> I moved it to the very bottom of the file and everything still seems >> to compile fine I can try flattening it out of basic-block.h and >> only including it in places that need it... that should eliminate the >> need to put predict.h in a lot of places I would think. >> > > ok, so the results are in. a bit painful to unravel :-) these are the > steps > - Splitting the prediction bits of gimple.h out to gimple-predict.h and > putting that file where it matters (5 files as it turns out) > - Next split cfghooks.h out from basic-block.h and put it in the files > that it is needed in. > - then I moved predict.h out of backend.h I added it as an include to > cfghooks.h and gimple-predict.h and adjusted source files accordingly.. > - Finally, try to remove the extraneous cfghooks.h and predict.h files. > > caveat, I did no reductions on config/* files nor on languages beyond > stage1 builds... havent gotten to enhancing to tool to deal with that > yet.. its coming as a part of the general include reduction.. so I'll > havdle these bits then. . > Then result using numbers which exclude those caveat files: > predict.h ends up in 68 files out of the original 179 it was in by > itself. . ( ie excluding files with cfghooks.h or gimple-predict.h) > cfghooks.h ends up in 89 of the original 268 that basic-block was > present in. > > The total result affect 227 files. > > Now, predict.h is *still* more pervasive than it needs to be, but thats > a different patch :-). There are a set of routines in there like > optimize_{fucntion,loop,edge,bb}_for{speed,size}_p() that are the > reason half the files need it. those should probably be moved > somewhere else since they aren't really prediction related :-P Maybe a > better spot will show up when the rest of the include reductions are done. > > I've attached a patch. It bootstraps on x86_64-unknown-linux-gnu, and > I'm running regressions. To be safe, I'll run config-list.mk overnight > to be sure. > assuming its all fine, OK for trunk then? OK assuming everything is fine with your overnight run. BTW, you're showing your age -- a .Z file... Thankfully gzip will handle that just fine. (And yes, I realize the irony here that gzip is probably considered ancient as well given bzip2 and xz). jeff ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [patch 0/9] Flattening and initial module rebuilding 2015-07-09 17:48 ` Jeff Law @ 2015-07-09 18:00 ` Andrew MacLeod 0 siblings, 0 replies; 22+ messages in thread From: Andrew MacLeod @ 2015-07-09 18:00 UTC (permalink / raw) To: Jeff Law, gcc-patches On 07/09/2015 01:49 PM, Jeff Law wrote: > On 07/09/2015 11:06 AM, Andrew MacLeod wrote: >> >> The total result affect 227 files. >> >> Now, predict.h is *still* more pervasive than it needs to be, but thats >> a different patch :-). There are a set of routines in there like >> optimize_{fucntion,loop,edge,bb}_for{speed,size}_p() that are the >> reason half the files need it. those should probably be moved >> somewhere else since they aren't really prediction related :-P Maybe a >> better spot will show up when the rest of the include reductions are >> done. >> >> I've attached a patch. It bootstraps on x86_64-unknown-linux-gnu, and >> I'm running regressions. To be safe, I'll run config-list.mk overnight >> to be sure. >> assuming its all fine, OK for trunk then? > OK assuming everything is fine with your overnight run. > > BTW, you're showing your age -- a .Z file... Thankfully gzip will > handle that just fine. (And yes, I realize the irony here that gzip > is probably considered ancient as well given bzip2 and xz). > Ha. I just type compress and move on. :-) but yeah, lookitthat. bzip2 is about 40% the size :-) ok, maybe next time :-) If i remember... Andrew ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2015-07-09 18:00 UTC | newest] Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-07-07 13:40 [patch 0/9] Flattening and initial module rebuilding Andrew MacLeod 2015-07-07 13:43 ` [patch 1/9] header additions and aggregators Andrew MacLeod 2015-07-07 13:44 ` [patch 2/9] flatten regset.h Andrew MacLeod 2015-07-07 13:45 ` [patch 3/9] Flatten lra-int.h Andrew MacLeod 2015-07-07 13:46 ` [patch 5/9] Flatten ira-int.h Andrew MacLeod 2015-07-07 13:46 ` [patch 4/9] Flatten sel-sched-dump.h and sel-sched-ir.h Andrew MacLeod 2015-07-07 14:01 ` Alexander Monakov 2015-07-07 14:07 ` Andrew MacLeod 2015-07-07 13:47 ` [patch 6/9] Flatten gimple-streamer.h Andrew MacLeod 2015-07-07 13:49 ` [patch 7/9] Flatten cfgloop.h Andrew MacLeod 2015-07-07 13:50 ` [patch 8/9] Flatten df.h Andrew MacLeod 2015-07-07 13:51 ` [patch 9/9] Final patch with all changes Andrew MacLeod 2015-07-07 22:03 ` Pedro Alves 2015-07-07 22:10 ` Andrew MacLeod 2015-07-07 22:21 ` [patch 0/9] Flattening and initial module rebuilding Jeff Law 2015-07-07 23:53 ` Andrew MacLeod 2015-07-08 22:43 ` Jeff Law 2015-07-09 2:43 ` Andrew MacLeod 2015-07-09 16:29 ` Jeff Law 2015-07-09 17:06 ` Andrew MacLeod 2015-07-09 17:48 ` Jeff Law 2015-07-09 18:00 ` Andrew MacLeod
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).