public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Miscellaneous prototypes
@ 1998-02-18  4:16 Bernd Schmidt
  0 siblings, 0 replies; only message in thread
From: Bernd Schmidt @ 1998-02-18  4:16 UTC (permalink / raw)
  To: egcs

This patch adds a few prototypes throughout the code.

Bernd

	* c-lang.c: Include "c-tree.h". Include <stdio.h> immediately after
	"config.h".
	* c-lex.c (is_class_name): Delete declaration.
	(whitespace_cr): Make static and add prototype.
	* c-lex.h (make_pointer_declarator, reinit_parse_for_function,
	yylex, get_directive_line): Turn declarations into prototypes.
	(position_after_whitespace, check_newline, yyerror,
	forget_protocol_qualifiers, remember_protocol_qualifiers): Add
	prototypes.
	* c-parse.in (yyerror): Delete declaration.
	* genattr.c (extend_range, write_upcase, gen_attr, write_units): Add
	prototypes.
	* gencodes.c (gen_insn): Add prototype.
	* genconfig.c (walk_insn, gen_insn, gen_expand, gen_split,
	gen_peephole): Add prototypes.
	* genflags.c (num_operands, gen_proto, gen_nonproto, gen_insn): Add
	prototypes.
	* gengenrtl.c (type_from_format, accessor_from_format, special_rtx,
	special_format, find_formats, gendecl, genmacro, gendef, genlegend,
	genheader, gencode): Add prototypes.
	* genopinit.c (gen_insn): Add prototype.
	* genoutput.c (output_prologue, output_epilogue, scan_operands,
	process_template, validate_insn_alternatives, gen_insn, gen_peephole,
	gen_expand, gen_split, n_occurrences): Add prototypes.
	* genpeep.c (match_rtx, print_path, print_code): Turn declarations
	into prototypes.
	(gen_peephole): Add prototype.
	* loop.c (find_and_verify_loops, mark_loop_jump, prescan_loop,
	reg_in_basic_block_p, consec_sets_invariant_p, libcall_other_reg,
	labels_in_range_p, count_loop_regs_set, note_addr_stored,
	loop_reg_used_before_p, scan_loop, replace_call_address,
	skip_consec_insns, libcall_benefit, ignore_some_movables,
	force_movables, combine_movables, rtx_equal_for_loop_p, move_movables,
	strength_reduce, valid_initial_value_p, find_mem_givs, record_biv,
	check_final_value, record_giv, update_giv_derive, basic_induction_var,
	simplify_giv_expr, general_induction_var, consec_sets_giv,
	check_dbra_loop, express_from, combine_givs_p, combine_givs,
	product_cheap_p, maybe_eliminate_biv, maybe_eliminate_biv_1,
	last_use_this_basic_block, record_initial, update_reg_last_use,
	iteration_info, analyze_loop_iterations, insert_bct,
	instrument_loop_bct, indirect_jump_in_function_p): Turn declarations
	into prototypes.

Index: c-lang.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/c-lang.c,v
retrieving revision 1.1.3.4
diff -c -p -r1.1.3.4 c-lang.c
*** c-lang.c	1998/02/16 19:03:22	1.1.3.4
--- c-lang.c	1998/02/17 13:27:36
*************** Boston, MA 02111-1307, USA.  */
*** 20,27 ****
  
  
  #include "config.h"
- #include "tree.h"
  #include <stdio.h>
  #include "input.h"
  
  /* Each of the functions defined here
--- 20,28 ----
  
  
  #include "config.h"
  #include <stdio.h>
+ #include "tree.h"
+ #include "c-tree.h"
  #include "input.h"
  
  /* Each of the functions defined here
Index: c-lex.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/c-lex.c,v
retrieving revision 1.1.3.4
diff -c -p -r1.1.3.4 c-lex.c
*** c-lex.c	1998/02/05 16:43:12	1.1.3.4
--- c-lex.c	1998/02/17 13:04:19
*************** tree lastiddecl;
*** 112,119 ****
  
  int doing_objc_thang;
  
- extern tree is_class_name ();
- 
  extern int yydebug;
  
  /* File used for outputting assembler code.  */
--- 112,117 ----
*************** static int nextchar = -1;
*** 148,153 ****
--- 146,152 ----
  #ifdef HANDLE_SYSV_PRAGMA
  static int handle_sysv_pragma		PROTO((int));
  #endif /* HANDLE_SYSV_PRAGMA */
+ static int whitespace_cr		PROTO((int));
  static int skip_white_space		PROTO((int));
  static char *extend_token_buffer	PROTO((char *));
  static int readescape			PROTO((int *));
*************** yyprint (file, yychar, yylval)
*** 353,359 ****
  \f
  /* Iff C is a carriage return, warn about it - if appropriate -
     and return nonzero.  */
! int
  whitespace_cr (c)
       int c;
  {
--- 352,358 ----
  \f
  /* Iff C is a carriage return, warn about it - if appropriate -
     and return nonzero.  */
! static int
  whitespace_cr (c)
       int c;
  {
Index: c-lex.h
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/c-lex.h,v
retrieving revision 1.1.3.1
diff -c -p -r1.1.3.1 c-lex.h
*** c-lex.h	1998/02/05 12:31:18	1.1.3.1
--- c-lex.h	1998/02/17 13:05:30
*************** extern tree lastiddecl;
*** 73,80 ****
  
  extern char *token_buffer;	/* Pointer to token buffer.  */
  
! extern tree make_pointer_declarator ();
! extern void reinit_parse_for_function ();
! extern int yylex ();
  
! extern char *get_directive_line ();
--- 73,87 ----
  
  extern char *token_buffer;	/* Pointer to token buffer.  */
  
! extern tree make_pointer_declarator PROTO((tree, tree));
! extern void reinit_parse_for_function PROTO((void));
! extern void position_after_whitespace PROTO((void));
! extern int check_newline PROTO((void));
  
! extern int yylex PROTO((void));
! extern void yyerror PROTO((char *));
! 
! extern char *get_directive_line PROTO((FILE *));
! 
! extern void forget_protocol_qualifiers PROTO((void));
! extern void remember_protocol_qualifiers PROTO((void));
Index: c-parse.in
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/c-parse.in,v
retrieving revision 1.1.3.2
diff -c -p -r1.1.3.2 c-parse.in
*** c-parse.in	1998/02/05 15:47:20	1.1.3.2
--- c-parse.in	1998/02/17 12:59:24
*************** end ifc
*** 92,99 ****
  extern int errno;
  #endif
  
- void yyerror ();
- 
  /* Like YYERROR but do call yyerror.  */
  #define YYERROR1 { yyerror ("syntax error"); YYERROR; }
  
--- 92,97 ----
Index: genattr.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/genattr.c,v
retrieving revision 1.1.3.2
diff -c -p -r1.1.3.2 genattr.c
*** genattr.c	1998/02/16 19:04:09	1.1.3.2
--- genattr.c	1998/02/17 13:18:03
*************** struct function_unit
*** 64,69 ****
--- 64,75 ----
    struct range issue_delay;	/* Range of issue delay values.  */
  };
  
+ static void extend_range PROTO((struct range *, int, int));
+ static void write_upcase PROTO((char *));
+ static void gen_attr PROTO((rtx));
+ static void write_units PROTO((int, struct range *, struct range *,
+ 			       struct range *, struct range *,
+ 			       struct range *));
  static void
  extend_range (range, min, max)
       struct range *range;
Index: gencodes.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/gencodes.c,v
retrieving revision 1.1.3.1
diff -c -p -r1.1.3.1 gencodes.c
*** gencodes.c	1998/02/05 12:31:40	1.1.3.1
--- gencodes.c	1998/02/17 13:20:20
*************** void fancy_abort ();
*** 42,47 ****
--- 42,49 ----
  
  static int insn_code_number;
  
+ static void gen_insn PROTO((rtx));
+ 
  static void
  gen_insn (insn)
       rtx insn;
Index: genconfig.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/genconfig.c,v
retrieving revision 1.1.3.3
diff -c -p -r1.1.3.3 genconfig.c
*** genconfig.c	1998/02/16 19:04:13	1.1.3.3
--- genconfig.c	1998/02/17 13:21:47
*************** char *xmalloc ();
*** 57,62 ****
--- 57,68 ----
  static void fatal ();
  void fancy_abort ();
  
+ static void walk_insn_part PROTO((rtx, int, int));
+ static void gen_insn PROTO((rtx));
+ static void gen_expand PROTO((rtx));
+ static void gen_split PROTO((rtx));
+ static void gen_peephole PROTO((rtx));
+ 
  /* RECOG_P will be non-zero if this pattern was seen in a context where it will
     be used to recognize, rather than just generate an insn. 
  
Index: genflags.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/genflags.c,v
retrieving revision 1.1.3.2
diff -c -p -r1.1.3.2 genflags.c
*** genflags.c	1998/02/16 19:04:17	1.1.3.2
--- genflags.c	1998/02/17 13:19:38
*************** static struct obstack call_obstack, norm
*** 53,58 ****
--- 53,64 ----
  /* Max size of names encountered.  */
  static int max_id_len;
  
+ static int num_operands PROTO((rtx));
+ static void gen_proto PROTO((rtx));
+ static void gen_nonproto PROTO((rtx));
+ static void gen_insn PROTO((rtx));
+ 
+ 
  /* Count the number of match_operand's found.  */
  
  static int
Index: gengenrtl.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/gengenrtl.c,v
retrieving revision 1.1.3.2
diff -c -p -r1.1.3.2 gengenrtl.c
*** gengenrtl.c	1998/02/05 16:30:05	1.1.3.2
--- gengenrtl.c	1998/02/17 13:40:48
*************** struct rtx_definition defs[] = 
*** 48,53 ****
--- 48,65 ----
  
  const char *formats[NUM_RTX_CODE];
  
+ static const char *type_from_format PROTO((char));
+ static const char *accessor_from_format PROTO((char));
+ static int special_format PROTO((const char *));
+ static int special_rtx PROTO((int));
+ static void find_formats PROTO((void));
+ static void gendecl PROTO((FILE *, const char *));
+ static void genmacro PROTO((FILE *, int));
+ static void gendef PROTO((FILE *, const char *));
+ static void genlegend PROTO((FILE *));
+ static void genheader PROTO((FILE *));
+ static void gencode PROTO((FILE *));
+ 
  static const char *
  type_from_format (c)
       char c;
Index: genopinit.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/genopinit.c,v
retrieving revision 1.1.3.3
diff -c -p -r1.1.3.3 genopinit.c
*** genopinit.c	1998/02/16 19:04:18	1.1.3.3
--- genopinit.c	1998/02/17 13:44:24
*************** char *optabs[] =
*** 133,138 ****
--- 133,140 ----
  /* Allow linking with print-rtl.c.  */
  char **insn_name_ptr;
  
+ static void gen_insn PROTO((rtx));
+ 
  static void
  gen_insn (insn)
       rtx insn;
Index: genoutput.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/genoutput.c,v
retrieving revision 1.1.3.3
diff -c -p -r1.1.3.3 genoutput.c
*** genoutput.c	1998/02/16 19:04:19	1.1.3.3
--- genoutput.c	1998/02/17 13:43:55
*************** int have_constraints;
*** 176,185 ****
  
  static int have_error;
  \f
  static void
  output_prologue ()
  {
- 
    printf ("/* Generated automatically by the program `genoutput'\n\
  from the machine description file `md'.  */\n\n");
  
--- 176,195 ----
  
  static int have_error;
  \f
+ static void output_prologue PROTO((void));
+ static void output_epilogue PROTO((void));
+ static void scan_operands PROTO((rtx, int, int));
+ static void process_template PROTO((struct data *, char *));
+ static void validate_insn_alternatives PROTO((struct data *));
+ static void gen_insn PROTO((rtx));
+ static void gen_peephole PROTO((rtx));
+ static void gen_expand PROTO((rtx));
+ static void gen_split PROTO((rtx));
+ static int n_occurrences PROTO((int, char *));
+ \f
  static void
  output_prologue ()
  {
    printf ("/* Generated automatically by the program `genoutput'\n\
  from the machine description file `md'.  */\n\n");
  
Index: genpeep.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/genpeep.c,v
retrieving revision 1.1.3.5
diff -c -p -r1.1.3.5 genpeep.c
*** genpeep.c	1998/02/16 19:04:19	1.1.3.5
--- genpeep.c	1998/02/17 13:45:49
*************** struct link
*** 51,57 ****
  };
  
  char *xmalloc ();
- static void match_rtx ();
  static void fatal ();
  void fancy_abort ();
  
--- 51,56 ----
*************** static int n_operands;
*** 66,73 ****
  
  static int insn_code_number = 0;
  
! static void print_path ();
! static void print_code ();
  \f
  static void
  gen_peephole (peep)
--- 65,74 ----
  
  static int insn_code_number = 0;
  
! static void gen_peephole PROTO((rtx));
! static void match_rtx PROTO((rtx, struct link *, int));
! static void print_path PROTO((struct link *));
! static void print_code PROTO((RTX_CODE));
  \f
  static void
  gen_peephole (peep)
Index: loop.c
===================================================================
RCS file: /usr/local/cvs/gcc/gcc/loop.c,v
retrieving revision 1.1.3.12
diff -c -p -r1.1.3.12 loop.c
*** loop.c	1998/02/16 19:04:31	1.1.3.12
--- loop.c	1998/02/17 12:50:44
*************** FILE *loop_dump_stream;
*** 275,339 ****
  
  /* Forward declarations.  */
  
! static void find_and_verify_loops ();
! static void mark_loop_jump ();
! static void prescan_loop ();
! static int reg_in_basic_block_p ();
! static int consec_sets_invariant_p ();
! static rtx libcall_other_reg ();
! static int labels_in_range_p ();
! static void count_loop_regs_set ();
! static void note_addr_stored ();
! static int loop_reg_used_before_p ();
! static void scan_loop ();
  #if 0
! static void replace_call_address ();
  #endif
! static rtx skip_consec_insns ();
! static int libcall_benefit ();
! static void ignore_some_movables ();
! static void force_movables ();
! static void combine_movables ();
! static int rtx_equal_for_loop_p ();
! static void move_movables ();
! static void strength_reduce ();
! static int valid_initial_value_p ();
! static void find_mem_givs ();
! static void record_biv ();
! static void check_final_value ();
! static void record_giv ();
! static void update_giv_derive ();
! static int basic_induction_var ();
! static rtx simplify_giv_expr ();
! static int general_induction_var ();
! static int consec_sets_giv ();
! static int check_dbra_loop ();
! static rtx express_from ();
! static int combine_givs_p ();
! static void combine_givs ();
! static int product_cheap_p ();
! static int maybe_eliminate_biv ();
! static int maybe_eliminate_biv_1 ();
! static int last_use_this_basic_block ();
! static void record_initial ();
! static void update_reg_last_use ();
  
  #ifdef HAIFA
  /* This is extern from unroll.c */
! void iteration_info ();
  
  /* Two main functions for implementing bct:
     first - to be called before loop unrolling, and the second - after */
! static void analyze_loop_iterations ();
! static void insert_bct ();
  
  /* Auxiliary function that inserts the bct pattern into the loop */
! static void instrument_loop_bct ();
  #endif  /* HAIFA */
  
  /* Indirect_jump_in_function is computed once per function.  */
  int indirect_jump_in_function = 0;
! static int indirect_jump_in_function_p ();
  
  \f
  /* Relative gain of eliminating various kinds of operations.  */
--- 275,339 ----
  
  /* Forward declarations.  */
  
! static void find_and_verify_loops PROTO((rtx));
! static void mark_loop_jump PROTO((rtx, int));
! static void prescan_loop PROTO((rtx, rtx));
! static int reg_in_basic_block_p PROTO((rtx, rtx));
! static int consec_sets_invariant_p PROTO((rtx, int, rtx));
! static rtx libcall_other_reg PROTO((rtx, rtx));
! static int labels_in_range_p PROTO((rtx, int));
! static void count_loop_regs_set PROTO((rtx, rtx, char *, rtx *, int *, int));
! static void note_addr_stored PROTO((rtx));
! static int loop_reg_used_before_p PROTO((rtx, rtx, rtx, rtx, rtx));
! static void scan_loop PROTO((rtx, rtx, int, int));
  #if 0
! static void replace_call_address PROTO(());
  #endif
! static rtx skip_consec_insns PROTO((rtx, int));
! static int libcall_benefit PROTO((rtx));
! static void ignore_some_movables PROTO((struct movable *));
! static void force_movables PROTO((struct movable *));
! static void combine_movables PROTO((struct movable *, int));
! static int rtx_equal_for_loop_p PROTO((rtx, rtx, struct movable *));
! static void move_movables PROTO((struct movable *, int, int, rtx, rtx, int));
! static void strength_reduce PROTO((rtx, rtx, rtx, int, rtx, rtx, int));
! static int valid_initial_value_p PROTO((rtx, rtx, int, rtx));
! static void find_mem_givs PROTO((rtx, rtx, int, rtx, rtx));
! static void record_biv PROTO((struct induction *, rtx, rtx, rtx, rtx, int, int));
! static void check_final_value PROTO((struct induction *, rtx, rtx));
! static void record_giv PROTO((struct induction *, rtx, rtx, rtx, rtx, rtx, int, enum g_types, int, rtx *, rtx, rtx));
! static void update_giv_derive PROTO((rtx));
! static int basic_induction_var PROTO((rtx, enum machine_mode, rtx, rtx, rtx *, rtx *));
! static rtx simplify_giv_expr PROTO((rtx, int *));
! static int general_induction_var PROTO((rtx, rtx *, rtx *, rtx *));
! static int consec_sets_giv PROTO((int, rtx, rtx, rtx, rtx *, rtx *));
! static int check_dbra_loop PROTO((rtx, int, rtx));
! static rtx express_from PROTO((struct induction *, struct induction *));
! static int combine_givs_p PROTO((struct induction *, struct induction *));
! static void combine_givs PROTO((struct iv_class *));
! static int product_cheap_p PROTO((rtx, rtx));
! static int maybe_eliminate_biv PROTO((struct iv_class *, rtx, rtx, int, int, int));
! static int maybe_eliminate_biv_1 PROTO((rtx, rtx, struct iv_class *, int, rtx));
! static int last_use_this_basic_block PROTO((rtx, rtx));
! static void record_initial PROTO((rtx, rtx));
! static void update_reg_last_use PROTO((rtx, rtx));
  
  #ifdef HAIFA
  /* This is extern from unroll.c */
! extern void iteration_info PROTO((rtx, rtx *, rtx *, rtx, rtx));
  
  /* Two main functions for implementing bct:
     first - to be called before loop unrolling, and the second - after */
! static void analyze_loop_iterations PROTO((rtx, rtx));
! static void insert_bct PROTO((rtx, rtx));
  
  /* Auxiliary function that inserts the bct pattern into the loop */
! static void instrument_loop_bct PROTO((rtx, rtx, rtx));
  #endif  /* HAIFA */
  
  /* Indirect_jump_in_function is computed once per function.  */
  int indirect_jump_in_function = 0;
! static int indirect_jump_in_function_p PROTO((rtx));
  
  \f
  /* Relative gain of eliminating various kinds of operations.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-02-18  4:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-18  4:16 Miscellaneous prototypes Bernd Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).