target-def.h should only be included by files that want to initialise targetm.
This patch removes unnecessary includes for other files.

Bootstrapped & regression-tested on x86_64-linux-gnu.  Also tested with
config-list.mk.  Applied as obvious.

Thanks,
Richard


gcc/c-family/
        * c-common.c: Don't include target-def.h.

gcc/
        * df-scan.c: Don't include target-def.h.
        * targhooks.c: Likewise.
        * config/arm/arm-c.c: Likewise.
        * config/i386/i386-c.c: Likewise.
        * config/nds32/nds32-cost.c: Likewise.
        * config/nds32/nds32-fp-as-gp.c: Likewise.
        * config/nds32/nds32-intrinsic.c: Likewise.
        * config/nds32/nds32-isr.c: Likewise.
        * config/nds32/nds32-md-auxiliary.c: Likewise.
        * config/nds32/nds32-memory-manipulation.c: Likewise.
        * config/nds32/nds32-pipelines-auxiliary.c: Likewise.
        * config/nds32/nds32-predicates.c: Likewise.

Index: gcc/c-family/c-common.c
===================================================================
--- gcc/c-family/c-common.c     2015-06-22 14:04:01.749581305 +0100
+++ gcc/c-family/c-common.c     2015-06-22 14:04:25.488049064 +0100
@@ -52,7 +52,6 @@ #define GCC_C_COMMON_C
 #include "function.h"
 #include "ipa-ref.h"
 #include "cgraph.h"
-#include "target-def.h"
 #include "gimplify.h"
 #include "wide-int-print.h"
 #include "gimple-expr.h"
Index: gcc/df-scan.c
===================================================================
--- gcc/df-scan.c       2015-06-22 14:03:11.056500735 +0100
+++ gcc/df-scan.c       2015-06-22 14:04:25.486049193 +0100
@@ -45,7 +45,6 @@ Software Foundation; either version 3, o
 #include "dumpfile.h"
 #include "tree.h"
 #include "target.h"
-#include "target-def.h"
 #include "df.h"
 #include "emit-rtl.h"  /* FIXME: Can go away once crtl is moved to rtl.h.  */
 
Index: gcc/targhooks.c
===================================================================
--- gcc/targhooks.c     2015-06-22 14:03:11.056500735 +0100
+++ gcc/targhooks.c     2015-06-22 14:04:25.486049193 +0100
@@ -72,7 +72,6 @@ Software Foundation; either version 3, o
 #include "diagnostic-core.h"
 #include "target.h"
 #include "tm_p.h"
-#include "target-def.h"
 #include "regs.h"
 #include "reload.h"
 #include "insn-codes.h"
Index: gcc/config/arm/arm-c.c
===================================================================
--- gcc/config/arm/arm-c.c      2015-06-22 14:03:11.056500735 +0100
+++ gcc/config/arm/arm-c.c      2015-06-22 14:04:25.488049064 +0100
@@ -27,7 +27,6 @@
 #include "tm_p.h"
 #include "c-family/c-common.h"
 #include "target.h"
-#include "target-def.h"
 #include "c-family/c-pragma.h"
 
 /* Output C specific EABI object attributes.  These can not be done in
Index: gcc/config/i386/i386-c.c
===================================================================
--- gcc/config/i386/i386-c.c    2015-06-22 14:03:11.056500735 +0100
+++ gcc/config/i386/i386-c.c    2015-06-22 14:04:25.489048999 +0100
@@ -29,7 +29,6 @@ the Free Software Foundation; either ver
 #include "flags.h"
 #include "c-family/c-common.h"
 #include "target.h"
-#include "target-def.h"
 #include "cpplib.h"
 #include "c-family/c-pragma.h"
 
Index: gcc/config/nds32/nds32-cost.c
===================================================================
--- gcc/config/nds32/nds32-cost.c       2015-06-22 14:03:11.056500735 +0100
+++ gcc/config/nds32/nds32-cost.c       2015-06-22 14:04:25.489048999 +0100
@@ -64,7 +64,6 @@
 #include "tm-constrs.h"
 #include "optabs.h"            /* For GEN_FCN.  */
 #include "target.h"
-#include "target-def.h"
 #include "langhooks.h"         /* For add_builtin_function().  */
 #include "builtins.h"
 
Index: gcc/config/nds32/nds32-fp-as-gp.c
===================================================================
--- gcc/config/nds32/nds32-fp-as-gp.c   2015-06-22 14:03:11.056500735 +0100
+++ gcc/config/nds32/nds32-fp-as-gp.c   2015-06-22 14:04:25.489048999 +0100
@@ -64,7 +64,6 @@
 #include "tm-constrs.h"
 #include "optabs.h"            /* For GEN_FCN.  */
 #include "target.h"
-#include "target-def.h"
 #include "langhooks.h"         /* For add_builtin_function().  */
 #include "builtins.h"
 
Index: gcc/config/nds32/nds32-intrinsic.c
===================================================================
--- gcc/config/nds32/nds32-intrinsic.c  2015-06-22 14:03:11.056500735 +0100
+++ gcc/config/nds32/nds32-intrinsic.c  2015-06-22 14:04:25.489048999 +0100
@@ -64,7 +64,6 @@
 #include "tm-constrs.h"
 #include "optabs.h"            /* For GEN_FCN.  */
 #include "target.h"
-#include "target-def.h"
 #include "langhooks.h"         /* For add_builtin_function().  */
 #include "builtins.h"
 
Index: gcc/config/nds32/nds32-isr.c
===================================================================
--- gcc/config/nds32/nds32-isr.c        2015-06-22 14:03:11.056500735 +0100
+++ gcc/config/nds32/nds32-isr.c        2015-06-22 14:04:25.490048935 +0100
@@ -64,7 +64,6 @@
 #include "tm-constrs.h"
 #include "optabs.h"            /* For GEN_FCN.  */
 #include "target.h"
-#include "target-def.h"
 #include "langhooks.h"         /* For add_builtin_function().  */
 #include "builtins.h"
 
Index: gcc/config/nds32/nds32-md-auxiliary.c
===================================================================
--- gcc/config/nds32/nds32-md-auxiliary.c       2015-06-22 14:03:11.056500735 
+0100
+++ gcc/config/nds32/nds32-md-auxiliary.c       2015-06-22 14:04:25.490048935 
+0100
@@ -65,7 +65,6 @@
 #include "tm-constrs.h"
 #include "optabs.h"            /* For GEN_FCN.  */
 #include "target.h"
-#include "target-def.h"
 #include "langhooks.h"         /* For add_builtin_function().  */
 #include "builtins.h"
 
Index: gcc/config/nds32/nds32-memory-manipulation.c
===================================================================
--- gcc/config/nds32/nds32-memory-manipulation.c        2015-06-22 
14:03:11.056500735 +0100
+++ gcc/config/nds32/nds32-memory-manipulation.c        2015-06-22 
14:04:25.490048935 +0100
@@ -65,7 +65,6 @@
 #include "tm-constrs.h"
 #include "optabs.h"            /* For GEN_FCN.  */
 #include "target.h"
-#include "target-def.h"
 #include "langhooks.h"         /* For add_builtin_function().  */
 #include "builtins.h"
 
Index: gcc/config/nds32/nds32-pipelines-auxiliary.c
===================================================================
--- gcc/config/nds32/nds32-pipelines-auxiliary.c        2015-06-22 
14:03:11.056500735 +0100
+++ gcc/config/nds32/nds32-pipelines-auxiliary.c        2015-06-22 
14:04:25.490048935 +0100
@@ -65,7 +65,6 @@
 #include "tm-constrs.h"
 #include "optabs.h"            /* For GEN_FCN.  */
 #include "target.h"
-#include "target-def.h"
 #include "langhooks.h"         /* For add_builtin_function().  */
 #include "builtins.h"
 
Index: gcc/config/nds32/nds32-predicates.c
===================================================================
--- gcc/config/nds32/nds32-predicates.c 2015-06-22 14:03:11.056500735 +0100
+++ gcc/config/nds32/nds32-predicates.c 2015-06-22 14:04:25.491048870 +0100
@@ -64,7 +64,6 @@
 #include "tm-constrs.h"
 #include "optabs.h"            /* For GEN_FCN.  */
 #include "target.h"
-#include "target-def.h"
 #include "langhooks.h"         /* For add_builtin_function().  */
 #include "builtins.h"
 

Reply via email to