Another basoc-block inclusion. cfgloop.h was including basic-block.h, which meant lots of other things were getting it from here too.

The only routine in cfgloop.h which uses anything from basic-block.h was bb_loop_depth(). By moving that to cfgloop.c, its no longer required by the .h file. I did have to include function.h for a few routines. I cannot imagine this being hot enough to show up on any performance measure...

bootstraps on x86_64-unknown-linux-gnu with no new regressions. OK?

Andrew

	* cfgloop.h: Include function.h instead of basic-block.h
	(bb_loop_depth): Move to cfgloop.c.
	* cfgloop.c (bb_loop_depth): Relocate from cfgloop.h.

*** T9/cfgloop.h	2013-10-17 14:45:29.067398302 -0400
--- cfgloop.h	2013-10-17 14:55:46.321376841 -0400
*************** along with GCC; see the file COPYING3.
*** 20,30 ****
  #ifndef GCC_CFGLOOP_H
  #define GCC_CFGLOOP_H
  
- #include "basic-block.h"
  #include "double-int.h"
- 
  #include "bitmap.h"
  #include "sbitmap.h"
  
  /* Structure to hold decision about unrolling/peeling.  */
  enum lpt_dec
--- 20,29 ----
  #ifndef GCC_CFGLOOP_H
  #define GCC_CFGLOOP_H
  
  #include "double-int.h"
  #include "bitmap.h"
  #include "sbitmap.h"
+ #include "function.h"
  
  /* Structure to hold decision about unrolling/peeling.  */
  enum lpt_dec
*************** loop_depth (const struct loop *loop)
*** 455,468 ****
    return vec_safe_length (loop->superloops);
  }
  
- /* Returns the loop depth of the loop BB belongs to.  */
- 
- static inline int
- bb_loop_depth (const_basic_block bb)
- {
-   return bb->loop_father ? loop_depth (bb->loop_father) : 0;
- }
- 
  /* Returns the immediate superloop of LOOP, or NULL if LOOP is the outermost
     loop.  */
  
--- 454,459 ----
*************** extern HOST_WIDE_INT get_estimated_loop_
*** 744,749 ****
--- 735,741 ----
  extern HOST_WIDE_INT get_max_loop_iterations_int (struct loop *);
  extern bool get_estimated_loop_iterations (struct loop *loop, double_int *nit);
  extern bool get_max_loop_iterations (struct loop *loop, double_int *nit);
+ extern int bb_loop_depth (const_basic_block);
  
  /* Converts VAL to double_int.  */
  
*** T9/cfgloop.c	2013-10-17 14:45:29.067398302 -0400
--- cfgloop.c	2013-10-17 14:52:57.178383635 -0400
*************** get_max_loop_iterations_int (struct loop
*** 1912,1915 ****
--- 1912,1921 ----
    return hwi_nit < 0 ? -1 : hwi_nit;
  }
  
+ /* Returns the loop depth of the loop BB belongs to.  */
  
+ int
+ bb_loop_depth (const_basic_block bb)
+ {
+   return bb->loop_father ? loop_depth (bb->loop_father) : 0;
+ }

Reply via email to