Commit 79a490a9 by Andreas Jaeger

predict.h: Convert to ISO C90 prototypes.


	* predict.h: Convert to ISO C90 prototypes.
	* predict.c: Likewise.
	* tree-dump.h: Likewise.
	* tree-dump.c: Likewise.
	* diagnostic.h: Likewise.
	* diagnostic.c: Likewise.
	* combine.c: Likewise.

	* rtl.h: Convert prototypes of combine.c to ISO C90.

From-SVN: r67626
parent b4fac6a0
...@@ -99,7 +99,7 @@ typedef struct ...@@ -99,7 +99,7 @@ typedef struct
an output_buffer. A client-supplied formatter returns true if everything an output_buffer. A client-supplied formatter returns true if everything
goes well. */ goes well. */
typedef struct output_buffer output_buffer; typedef struct output_buffer output_buffer;
typedef bool (*printer_fn) PARAMS ((output_buffer *, text_info *)); typedef bool (*printer_fn) (output_buffer *, text_info *);
/* The output buffer datatype. This is best seen as an abstract datatype /* The output buffer datatype. This is best seen as an abstract datatype
whose fields should not be accessed directly by clients. */ whose fields should not be accessed directly by clients. */
...@@ -171,8 +171,8 @@ struct output_buffer ...@@ -171,8 +171,8 @@ struct output_buffer
/* Forward declarations. */ /* Forward declarations. */
typedef struct diagnostic_context diagnostic_context; typedef struct diagnostic_context diagnostic_context;
typedef void (*diagnostic_starter_fn) PARAMS ((diagnostic_context *, typedef void (*diagnostic_starter_fn) (diagnostic_context *,
diagnostic_info *)); diagnostic_info *);
typedef diagnostic_starter_fn diagnostic_finalizer_fn; typedef diagnostic_starter_fn diagnostic_finalizer_fn;
/* This data structure bundles altogether any information relevant to /* This data structure bundles altogether any information relevant to
...@@ -207,7 +207,7 @@ struct diagnostic_context ...@@ -207,7 +207,7 @@ struct diagnostic_context
diagnostic_finalizer_fn end_diagnostic; diagnostic_finalizer_fn end_diagnostic;
/* Client hook to report an internal error. */ /* Client hook to report an internal error. */
void (*internal_error) PARAMS ((const char *, va_list *)); void (*internal_error) (const char *, va_list *);
/* Function of last diagnostic message; more generally, function such that /* Function of last diagnostic message; more generally, function such that
if next diagnostic message is in it then we don't have to mention the if next diagnostic message is in it then we don't have to mention the
...@@ -291,45 +291,39 @@ extern diagnostic_context *global_dc; ...@@ -291,45 +291,39 @@ extern diagnostic_context *global_dc;
#define report_diagnostic(D) diagnostic_report_diagnostic (global_dc, D) #define report_diagnostic(D) diagnostic_report_diagnostic (global_dc, D)
/* Diagnostic related functions. */ /* Diagnostic related functions. */
extern void diagnostic_initialize PARAMS ((diagnostic_context *)); extern void diagnostic_initialize (diagnostic_context *);
extern void diagnostic_report_current_module PARAMS ((diagnostic_context *)); extern void diagnostic_report_current_module (diagnostic_context *);
extern void diagnostic_report_current_function PARAMS ((diagnostic_context *)); extern void diagnostic_report_current_function (diagnostic_context *);
extern void diagnostic_flush_buffer PARAMS ((diagnostic_context *)); extern void diagnostic_flush_buffer (diagnostic_context *);
extern void diagnostic_report_diagnostic PARAMS ((diagnostic_context *, extern void diagnostic_report_diagnostic (diagnostic_context *,
diagnostic_info *)); diagnostic_info *);
extern void diagnostic_set_info PARAMS ((diagnostic_info *, extern void diagnostic_set_info (diagnostic_info *, const char *, va_list *,
const char *, va_list *, const char *, int, diagnostic_t);
const char *, int, extern char *diagnostic_build_prefix (diagnostic_info *);
diagnostic_t));
extern char *diagnostic_build_prefix PARAMS ((diagnostic_info *));
/* Pure text formatting support functions. */ /* Pure text formatting support functions. */
extern void init_output_buffer PARAMS ((output_buffer *, extern void init_output_buffer (output_buffer *, const char *, int);
const char *, int)); extern void output_clear (output_buffer *);
extern void output_clear PARAMS ((output_buffer *)); extern const char *output_last_position (const output_buffer *);
extern const char *output_last_position PARAMS ((const output_buffer *)); extern void output_set_prefix (output_buffer *, const char *);
extern void output_set_prefix PARAMS ((output_buffer *, extern void output_destroy_prefix (output_buffer *);
const char *)); extern void output_set_maximum_length (output_buffer *, int);
extern void output_destroy_prefix PARAMS ((output_buffer *)); extern void output_emit_prefix (output_buffer *);
extern void output_set_maximum_length PARAMS ((output_buffer *, int)); extern void output_add_newline (output_buffer *);
extern void output_emit_prefix PARAMS ((output_buffer *)); extern void output_add_space (output_buffer *);
extern void output_add_newline PARAMS ((output_buffer *)); extern int output_space_left (const output_buffer *);
extern void output_add_space PARAMS ((output_buffer *)); extern void output_append (output_buffer *, const char *, const char *);
extern int output_space_left PARAMS ((const output_buffer *)); extern void output_add_character (output_buffer *, int);
extern void output_append PARAMS ((output_buffer *, const char *, extern void output_decimal (output_buffer *, int);
const char *)); extern void output_add_string (output_buffer *, const char *);
extern void output_add_character PARAMS ((output_buffer *, int)); extern void output_add_identifier (output_buffer *, tree);
extern void output_decimal PARAMS ((output_buffer *, int)); extern const char *output_finalize_message (output_buffer *);
extern void output_add_string PARAMS ((output_buffer *, extern void output_clear_message_text (output_buffer *);
const char *)); extern void output_printf (output_buffer *, const char *, ...)
extern void output_add_identifier PARAMS ((output_buffer *, tree)); ATTRIBUTE_PRINTF_2;
extern const char *output_finalize_message PARAMS ((output_buffer *));
extern void output_clear_message_text PARAMS ((output_buffer *));
extern void output_printf PARAMS ((output_buffer *, const char *,
...)) ATTRIBUTE_PRINTF_2;
extern void output_verbatim (output_buffer *, const char *, ...); extern void output_verbatim (output_buffer *, const char *, ...);
extern void verbatim (const char *, ...); extern void verbatim (const char *, ...);
extern char *file_name_as_prefix PARAMS ((const char *)); extern char *file_name_as_prefix (const char *);
extern void inform PARAMS ((const char *, ...)); extern void inform (const char *, ...);
#endif /* ! GCC_DIAGNOSTIC_H */ #endif /* ! GCC_DIAGNOSTIC_H */
/* This file contains the definitions and documentation for the /* This file contains the definitions and documentation for the
builtins used in the GNU compiler. builtins used in the GNU compiler.
Copyright (C) 2001 Free Software Foundation, Inc. Copyright (C) 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -37,13 +37,11 @@ enum prediction ...@@ -37,13 +37,11 @@ enum prediction
/* Flags for NOTE_PREDICTION */ /* Flags for NOTE_PREDICTION */
#define IS_TAKEN 1 /* Predict edges to the block as taken. */ #define IS_TAKEN 1 /* Predict edges to the block as taken. */
extern void predict_insn_def PARAMS ((rtx, enum br_predictor, extern void predict_insn_def (rtx, enum br_predictor, enum prediction);
enum prediction)); extern void predict_insn (rtx, enum br_predictor, int);
extern void predict_insn PARAMS ((rtx, enum br_predictor, int));
/* Avoid unneeded dependency on basic_block.h */ /* Avoid unneeded dependency on basic_block.h */
#ifdef BASIC_BLOCK #ifdef BASIC_BLOCK
extern void predict_edge PARAMS ((edge, enum br_predictor, int)); extern void predict_edge (edge, enum br_predictor, int);
extern void predict_edge_def PARAMS ((edge, enum br_predictor, extern void predict_edge_def (edge, enum br_predictor, enum prediction);
enum prediction));
#endif #endif
...@@ -2087,12 +2087,12 @@ extern rtx delete_insn_and_edges PARAMS ((rtx)); ...@@ -2087,12 +2087,12 @@ extern rtx delete_insn_and_edges PARAMS ((rtx));
extern void delete_insn_chain_and_edges PARAMS ((rtx, rtx)); extern void delete_insn_chain_and_edges PARAMS ((rtx, rtx));
/* In combine.c */ /* In combine.c */
extern int combine_instructions PARAMS ((rtx, unsigned int)); extern int combine_instructions (rtx, unsigned int);
extern unsigned int extended_count PARAMS ((rtx, enum machine_mode, int)); extern unsigned int extended_count (rtx, enum machine_mode, int);
extern rtx remove_death PARAMS ((unsigned int, rtx)); extern rtx remove_death (unsigned int, rtx);
#ifdef BUFSIZ #ifdef BUFSIZ
extern void dump_combine_stats PARAMS ((FILE *)); extern void dump_combine_stats (FILE *);
extern void dump_combine_total_stats PARAMS ((FILE *)); extern void dump_combine_total_stats (FILE *);
#endif #endif
/* In sched.c. */ /* In sched.c. */
......
...@@ -30,21 +30,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -30,21 +30,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tree-dump.h" #include "tree-dump.h"
#include "langhooks.h" #include "langhooks.h"
static unsigned int queue PARAMS ((dump_info_p, tree, int)); static unsigned int queue (dump_info_p, tree, int);
static void dump_index PARAMS ((dump_info_p, unsigned int)); static void dump_index (dump_info_p, unsigned int);
static void dequeue_and_dump PARAMS ((dump_info_p)); static void dequeue_and_dump (dump_info_p);
static void dump_new_line PARAMS ((dump_info_p)); static void dump_new_line (dump_info_p);
static void dump_maybe_newline PARAMS ((dump_info_p)); static void dump_maybe_newline (dump_info_p);
static void dump_string_field PARAMS ((dump_info_p, const char *, const char *)); static void dump_string_field (dump_info_p, const char *, const char *);
/* Add T to the end of the queue of nodes to dump. Returns the index /* Add T to the end of the queue of nodes to dump. Returns the index
assigned to T. */ assigned to T. */
static unsigned int static unsigned int
queue (di, t, flags) queue (dump_info_p di, tree t, int flags)
dump_info_p di;
tree t;
int flags;
{ {
dump_queue_p dq; dump_queue_p dq;
dump_node_info_p dni; dump_node_info_p dni;
...@@ -82,9 +79,7 @@ queue (di, t, flags) ...@@ -82,9 +79,7 @@ queue (di, t, flags)
} }
static void static void
dump_index (di, index) dump_index (dump_info_p di, unsigned int index)
dump_info_p di;
unsigned int index;
{ {
fprintf (di->stream, "@%-6u ", index); fprintf (di->stream, "@%-6u ", index);
di->column += 8; di->column += 8;
...@@ -95,11 +90,7 @@ dump_index (di, index) ...@@ -95,11 +90,7 @@ dump_index (di, index)
index of T is printed. */ index of T is printed. */
void void
queue_and_dump_index (di, field, t, flags) queue_and_dump_index (dump_info_p di, const char *field, tree t, int flags)
dump_info_p di;
const char *field;
tree t;
int flags;
{ {
unsigned int index; unsigned int index;
splay_tree_node n; splay_tree_node n;
...@@ -127,9 +118,7 @@ queue_and_dump_index (di, field, t, flags) ...@@ -127,9 +118,7 @@ queue_and_dump_index (di, field, t, flags)
/* Dump the type of T. */ /* Dump the type of T. */
void void
queue_and_dump_type (di, t) queue_and_dump_type (dump_info_p di, tree t)
dump_info_p di;
tree t;
{ {
queue_and_dump_index (di, "type", TREE_TYPE (t), DUMP_NONE); queue_and_dump_index (di, "type", TREE_TYPE (t), DUMP_NONE);
} }
...@@ -143,8 +132,7 @@ queue_and_dump_type (di, t) ...@@ -143,8 +132,7 @@ queue_and_dump_type (di, t)
place to start printing more fields. */ place to start printing more fields. */
static void static void
dump_new_line (di) dump_new_line (dump_info_p di)
dump_info_p di;
{ {
fprintf (di->stream, "\n%*s", SOL_COLUMN, ""); fprintf (di->stream, "\n%*s", SOL_COLUMN, "");
di->column = SOL_COLUMN; di->column = SOL_COLUMN;
...@@ -153,8 +141,7 @@ dump_new_line (di) ...@@ -153,8 +141,7 @@ dump_new_line (di)
/* If necessary, insert a new line. */ /* If necessary, insert a new line. */
static void static void
dump_maybe_newline (di) dump_maybe_newline (dump_info_p di)
dump_info_p di;
{ {
int extra; int extra;
...@@ -172,10 +159,7 @@ dump_maybe_newline (di) ...@@ -172,10 +159,7 @@ dump_maybe_newline (di)
/* Dump pointer PTR using FIELD to identify it. */ /* Dump pointer PTR using FIELD to identify it. */
void void
dump_pointer (di, field, ptr) dump_pointer (dump_info_p di, const char *field, void *ptr)
dump_info_p di;
const char *field;
void *ptr;
{ {
dump_maybe_newline (di); dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-8lx ", field, (long) ptr); fprintf (di->stream, "%-4s: %-8lx ", field, (long) ptr);
...@@ -185,10 +169,7 @@ dump_pointer (di, field, ptr) ...@@ -185,10 +169,7 @@ dump_pointer (di, field, ptr)
/* Dump integer I using FIELD to identify it. */ /* Dump integer I using FIELD to identify it. */
void void
dump_int (di, field, i) dump_int (dump_info_p di, const char *field, int i)
dump_info_p di;
const char *field;
int i;
{ {
dump_maybe_newline (di); dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-7d ", field, i); fprintf (di->stream, "%-4s: %-7d ", field, i);
...@@ -198,9 +179,7 @@ dump_int (di, field, i) ...@@ -198,9 +179,7 @@ dump_int (di, field, i)
/* Dump the string S. */ /* Dump the string S. */
void void
dump_string (di, string) dump_string (dump_info_p di, const char *string)
dump_info_p di;
const char *string;
{ {
dump_maybe_newline (di); dump_maybe_newline (di);
fprintf (di->stream, "%-13s ", string); fprintf (di->stream, "%-13s ", string);
...@@ -213,10 +192,7 @@ dump_string (di, string) ...@@ -213,10 +192,7 @@ dump_string (di, string)
/* Dump the string field S. */ /* Dump the string field S. */
static void static void
dump_string_field (di, field, string) dump_string_field (dump_info_p di, const char *field, const char *string)
dump_info_p di;
const char *field;
const char *string;
{ {
dump_maybe_newline (di); dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-7s ", field, string); fprintf (di->stream, "%-4s: %-7s ", field, string);
...@@ -229,8 +205,7 @@ dump_string_field (di, field, string) ...@@ -229,8 +205,7 @@ dump_string_field (di, field, string)
/* Dump the next node in the queue. */ /* Dump the next node in the queue. */
static void static void
dequeue_and_dump (di) dequeue_and_dump (dump_info_p di)
dump_info_p di;
{ {
dump_queue_p dq; dump_queue_p dq;
splay_tree_node stn; splay_tree_node stn;
...@@ -277,7 +252,7 @@ dequeue_and_dump (di) ...@@ -277,7 +252,7 @@ dequeue_and_dump (di)
tree bases = BINFO_BASETYPES (t); tree bases = BINFO_BASETYPES (t);
unsigned n_bases = bases ? TREE_VEC_LENGTH (bases): 0; unsigned n_bases = bases ? TREE_VEC_LENGTH (bases): 0;
tree accesses = BINFO_BASEACCESSES (t); tree accesses = BINFO_BASEACCESSES (t);
dump_child ("type", BINFO_TYPE (t)); dump_child ("type", BINFO_TYPE (t));
if (TREE_VIA_VIRTUAL (t)) if (TREE_VIA_VIRTUAL (t))
...@@ -299,11 +274,11 @@ dequeue_and_dump (di) ...@@ -299,11 +274,11 @@ dequeue_and_dump (di)
string = "priv"; string = "priv";
else else
abort (); abort ();
dump_string (di, string); dump_string (di, string);
queue_and_dump_index (di, "binf", base, DUMP_BINFO); queue_and_dump_index (di, "binf", base, DUMP_BINFO);
} }
goto done; goto done;
} }
...@@ -616,10 +591,7 @@ dequeue_and_dump (di) ...@@ -616,10 +591,7 @@ dequeue_and_dump (di)
/* Return nonzero if FLAG has been specified for the dump, and NODE /* Return nonzero if FLAG has been specified for the dump, and NODE
is not the root node of the dump. */ is not the root node of the dump. */
int dump_flag (di, flag, node) int dump_flag (dump_info_p di, int flag, tree node)
dump_info_p di;
int flag;
tree node;
{ {
return (di->flags & flag) && (node != di->node); return (di->flags & flag) && (node != di->node);
} }
...@@ -627,10 +599,7 @@ int dump_flag (di, flag, node) ...@@ -627,10 +599,7 @@ int dump_flag (di, flag, node)
/* Dump T, and all its children, on STREAM. */ /* Dump T, and all its children, on STREAM. */
void void
dump_node (t, flags, stream) dump_node (tree t, int flags, FILE *stream)
tree t;
int flags;
FILE *stream;
{ {
struct dump_info di; struct dump_info di;
dump_queue_p dq; dump_queue_p dq;
...@@ -707,9 +676,7 @@ static const struct dump_option_value_info dump_options[] = ...@@ -707,9 +676,7 @@ static const struct dump_option_value_info dump_options[] =
Multiple calls will reopen and append to the dump file. */ Multiple calls will reopen and append to the dump file. */
FILE * FILE *
dump_begin (phase, flag_ptr) dump_begin (enum tree_dump_index phase, int *flag_ptr)
enum tree_dump_index phase;
int *flag_ptr;
{ {
FILE *stream; FILE *stream;
char *name; char *name;
...@@ -733,8 +700,7 @@ dump_begin (phase, flag_ptr) ...@@ -733,8 +700,7 @@ dump_begin (phase, flag_ptr)
/* Returns nonzero if tree dump PHASE is enabled. */ /* Returns nonzero if tree dump PHASE is enabled. */
int int
dump_enabled_p (phase) dump_enabled_p (enum tree_dump_index phase)
enum tree_dump_index phase;
{ {
return dump_files[phase].state; return dump_files[phase].state;
} }
...@@ -742,8 +708,7 @@ dump_enabled_p (phase) ...@@ -742,8 +708,7 @@ dump_enabled_p (phase)
/* Returns the switch name of PHASE. */ /* Returns the switch name of PHASE. */
const char * const char *
dump_flag_name (phase) dump_flag_name (enum tree_dump_index phase)
enum tree_dump_index phase;
{ {
return dump_files[phase].swtch; return dump_files[phase].swtch;
} }
...@@ -752,9 +717,7 @@ dump_flag_name (phase) ...@@ -752,9 +717,7 @@ dump_flag_name (phase)
dump_begin. */ dump_begin. */
void void
dump_end (phase, stream) dump_end (enum tree_dump_index phase ATTRIBUTE_UNUSED, FILE *stream)
enum tree_dump_index phase ATTRIBUTE_UNUSED;
FILE *stream;
{ {
fclose (stream); fclose (stream);
} }
...@@ -763,8 +726,7 @@ dump_end (phase, stream) ...@@ -763,8 +726,7 @@ dump_end (phase, stream)
relevant details in the dump_files array. */ relevant details in the dump_files array. */
int int
dump_switch_p (arg) dump_switch_p (const char *arg)
const char *arg;
{ {
unsigned ix; unsigned ix;
const char *option_value; const char *option_value;
......
/* Tree-dumping functionality for intermediate representation. /* Tree-dumping functionality for intermediate representation.
Copyright (C) 1999, 2000 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com> Written by Mark Mitchell <mark@codesourcery.com>
This file is part of GCC. This file is part of GCC.
...@@ -77,19 +77,12 @@ struct dump_info ...@@ -77,19 +77,12 @@ struct dump_info
#define dump_child(field, child) \ #define dump_child(field, child) \
queue_and_dump_index (di, field, child, DUMP_NONE) queue_and_dump_index (di, field, child, DUMP_NONE)
extern void dump_pointer extern void dump_pointer (dump_info_p, const char *, void *);
PARAMS ((dump_info_p, const char *, void *)); extern void dump_int (dump_info_p, const char *, int);
extern void dump_int extern void dump_string (dump_info_p, const char *);
PARAMS ((dump_info_p, const char *, int)); extern void dump_stmt (dump_info_p, tree);
extern void dump_string extern void dump_next_stmt (dump_info_p, tree);
PARAMS ((dump_info_p, const char *)); extern void queue_and_dump_index (dump_info_p, const char *, tree, int);
extern void dump_stmt extern void queue_and_dump_type (dump_info_p, tree);
PARAMS ((dump_info_p, tree));
extern void dump_next_stmt
PARAMS ((dump_info_p, tree));
extern void queue_and_dump_index
PARAMS ((dump_info_p, const char *, tree, int));
extern void queue_and_dump_type
PARAMS ((dump_info_p, tree));
#endif /* ! GCC_TREE_DUMP_H */ #endif /* ! GCC_TREE_DUMP_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment