This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove the redundant prototypes - Revision 2



You need to modify Makefile.in so that tree-ssa-loop.o depends upon
tree-vectorizer.h.
Thanks Ian. The updated patch adds tree-vectorizer.h to be depended by tree-ssa-loop.o.

It also fix another problem. vect_set_verbosity_level is declared both at tree.h and tree-vectorizer.h, and it is called from opts.c. Keep the prototype at tree.h will make opts.c to depend upon less header files. The redundant one is removed from tree-vectorizer.h.

Test on i686-pc-linux-gnu.

Ok for trunk?

Thanks
Pearly

2009-07-02  Shujing Zhao  <pearly.zhao@oracle.com>

	* basic-block.h (dump_regset, debug_regset): Remove duplicate
	prototypes.
	* c-objc-common.h (c_initialize_diagnostics): Ditto.
	* ebitmap.h (dump_ebitmap): Ditto.
	* optabs.h (optab_libfunc): Ditto.
	* tree.h (tree_expr_nonzero_warnv_p): Ditto.
	* tree-flow.h (vect_can_force_dr_alignment_p,
	get_vectype_for_scalar_type): Ditto.	
	(vectorize_loops): Move prototype to ...
	* tree-vectorizer.h: ... here. Also, adjust comment. 
	(vect_set_verbosity_level): Remove duplicate prototypes.
	* tree-ssa-loop.c: Include tree-vectorizer.h.
	* Makefile.in (tree-ssa-loop.o): Depend on tree-vectorizer.h.

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 149360)
+++ Makefile.in	(working copy)
@@ -2308,7 +2308,7 @@ tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(C
 tree-ssa-loop.o : tree-ssa-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
    $(TREE_H) $(RTL_H) $(TM_P_H) hard-reg-set.h $(BASIC_BLOCK_H) output.h \
    $(DIAGNOSTIC_H) $(TREE_FLOW_H) $(TREE_DUMP_H) $(TREE_PASS_H) $(TIMEVAR_H) \
-   $(CFGLOOP_H) $(FLAGS_H) $(TREE_INLINE_H) tree-scalar-evolution.h
+   $(CFGLOOP_H) $(FLAGS_H) $(TREE_INLINE_H) tree-scalar-evolution.h tree-vectorizer.h
 tree-ssa-loop-unswitch.o : tree-ssa-loop-unswitch.c $(TREE_FLOW_H) \
    $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(CFGLOOP_H) \
    $(PARAMS_H) output.h $(DIAGNOSTIC_H) $(TIMEVAR_H) $(TM_H) \
Index: basic-block.h
===================================================================
--- basic-block.h	(revision 149360)
+++ basic-block.h	(working copy)
@@ -857,8 +857,6 @@ extern bool br_prob_note_reliable_p (con
 extern bool predictable_edge_p (edge);
 
 /* In cfg.c  */
-extern void dump_regset (regset, FILE *);
-extern void debug_regset (regset);
 extern void init_flow (struct function *);
 extern void debug_bb (basic_block);
 extern basic_block debug_bb_n (int);
Index: c-objc-common.h
===================================================================
--- c-objc-common.h	(revision 149360)
+++ c-objc-common.h	(working copy)
@@ -21,9 +21,6 @@ along with GCC; see the file COPYING3.  
 #ifndef GCC_C_OBJC_COMMON
 #define GCC_C_OBJC_COMMON
 
-/* In c-objc-common.c.  */
-extern void c_initialize_diagnostics (diagnostic_context *);
-
 /* Lang hooks that are shared between C and ObjC are defined here.  Hooks
    specific to C or ObjC go in c-lang.c and objc/objc-lang.c, respectively.  */
 
Index: ebitmap.h
===================================================================
--- ebitmap.h	(revision 149360)
+++ ebitmap.h	(working copy)
@@ -64,7 +64,6 @@ extern bool ebitmap_equal_p (ebitmap, eb
 extern void ebitmap_clear (ebitmap);
 extern int ebitmap_last_set_bit (ebitmap);
 extern void debug_ebitmap (ebitmap);
-extern void dump_ebitmap (FILE *, ebitmap);
 extern unsigned long ebitmap_popcount(ebitmap, unsigned long);
 
 /* The iterator for ebitmap.  */
Index: optabs.h
===================================================================
--- optabs.h	(revision 149360)
+++ optabs.h	(working copy)
@@ -782,7 +782,6 @@ extern rtx expand_vec_shift_expr (tree, 
 	(&(optab)->handlers[(int) (mode)][(int) (mode2)])
 
 extern rtx optab_libfunc (optab optab, enum machine_mode mode);
-extern rtx optab_libfunc (optab optab, enum machine_mode mode);
 extern rtx convert_optab_libfunc (convert_optab optab, enum machine_mode mode1,
 			          enum machine_mode mode2);
 #endif /* GCC_OPTABS_H */
Index: tree-flow.h
===================================================================
--- tree-flow.h	(revision 149360)
+++ tree-flow.h	(working copy)
@@ -729,11 +729,6 @@ struct tree_niter_desc
   enum tree_code cmp;
 };
 
-/* In tree-vectorizer.c */
-unsigned vectorize_loops (void);
-extern bool vect_can_force_dr_alignment_p (const_tree, unsigned int);
-extern tree get_vectype_for_scalar_type (tree);
-
 /* In tree-ssa-phiopt.c */
 bool empty_block_p (basic_block);
 basic_block *blocks_in_phiopt_order (void);
Index: tree.h
===================================================================
--- tree.h	(revision 149360)
+++ tree.h	(working copy)
@@ -4749,7 +4749,6 @@ extern bool tree_unary_nonzero_warnv_p (
 extern bool tree_binary_nonzero_warnv_p (enum tree_code, tree, tree, tree op1,
                                          bool *);
 extern bool tree_single_nonzero_warnv_p (tree, bool *);
-extern bool tree_expr_nonzero_warnv_p (tree, bool *);
 extern bool tree_unary_nonnegative_warnv_p (enum tree_code, tree, tree, bool *);
 extern bool tree_binary_nonnegative_warnv_p (enum tree_code, tree, tree, tree,
                                              bool *);
Index: tree-ssa-loop.c
===================================================================
--- tree-ssa-loop.c	(revision 149360)
+++ tree-ssa-loop.c	(working copy)
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3.  
 #include "flags.h"
 #include "tree-inline.h"
 #include "tree-scalar-evolution.h"
+#include "tree-vectorizer.h"
 
 /* The loop superpass.  */
 
Index: tree-vectorizer.h
===================================================================
--- tree-vectorizer.h	(revision 149360)
+++ tree-vectorizer.h	(working copy)
@@ -861,8 +861,9 @@ typedef gimple (* vect_recog_func_ptr) (
 #define NUM_PATTERNS 4
 void vect_pattern_recog (loop_vec_info);
 
-/*  Vectorization debug information - in tree-vectorizer.c.  */
+/* In tree-vectorizer.c.  */
+unsigned vectorize_loops (void);
+/* Vectorization debug information */
 extern bool vect_print_dump_info (enum verbosity_levels);
-extern void vect_set_verbosity_level (const char *);
 
 #endif  /* GCC_TREE_VECTORIZER_H  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]