On 12/3/12, Diego Novillo <dnovi...@google.com> wrote: > On 2012-12-01 20:44 , Lawrence Crowl wrote: >> Index: gcc/gimple-fold.c >> =================================================================== >> --- gcc/gimple-fold.c (revision 193902) >> +++ gcc/gimple-fold.c (working copy) >> @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. >> #include "tree-ssa-propagate.h" >> #include "target.h" >> #include "gimple-fold.h" >> +#include "gimplify-ctx.h" >> >> /* Return true when DECL can be referenced from current unit. >> FROM_DECL (if non-null) specify constructor of variable DECL was >> taken from. >> Index: gcc/tree-mudflap.c >> =================================================================== >> --- gcc/tree-mudflap.c (revision 193902) >> +++ gcc/tree-mudflap.c (working copy) >> @@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. >> #include "ggc.h" >> #include "cgraph.h" >> #include "gimple.h" >> +#include "gimplify-ctx.h" >> >> extern void add_bb_to_loop (basic_block, struct loop *); >> >> Index: gcc/tree-inline.c >> =================================================================== >> --- gcc/tree-inline.c (revision 193902) >> +++ gcc/tree-inline.c (working copy) >> @@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. >> #include "value-prof.h" >> #include "tree-pass.h" >> #include "target.h" >> +#include "gimplify-ctx.h" > > I don't follow. It seems that factoring into gimplify-ctx.h does > not actually buy much. The files using it are just including > *another* file. Whereas previously, they were getting that > content from gimple.h. > > Unless we can stop including gimple.h from these files, I don't > see a lot of gain in this factoring. Am I missing something?
There at least 70 files that include gimple.h, and only 5 that need gimple-ctx.h. By splitting it out, at least 65 files will not need to parse the gimplify_ctx struct, the gimple_temp_hash_elt struct, the gimplify_hasher template struct, and may not need to include hash-table.h. It's all about avoiding superfluous compilation in other files. -- Lawrence Crowl