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.

	* 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"

Reply via email to