Commit 1d088dee by Andreas Jaeger Committed by Andreas Jaeger

gcc.c: Convert prototypes to ISO C90.

	* gcc.c: Convert prototypes to ISO C90.
	* gcc.h: Likewise.
	* gcov-dump.c: Likewise.
	* gcov-iov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.h: Likewise.
	* ggc.h: Likewise.
	* global.c: Likewise.
	* graph.c: Likewise.
	* graph.h: Likewise.
	* hosthooks.h: Likewise.
	* hooks.h: Likewise.
	* hooks.c: Likewise.
	* hashtable.h: Likewise.
	* hashtable.c: Likewise.
	* haifa-sched.c: Likewise.
	* integrate.h: Likewise.
	* integrate.c: Likewise.
	* input.h: Likewise.
	* ifcvt.c: Likewise.

From-SVN: r68995
parent 48166869
2003-07-06 Andreas Jaeger <aj@suse.de>
* gcc.c: Convert prototypes to ISO C90.
* gcc.h: Likewise.
* gcov-dump.c: Likewise.
* gcov-iov.c: Likewise.
* gcse.c: Likewise.
* genattrtab.h: Likewise.
* ggc.h: Likewise.
* global.c: Likewise.
* graph.c: Likewise.
* graph.h: Likewise.
* hosthooks.h: Likewise.
* hooks.h: Likewise.
* hooks.c: Likewise.
* hashtable.h: Likewise.
* hashtable.c: Likewise.
* haifa-sched.c: Likewise.
* integrate.h: Likewise.
* integrate.c: Likewise.
* input.h: Likewise.
* ifcvt.c: Likewise.
2003-07-05 Kazu Hirata <kazu@cs.umass.edu>
* combine.c (nonzero_bits1): Fix a warning.
......
......@@ -26,9 +26,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* The mapping of a spec function name to the C function that
implements it. */
struct spec_function
{
{
const char *name;
const char *(*func) PARAMS ((int, const char **));
const char *(*func) (int, const char **);
};
/* This defines which switch letters take arguments. */
......@@ -54,22 +54,21 @@ struct spec_function
/* These are exported by gcc.c. */
extern int do_spec PARAMS ((const char *));
extern void record_temp_file PARAMS ((const char *, int, int));
extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
extern void fatal PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void error PARAMS ((const char *, ...)) ATTRIBUTE_PRINTF_1;
extern void pfatal_with_name PARAMS ((const char *)) ATTRIBUTE_NORETURN;
extern void set_input PARAMS ((const char *));
extern int do_spec (const char *);
extern void record_temp_file (const char *, int, int);
extern void fancy_abort (void) ATTRIBUTE_NORETURN;
extern void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
extern void error (const char *, ...) ATTRIBUTE_PRINTF_1;
extern void pfatal_with_name (const char *) ATTRIBUTE_NORETURN;
extern void set_input (const char *);
/* Spec files linked with gcc.c must provide definitions for these. */
/* Called before processing to change/add/remove arguments. */
extern void lang_specific_driver PARAMS ((int *, const char *const **, int *));
extern void lang_specific_driver (int *, const char *const **, int *);
/* Called before linking. Returns 0 on success and -1 on failure. */
extern int lang_specific_pre_link PARAMS ((void));
extern int lang_specific_pre_link (void);
extern int n_infiles;
......
/* Dump a gcov file, for debugging use.
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Contributed by Nathan Sidwell <nathan@codesourcery.com>
Gcov is free software; you can redistribute it and/or modify
......@@ -27,17 +27,17 @@ Boston, MA 02111-1307, USA. */
#include "gcov-io.h"
#include "gcov-io.c"
static void dump_file PARAMS ((const char *));
static void print_prefix PARAMS ((const char *, unsigned, gcov_position_t));
static void print_usage PARAMS ((void));
static void print_version PARAMS ((void));
static void tag_function PARAMS ((const char *, unsigned, unsigned));
static void tag_blocks PARAMS ((const char *, unsigned, unsigned));
static void tag_arcs PARAMS ((const char *, unsigned, unsigned));
static void tag_lines PARAMS ((const char *, unsigned, unsigned));
static void tag_counters PARAMS ((const char *, unsigned, unsigned));
static void tag_summary PARAMS ((const char *, unsigned, unsigned));
extern int main PARAMS ((int, char **));
static void dump_file (const char *);
static void print_prefix (const char *, unsigned, gcov_position_t);
static void print_usage (void);
static void print_version (void);
static void tag_function (const char *, unsigned, unsigned);
static void tag_blocks (const char *, unsigned, unsigned);
static void tag_arcs (const char *, unsigned, unsigned);
static void tag_lines (const char *, unsigned, unsigned);
static void tag_counters (const char *, unsigned, unsigned);
static void tag_summary (const char *, unsigned, unsigned);
extern int main (int, char **);
typedef struct tag_format
{
......@@ -72,9 +72,8 @@ static const tag_format_t tag_table[] =
{0, NULL, NULL}
};
int main (argc, argv)
int argc ATTRIBUTE_UNUSED;
char **argv;
int
main (int argc ATTRIBUTE_UNUSED, char **argv)
{
int opt;
......@@ -98,14 +97,14 @@ int main (argc, argv)
fprintf (stderr, "unknown flag `%c'\n", opt);
}
}
while (argv[optind])
dump_file (argv[optind++]);
return 0;
}
static void
print_usage ()
print_usage (void)
{
printf ("Usage: gcov-dump [OPTION] ... gcovfiles\n");
printf ("Print coverage file contents\n");
......@@ -116,7 +115,7 @@ print_usage ()
}
static void
print_version ()
print_version (void)
{
char v[4];
unsigned version = GCOV_VERSION;
......@@ -131,13 +130,10 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
}
static void
print_prefix (filename, depth, position)
const char *filename;
unsigned depth;
gcov_position_t position;
print_prefix (const char *filename, unsigned depth, gcov_position_t position)
{
static const char prefix[] = " ";
printf ("%s:", filename);
if (flag_dump_positions)
printf ("%lu:", (unsigned long) position);
......@@ -145,18 +141,17 @@ print_prefix (filename, depth, position)
}
static void
dump_file (filename)
const char *filename;
dump_file (const char *filename)
{
unsigned tags[4];
unsigned depth = 0;
if (!gcov_open (filename, 1))
{
fprintf (stderr, "%s:cannot open\n", filename);
return;
}
/* magic */
{
unsigned magic = gcov_read_unsigned ();
......@@ -166,7 +161,7 @@ dump_file (filename)
unsigned expected = GCOV_VERSION;
unsigned ix;
int different = version != GCOV_VERSION;
if (magic == GCOV_DATA_MAGIC)
type = "data";
else if (magic == GCOV_GRAPH_MAGIC)
......@@ -183,7 +178,7 @@ dump_file (filename)
v[ix] = version;
m[ix] = magic;
}
printf ("%s:%s:magic `%.4s':version `%.4s'\n", filename, type, m, v);
if (different)
printf ("%s:warning:current version is `%.4s'\n", filename, e);
......@@ -229,17 +224,17 @@ dump_file (filename)
depth = tag_depth;
tags[depth - 1] = tag;
}
print_prefix (filename, tag_depth, position);
printf ("%08x:%4u:%s", tag, length, format->name);
if (format->proc)
(*format->proc) (filename, tag, length);
printf ("\n");
if (flag_dump_contents && format->proc)
{
unsigned long actual_length = gcov_position () - base;
if (actual_length > length)
printf ("%s:record size mismatch %lu bytes overread\n",
filename, actual_length - length);
......@@ -262,20 +257,18 @@ dump_file (filename)
}
static void
tag_function (filename, tag, length)
const char *filename ATTRIBUTE_UNUSED;
unsigned tag ATTRIBUTE_UNUSED;
unsigned length ATTRIBUTE_UNUSED;
tag_function (const char *filename ATTRIBUTE_UNUSED,
unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
{
unsigned long pos = gcov_position ();
printf (" ident=%u", gcov_read_unsigned ());
printf (", checksum=0x%08x", gcov_read_unsigned ());
if (gcov_position () - pos < length)
{
const char *name;
name = gcov_read_string ();
printf (", `%s'", name ? name : "NULL");
name = gcov_read_string ();
......@@ -285,13 +278,11 @@ tag_function (filename, tag, length)
}
static void
tag_blocks (filename, tag, length)
const char *filename ATTRIBUTE_UNUSED;
unsigned tag ATTRIBUTE_UNUSED;
unsigned length ATTRIBUTE_UNUSED;
tag_blocks (const char *filename ATTRIBUTE_UNUSED,
unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
{
unsigned n_blocks = length / 4;
printf (" %u blocks", n_blocks);
if (flag_dump_contents)
......@@ -312,10 +303,8 @@ tag_blocks (filename, tag, length)
}
static void
tag_arcs (filename, tag, length)
const char *filename ATTRIBUTE_UNUSED;
unsigned tag ATTRIBUTE_UNUSED;
unsigned length ATTRIBUTE_UNUSED;
tag_arcs (const char *filename ATTRIBUTE_UNUSED,
unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
{
unsigned n_arcs = (length - 4) / 8;
......@@ -328,7 +317,7 @@ tag_arcs (filename, tag, length)
for (ix = 0; ix != n_arcs; ix++)
{
unsigned dst, flags;
if (!(ix & 3))
{
printf ("\n");
......@@ -343,10 +332,8 @@ tag_arcs (filename, tag, length)
}
static void
tag_lines (filename, tag, length)
const char *filename ATTRIBUTE_UNUSED;
unsigned tag ATTRIBUTE_UNUSED;
unsigned length ATTRIBUTE_UNUSED;
tag_lines (const char *filename ATTRIBUTE_UNUSED,
unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
{
if (flag_dump_contents)
{
......@@ -358,7 +345,7 @@ tag_lines (filename, tag, length)
gcov_position_t position = gcov_position ();
const char *source = NULL;
unsigned lineno = gcov_read_unsigned ();
if (!lineno)
{
source = gcov_read_string ();
......@@ -366,7 +353,7 @@ tag_lines (filename, tag, length)
break;
sep = NULL;
}
if (!sep)
{
printf ("\n");
......@@ -389,14 +376,12 @@ tag_lines (filename, tag, length)
}
static void
tag_counters (filename, tag, length)
const char *filename ATTRIBUTE_UNUSED;
unsigned tag ATTRIBUTE_UNUSED;
unsigned length ATTRIBUTE_UNUSED;
tag_counters (const char *filename ATTRIBUTE_UNUSED,
unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
{
static const char *const counter_names[] = GCOV_COUNTER_NAMES;
unsigned n_counts = length / 8;
printf (" %s %u counts",
counter_names[GCOV_COUNTER_FOR_TAG (tag)], n_counts);
if (flag_dump_contents)
......@@ -406,14 +391,14 @@ tag_counters (filename, tag, length)
for (ix = 0; ix != n_counts; ix++)
{
gcov_type count;
if (!(ix & 7))
{
printf ("\n");
print_prefix (filename, 0, gcov_position ());
printf ("\t\t%u", ix);
}
count = gcov_read_counter ();
printf (" ");
printf (HOST_WIDEST_INT_PRINT_DEC, count);
......@@ -422,24 +407,22 @@ tag_counters (filename, tag, length)
}
static void
tag_summary (filename, tag, length)
const char *filename ATTRIBUTE_UNUSED;
unsigned tag ATTRIBUTE_UNUSED;
unsigned length ATTRIBUTE_UNUSED;
tag_summary (const char *filename ATTRIBUTE_UNUSED,
unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED)
{
struct gcov_summary summary;
unsigned ix;
gcov_read_summary (&summary);
printf (" checksum=0x%08x", summary.checksum);
for (ix = 0; ix != GCOV_COUNTERS; ix++)
{
printf ("\n");
print_prefix (filename, 0, 0);
printf ("\t\tcounts=%u, runs=%u",
summary.ctrs[ix].num, summary.ctrs[ix].runs);
printf (", sum_all=" HOST_WIDEST_INT_PRINT_DEC,
(HOST_WIDEST_INT)summary.ctrs[ix].sum_all);
printf (", run_max=" HOST_WIDEST_INT_PRINT_DEC,
......
/* Generate gcov version string from version.c. See gcov-io.h for
description of how the version string is generated.
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Contributed by Nathan Sidwell <nathan@codesourcery.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
......@@ -26,12 +26,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tm.h"
#include "version.c" /* We want the actual string. */
int main PARAMS ((int, char **));
int main (int, char **);
int
main (argc, argv)
int argc ATTRIBUTE_UNUSED;
char **argv;
main (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
{
unsigned version = 0;
unsigned char v[4];
......@@ -56,7 +54,7 @@ main (argc, argv)
v[1] = (minor / 10) + '0';
v[2] = (minor % 10) + '0';
v[3] = s ? s : '*';
for (ix = 0; ix != 4; ix++)
version = (version << 8) | v[ix];
......@@ -65,6 +63,6 @@ main (argc, argv)
printf ("\n");
printf ("#define GCOV_VERSION ((unsigned)%#08x) /* %.4s */\n",
version, v);
return 0;
}
......@@ -219,8 +219,7 @@ extern void ggc_splay_dont_free (void *, void *);
/* Allocate a gc-able string, and fill it with LENGTH bytes from CONTENTS.
If LENGTH is -1, then CONTENTS is assumed to be a
null-terminated string and the memory sized accordingly. */
extern const char *ggc_alloc_string PARAMS ((const char *contents,
int length));
extern const char *ggc_alloc_string (const char *contents, int length);
/* Make a copy of S, in GC-able memory. */
#define ggc_strdup(S) ggc_alloc_string((S), -1)
......
/* Allocate registers for pseudo-registers that span basic blocks.
Copyright (C) 1987, 1988, 1991, 1994, 1996, 1997, 1998,
1999, 2000, 2002 Free Software Foundation, Inc.
1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -289,24 +289,23 @@ static int n_regs_set;
static HARD_REG_SET eliminable_regset;
static int allocno_compare PARAMS ((const void *, const void *));
static void global_conflicts PARAMS ((void));
static void mirror_conflicts PARAMS ((void));
static void expand_preferences PARAMS ((void));
static void prune_preferences PARAMS ((void));
static void find_reg PARAMS ((int, HARD_REG_SET, int, int, int));
static void record_one_conflict PARAMS ((int));
static void record_conflicts PARAMS ((int *, int));
static void mark_reg_store PARAMS ((rtx, rtx, void *));
static void mark_reg_clobber PARAMS ((rtx, rtx, void *));
static void mark_reg_conflicts PARAMS ((rtx));
static void mark_reg_death PARAMS ((rtx));
static void mark_reg_live_nc PARAMS ((int, enum machine_mode));
static void set_preference PARAMS ((rtx, rtx));
static void dump_conflicts PARAMS ((FILE *));
static void reg_becomes_live PARAMS ((rtx, rtx, void *));
static void reg_dies PARAMS ((int, enum machine_mode,
struct insn_chain *));
static int allocno_compare (const void *, const void *);
static void global_conflicts (void);
static void mirror_conflicts (void);
static void expand_preferences (void);
static void prune_preferences (void);
static void find_reg (int, HARD_REG_SET, int, int, int);
static void record_one_conflict (int);
static void record_conflicts (int *, int);
static void mark_reg_store (rtx, rtx, void *);
static void mark_reg_clobber (rtx, rtx, void *);
static void mark_reg_conflicts (rtx);
static void mark_reg_death (rtx);
static void mark_reg_live_nc (int, enum machine_mode);
static void set_preference (rtx, rtx);
static void dump_conflicts (FILE *);
static void reg_becomes_live (rtx, rtx, void *);
static void reg_dies (int, enum machine_mode, struct insn_chain *);
/* Perform allocation of pseudo-registers not allocated by local_alloc.
FILE is a file to output debugging information on,
......@@ -316,8 +315,7 @@ static void reg_dies PARAMS ((int, enum machine_mode,
and we must not do any more for this function. */
int
global_alloc (file)
FILE *file;
global_alloc (FILE *file)
{
int retval;
#ifdef ELIMINABLE_REGS
......@@ -599,9 +597,7 @@ global_alloc (file)
Returns -1 (1) if *v1 should be allocated before (after) *v2. */
static int
allocno_compare (v1p, v2p)
const void *v1p;
const void *v2p;
allocno_compare (const void *v1p, const void *v2p)
{
int v1 = *(const int *)v1p, v2 = *(const int *)v2p;
/* Note that the quotient will never be bigger than
......@@ -629,7 +625,7 @@ allocno_compare (v1p, v2p)
conflict matrices and preference tables. */
static void
global_conflicts ()
global_conflicts (void)
{
int i;
basic_block b;
......@@ -703,11 +699,11 @@ global_conflicts ()
scan the instruction that makes either X or Y become live. */
record_conflicts (block_start_allocnos, ax);
/* Pseudos can't go in stack regs at the start of a basic block that
is reached by an abnormal edge. Likewise for call clobbered regs,
because because caller-save, fixup_abnormal_edges, and possibly
the table driven EH machinery are not quite ready to handle such
regs live across such edges. */
/* Pseudos can't go in stack regs at the start of a basic block that
is reached by an abnormal edge. Likewise for call clobbered regs,
because because caller-save, fixup_abnormal_edges, and possibly
the table driven EH machinery are not quite ready to handle such
regs live across such edges. */
{
edge e;
......@@ -852,7 +848,7 @@ global_conflicts ()
merge any preferences between those allocnos. */
static void
expand_preferences ()
expand_preferences (void)
{
rtx insn;
rtx link;
......@@ -903,7 +899,7 @@ expand_preferences ()
we will avoid using these registers. */
static void
prune_preferences ()
prune_preferences (void)
{
int i;
int num;
......@@ -991,12 +987,7 @@ prune_preferences ()
If not, do nothing. */
static void
find_reg (num, losers, alt_regs_p, accept_call_clobbered, retrying)
int num;
HARD_REG_SET losers;
int alt_regs_p;
int accept_call_clobbered;
int retrying;
find_reg (int num, HARD_REG_SET losers, int alt_regs_p, int accept_call_clobbered, int retrying)
{
int i, best_reg, pass;
HARD_REG_SET used, used1, used2;
......@@ -1110,7 +1101,7 @@ find_reg (num, losers, alt_regs_p, accept_call_clobbered, retrying)
(j < lim
&& ! TEST_HARD_REG_BIT (used, j)
&& (REGNO_REG_CLASS (j)
== REGNO_REG_CLASS (best_reg + (j - i))
== REGNO_REG_CLASS (best_reg + (j - i))
|| reg_class_subset_p (REGNO_REG_CLASS (j),
REGNO_REG_CLASS (best_reg + (j - i)))
|| reg_class_subset_p (REGNO_REG_CLASS (best_reg + (j - i)),
......@@ -1149,7 +1140,7 @@ find_reg (num, losers, alt_regs_p, accept_call_clobbered, retrying)
(j < lim
&& ! TEST_HARD_REG_BIT (used, j)
&& (REGNO_REG_CLASS (j)
== REGNO_REG_CLASS (best_reg + (j - i))
== REGNO_REG_CLASS (best_reg + (j - i))
|| reg_class_subset_p (REGNO_REG_CLASS (j),
REGNO_REG_CLASS (best_reg + (j - i)))
|| reg_class_subset_p (REGNO_REG_CLASS (best_reg + (j - i)),
......@@ -1311,9 +1302,7 @@ find_reg (num, losers, alt_regs_p, accept_call_clobbered, retrying)
If FORBIDDEN_REGS is zero, no regs are forbidden. */
void
retry_global_alloc (regno, forbidden_regs)
int regno;
HARD_REG_SET forbidden_regs;
retry_global_alloc (int regno, HARD_REG_SET forbidden_regs)
{
int alloc_no = reg_allocno[regno];
if (alloc_no >= 0)
......@@ -1344,8 +1333,7 @@ retry_global_alloc (regno, forbidden_regs)
reg_renumber before calling here. */
static void
record_one_conflict (regno)
int regno;
record_one_conflict (int regno)
{
int j;
......@@ -1388,9 +1376,7 @@ record_one_conflict (regno)
are currently live. Their bits are also flagged in allocnos_live. */
static void
record_conflicts (allocno_vec, len)
int *allocno_vec;
int len;
record_conflicts (int *allocno_vec, int len)
{
while (--len >= 0)
IOR_HARD_REG_SET (allocno[allocno_vec[len]].hard_reg_conflicts,
......@@ -1399,7 +1385,7 @@ record_conflicts (allocno_vec, len)
/* If CONFLICTP (i, j) is true, make sure CONFLICTP (j, i) is also true. */
static void
mirror_conflicts ()
mirror_conflicts (void)
{
int i, j;
int rw = allocno_row_words;
......@@ -1447,9 +1433,7 @@ mirror_conflicts ()
a REG_INC note was found for it). */
static void
mark_reg_store (reg, setter, data)
rtx reg, setter;
void *data ATTRIBUTE_UNUSED;
mark_reg_store (rtx reg, rtx setter, void *data ATTRIBUTE_UNUSED)
{
int regno;
......@@ -1496,9 +1480,7 @@ mark_reg_store (reg, setter, data)
/* Like mark_reg_set except notice just CLOBBERs; ignore SETs. */
static void
mark_reg_clobber (reg, setter, data)
rtx reg, setter;
void *data ATTRIBUTE_UNUSED;
mark_reg_clobber (rtx reg, rtx setter, void *data ATTRIBUTE_UNUSED)
{
if (GET_CODE (setter) == CLOBBER)
mark_reg_store (reg, setter, data);
......@@ -1508,8 +1490,7 @@ mark_reg_clobber (reg, setter, data)
Do not mark REG itself as live. */
static void
mark_reg_conflicts (reg)
rtx reg;
mark_reg_conflicts (rtx reg)
{
int regno;
......@@ -1548,8 +1529,7 @@ mark_reg_conflicts (reg)
Store a 0 in regs_live or allocnos_live for this register. */
static void
mark_reg_death (reg)
rtx reg;
mark_reg_death (rtx reg)
{
int regno = REGNO (reg);
......@@ -1585,9 +1565,7 @@ mark_reg_death (reg)
it is assumed that the caller will do that. */
static void
mark_reg_live_nc (regno, mode)
int regno;
enum machine_mode mode;
mark_reg_live_nc (int regno, enum machine_mode mode)
{
int last = regno + HARD_REGNO_NREGS (regno, mode);
while (regno < last)
......@@ -1607,8 +1585,7 @@ mark_reg_live_nc (regno, mode)
pseudo-register to a hard register. */
static void
set_preference (dest, src)
rtx dest, src;
set_preference (rtx dest, rtx src)
{
unsigned int src_regno, dest_regno;
/* Amount to add to the hard regno for SRC, or subtract from that for DEST,
......@@ -1715,8 +1692,7 @@ set_preference (dest, src)
a use of TO. */
void
mark_elimination (from, to)
int from, to;
mark_elimination (int from, int to)
{
basic_block bb;
......@@ -1738,10 +1714,7 @@ static regset live_relevant_regs;
/* Record in live_relevant_regs and REGS_SET that register REG became live.
This is called via note_stores. */
static void
reg_becomes_live (reg, setter, regs_set)
rtx reg;
rtx setter ATTRIBUTE_UNUSED;
void *regs_set;
reg_becomes_live (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *regs_set)
{
int regno;
......@@ -1772,10 +1745,7 @@ reg_becomes_live (reg, setter, regs_set)
/* Record in live_relevant_regs that register REGNO died. */
static void
reg_dies (regno, mode, chain)
int regno;
enum machine_mode mode;
struct insn_chain *chain;
reg_dies (int regno, enum machine_mode mode, struct insn_chain *chain)
{
if (regno < FIRST_PSEUDO_REGISTER)
{
......@@ -1799,8 +1769,7 @@ reg_dies (regno, mode, chain)
/* Walk the insns of the current function and build reload_insn_chain,
and record register life information. */
void
build_insn_chain (first)
rtx first;
build_insn_chain (rtx first)
{
struct insn_chain **p = &reload_insn_chain;
struct insn_chain *prev = 0;
......@@ -1905,8 +1874,7 @@ build_insn_chain (first)
showing the information on which the allocation decisions are based. */
static void
dump_conflicts (file)
FILE *file;
dump_conflicts (FILE *file)
{
int i;
int has_preferences;
......@@ -1963,8 +1931,7 @@ dump_conflicts (file)
}
void
dump_global_regs (file)
FILE *file;
dump_global_regs (FILE *file)
{
int i, j;
......
/* Output routines for graphical representation.
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This file is part of GCC.
......@@ -39,17 +39,16 @@ static const char *const graph_ext[] =
/* vcg */ ".vcg",
};
static void start_fct PARAMS ((FILE *));
static void start_bb PARAMS ((FILE *, int));
static void node_data PARAMS ((FILE *, rtx));
static void draw_edge PARAMS ((FILE *, int, int, int, int));
static void end_fct PARAMS ((FILE *));
static void end_bb PARAMS ((FILE *));
static void start_fct (FILE *);
static void start_bb (FILE *, int);
static void node_data (FILE *, rtx);
static void draw_edge (FILE *, int, int, int, int);
static void end_fct (FILE *);
static void end_bb (FILE *);
/* Output text for new basic block. */
static void
start_fct (fp)
FILE *fp;
start_fct (FILE *fp)
{
switch (graph_dump_format)
{
......@@ -64,9 +63,7 @@ graph: { title: \"%s\"\nfolding: 1\nhidden: 2\nnode: { title: \"%s.0\" }\n",
}
static void
start_bb (fp, bb)
FILE *fp;
int bb;
start_bb (FILE *fp, int bb)
{
switch (graph_dump_format)
{
......@@ -105,9 +102,7 @@ label: \"basic block %d",
}
static void
node_data (fp, tmp_rtx)
FILE *fp;
rtx tmp_rtx;
node_data (FILE *fp, rtx tmp_rtx)
{
if (PREV_INSN (tmp_rtx) == 0)
{
......@@ -168,12 +163,7 @@ darkgrey\n shape: ellipse" : "white",
}
static void
draw_edge (fp, from, to, bb_edge, class)
FILE *fp;
int from;
int to;
int bb_edge;
int class;
draw_edge (FILE *fp, int from, int to, int bb_edge, int class)
{
const char * color;
switch (graph_dump_format)
......@@ -200,8 +190,7 @@ draw_edge (fp, from, to, bb_edge, class)
}
static void
end_bb (fp)
FILE *fp;
end_bb (FILE *fp)
{
switch (graph_dump_format)
{
......@@ -214,8 +203,7 @@ end_bb (fp)
}
static void
end_fct (fp)
FILE *fp;
end_fct (FILE *fp)
{
switch (graph_dump_format)
{
......@@ -231,10 +219,7 @@ end_fct (fp)
/* Like print_rtl, but also print out live information for the start of each
basic block. */
void
print_rtl_graph_with_bb (base, suffix, rtx_first)
const char *base;
const char *suffix;
rtx rtx_first;
print_rtl_graph_with_bb (const char *base, const char *suffix, rtx rtx_first)
{
rtx tmp_rtx;
size_t namelen = strlen (base);
......@@ -400,9 +385,7 @@ print_rtl_graph_with_bb (base, suffix, rtx_first)
/* Similar as clean_dump_file, but this time for graph output files. */
void
clean_graph_dump_file (base, suffix)
const char *base;
const char *suffix;
clean_graph_dump_file (const char *base, const char *suffix)
{
size_t namelen = strlen (base);
size_t suffixlen = strlen (suffix);
......@@ -434,9 +417,7 @@ clean_graph_dump_file (base, suffix)
/* Do final work on the graph output file. */
void
finish_graph_dump_file (base, suffix)
const char *base;
const char *suffix;
finish_graph_dump_file (const char *base, const char *suffix)
{
size_t namelen = strlen (base);
size_t suffixlen = strlen (suffix);
......
/* Header file for graph routines.
Copyright (C) 1999 Free Software Foundation, Inc.
Copyright (C) 1999, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -21,8 +21,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_GRAPH_H
#define GCC_GRAPH_H
extern void print_rtl_graph_with_bb PARAMS ((const char *, const char *, rtx));
extern void clean_graph_dump_file PARAMS ((const char *, const char *));
extern void finish_graph_dump_file PARAMS ((const char *, const char *));
extern void print_rtl_graph_with_bb (const char *, const char *, rtx);
extern void clean_graph_dump_file (const char *, const char *);
extern void finish_graph_dump_file (const char *, const char *);
#endif /* ! GCC_GRAPH_H */
/* Hash tables.
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
......@@ -32,15 +32,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
existing entry with a potential new one. Also, the ability to
delete members from the table has been removed. */
static unsigned int calc_hash PARAMS ((const unsigned char *, unsigned int));
static void ht_expand PARAMS ((hash_table *));
static unsigned int calc_hash (const unsigned char *, unsigned int);
static void ht_expand (hash_table *);
/* Calculate the hash of the string STR of length LEN. */
static unsigned int
calc_hash (str, len)
const unsigned char *str;
unsigned int len;
calc_hash (const unsigned char *str, unsigned int len)
{
unsigned int n = len;
unsigned int r = 0;
......@@ -56,8 +54,7 @@ calc_hash (str, len)
/* Initialize an identifier hashtable. */
hash_table *
ht_create (order)
unsigned int order;
ht_create (unsigned int order)
{
unsigned int nslots = 1 << order;
hash_table *table;
......@@ -77,8 +74,7 @@ ht_create (order)
/* Frees all memory associated with a hash table. */
void
ht_destroy (table)
hash_table *table;
ht_destroy (hash_table *table)
{
obstack_free (&table->stack, NULL);
free (table->entries);
......@@ -94,11 +90,8 @@ ht_destroy (table)
CPP_ALLOCED and the item is assumed to be at the top of the
obstack. */
hashnode
ht_lookup (table, str, len, insert)
hash_table *table;
const unsigned char *str;
unsigned int len;
enum ht_lookup_option insert;
ht_lookup (hash_table *table, const unsigned char *str, unsigned int len,
enum ht_lookup_option insert)
{
unsigned int hash = calc_hash (str, len);
unsigned int hash2;
......@@ -158,8 +151,7 @@ ht_lookup (table, str, len, insert)
/* Double the size of a hash table, re-hashing existing entries. */
static void
ht_expand (table)
hash_table *table;
ht_expand (hash_table *table)
{
hashnode *nentries, *p, *limit;
unsigned int size, sizemask;
......@@ -200,10 +192,7 @@ ht_expand (table)
/* For all nodes in TABLE, callback CB with parameters TABLE->PFILE,
the node, and V. */
void
ht_forall (table, cb, v)
hash_table *table;
ht_cb cb;
const void *v;
ht_forall (hash_table *table, ht_cb cb, const void *v)
{
hashnode *p, *limit;
......@@ -221,8 +210,7 @@ ht_forall (table, cb, v)
/* Dump allocation statistics to stderr. */
void
ht_dump_statistics (table)
hash_table *table;
ht_dump_statistics (hash_table *table)
{
size_t nelts, nids, overhead, headers;
size_t total_bytes, longest, sum_of_squares;
......@@ -251,7 +239,7 @@ ht_dump_statistics (table)
nids++;
}
while (++p < limit);
nelts = table->nelements;
overhead = obstack_memory_used (&table->stack) - total_bytes;
headers = table->nslots * sizeof (hashnode);
......@@ -287,8 +275,7 @@ ht_dump_statistics (table)
/* Return the approximate positive square root of a number N. This is for
statistical reports, not code generation. */
double
approx_sqrt (x)
double x;
approx_sqrt (double x)
{
double s, d;
......
/* Hash tables.
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
......@@ -46,7 +46,7 @@ struct ht
hashnode *entries;
/* Call back. */
hashnode (*alloc_node) PARAMS ((hash_table *));
hashnode (*alloc_node) (hash_table *);
unsigned int nslots; /* Total slots in the entries array. */
unsigned int nelements; /* Number of live elements. */
......@@ -60,25 +60,25 @@ struct ht
};
/* Initialize the hashtable with 2 ^ order entries. */
extern hash_table *ht_create PARAMS ((unsigned int order));
extern hash_table *ht_create (unsigned int order);
/* Frees all memory associated with a hash table. */
extern void ht_destroy PARAMS ((hash_table *));
extern void ht_destroy (hash_table *);
extern hashnode ht_lookup PARAMS ((hash_table *, const unsigned char *,
unsigned int, enum ht_lookup_option));
extern hashnode ht_lookup (hash_table *, const unsigned char *,
unsigned int, enum ht_lookup_option);
/* For all nodes in TABLE, make a callback. The callback takes
TABLE->PFILE, the node, and a PTR, and the callback sequence stops
if the callback returns zero. */
typedef int (*ht_cb) PARAMS ((struct cpp_reader *, hashnode, const void *));
extern void ht_forall PARAMS ((hash_table *, ht_cb, const void *));
typedef int (*ht_cb) (struct cpp_reader *, hashnode, const void *);
extern void ht_forall (hash_table *, ht_cb, const void *);
/* Dump allocation statistics to stderr. */
extern void ht_dump_statistics PARAMS ((hash_table *));
extern void ht_dump_statistics (hash_table *);
/* Approximate positive square root of a host double. This is for
statistical reports, not code generation. */
extern double approx_sqrt PARAMS ((double));
extern double approx_sqrt (double);
#endif /* GCC_HASHTABLE_H */
......@@ -30,13 +30,13 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* Generic hook that does absolutely zappo. */
void
hook_void_void ()
hook_void_void (void)
{
}
/* Generic hook that takes no arguments and returns false. */
bool
hook_bool_void_false ()
hook_bool_void_false (void)
{
return false;
}
......@@ -58,63 +58,53 @@ hook_bool_bool_false (bool a ATTRIBUTE_UNUSED)
/* Generic hook that takes (tree, int) and does nothing. */
void
hook_void_tree_int (a, b)
tree a ATTRIBUTE_UNUSED;
int b ATTRIBUTE_UNUSED;
hook_void_tree_int (tree a ATTRIBUTE_UNUSED, int b ATTRIBUTE_UNUSED)
{
}
/* Generic hook that takes (FILE *, const char *) and does nothing. */
void
hook_void_FILEptr_constcharptr (a, b)
FILE *a ATTRIBUTE_UNUSED;
const char *b ATTRIBUTE_UNUSED;
hook_void_FILEptr_constcharptr (FILE *a ATTRIBUTE_UNUSED, const char *b ATTRIBUTE_UNUSED)
{
}
/* Used for the TARGET_ASM_CAN_OUTPUT_MI_THUNK hook. */
bool
hook_bool_tree_hwi_hwi_tree_false (a, b, c, d)
tree a ATTRIBUTE_UNUSED;
HOST_WIDE_INT b ATTRIBUTE_UNUSED;
HOST_WIDE_INT c ATTRIBUTE_UNUSED;
tree d ATTRIBUTE_UNUSED;
hook_bool_tree_hwi_hwi_tree_false (tree a ATTRIBUTE_UNUSED,
HOST_WIDE_INT b ATTRIBUTE_UNUSED,
HOST_WIDE_INT c ATTRIBUTE_UNUSED,
tree d ATTRIBUTE_UNUSED)
{
return false;
}
bool
hook_bool_tree_hwi_hwi_tree_true (a, b, c, d)
tree a ATTRIBUTE_UNUSED;
HOST_WIDE_INT b ATTRIBUTE_UNUSED;
HOST_WIDE_INT c ATTRIBUTE_UNUSED;
tree d ATTRIBUTE_UNUSED;
hook_bool_tree_hwi_hwi_tree_true (tree a ATTRIBUTE_UNUSED,
HOST_WIDE_INT b ATTRIBUTE_UNUSED,
HOST_WIDE_INT c ATTRIBUTE_UNUSED,
tree d ATTRIBUTE_UNUSED)
{
return true;
}
bool
default_can_output_mi_thunk_no_vcall (a, b, c, d)
tree a ATTRIBUTE_UNUSED;
HOST_WIDE_INT b ATTRIBUTE_UNUSED;
HOST_WIDE_INT c;
tree d ATTRIBUTE_UNUSED;
default_can_output_mi_thunk_no_vcall (tree a ATTRIBUTE_UNUSED,
HOST_WIDE_INT b ATTRIBUTE_UNUSED,
HOST_WIDE_INT c,
tree d ATTRIBUTE_UNUSED)
{
return c == 0;
}
/* ??? Used for comp_type_attributes, which ought to return bool. */
int
hook_int_tree_tree_1 (a, b)
tree a ATTRIBUTE_UNUSED;
tree b ATTRIBUTE_UNUSED;
hook_int_tree_tree_1 (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
{
return 1;
}
int
hook_int_rtx_0 (a)
rtx a ATTRIBUTE_UNUSED;
hook_int_rtx_0 (rtx a ATTRIBUTE_UNUSED)
{
return 0;
}
......@@ -141,62 +131,52 @@ hook_uint_uint_constcharptrptr_0 (unsigned int a ATTRIBUTE_UNUSED,
}
void
hook_void_tree (a)
tree a ATTRIBUTE_UNUSED;
hook_void_tree (tree a ATTRIBUTE_UNUSED)
{
}
void
hook_void_tree_treeptr (a, b)
tree a ATTRIBUTE_UNUSED;
tree *b ATTRIBUTE_UNUSED;
hook_void_tree_treeptr (tree a ATTRIBUTE_UNUSED, tree *b ATTRIBUTE_UNUSED)
{
}
bool
hook_bool_tree_false (a)
tree a ATTRIBUTE_UNUSED;
hook_bool_tree_false (tree a ATTRIBUTE_UNUSED)
{
return false;
}
bool
hook_bool_tree_tree_false (a, b)
tree a ATTRIBUTE_UNUSED;
tree b ATTRIBUTE_UNUSED;
hook_bool_tree_tree_false (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED)
{
return false;
}
bool
hook_bool_rtx_false (a)
rtx a ATTRIBUTE_UNUSED;
hook_bool_rtx_false (rtx a ATTRIBUTE_UNUSED)
{
return false;
}
bool
hook_bool_rtx_int_int_intp_false (a, b, c, d)
rtx a ATTRIBUTE_UNUSED;
int b ATTRIBUTE_UNUSED;
int c ATTRIBUTE_UNUSED;
int *d ATTRIBUTE_UNUSED;
hook_bool_rtx_int_int_intp_false (rtx a ATTRIBUTE_UNUSED,
int b ATTRIBUTE_UNUSED,
int c ATTRIBUTE_UNUSED,
int *d ATTRIBUTE_UNUSED)
{
return false;
}
/* Generic hook that takes an rtx and returns it. */
rtx
hook_rtx_rtx_identity (x)
rtx x;
hook_rtx_rtx_identity (rtx x)
{
return x;
}
/* Generic hook that takes an rtx and returns NULL_RTX. */
rtx
hook_rtx_rtx_null (x)
rtx x ATTRIBUTE_UNUSED;
hook_rtx_rtx_null (rtx x ATTRIBUTE_UNUSED)
{
return 0;
}
......@@ -22,36 +22,36 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef GCC_HOOKS_H
#define GCC_HOOKS_H
bool hook_bool_void_false PARAMS ((void));
bool hook_bool_void_false (void);
bool hook_bool_bool_false (bool);
bool hook_bool_tree_false PARAMS ((tree));
bool hook_bool_tree_hwi_hwi_tree_false
PARAMS ((tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
bool hook_bool_tree_hwi_hwi_tree_true
PARAMS ((tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
bool hook_bool_rtx_false PARAMS ((rtx));
bool hook_bool_rtx_int_int_intp_false PARAMS ((rtx, int, int, int *));
void hook_void_tree_int PARAMS ((tree, int));
void hook_void_void PARAMS ((void));
void hook_void_FILEptr_constcharptr PARAMS ((FILE *, const char *));
void hook_void_tree PARAMS ((tree));
void hook_void_tree_treeptr PARAMS ((tree, tree *));
int hook_int_tree_tree_1 PARAMS ((tree, tree));
int hook_int_rtx_0 PARAMS ((rtx));
bool hook_bool_tree_false (tree);
bool hook_bool_tree_hwi_hwi_tree_false (tree, HOST_WIDE_INT, HOST_WIDE_INT,
tree);
bool hook_bool_tree_hwi_hwi_tree_true (tree, HOST_WIDE_INT, HOST_WIDE_INT,
tree);
bool hook_bool_rtx_false (rtx);
bool hook_bool_rtx_int_int_intp_false (rtx, int, int, int *);
void hook_void_tree_int (tree, int);
void hook_void_void (void);
void hook_void_FILEptr_constcharptr (FILE *, const char *);
void hook_void_tree (tree);
void hook_void_tree_treeptr (tree, tree *);
int hook_int_tree_tree_1 (tree, tree);
int hook_int_rtx_0 (rtx);
int hook_int_void_0 (void);
int hook_int_size_t_constcharptr_int_0 (size_t, const char *, int);
int hook_int_void_no_regs (void);
unsigned hook_uint_uint_constcharptrptr_0 (unsigned, const char **);
bool default_can_output_mi_thunk_no_vcall
PARAMS ((tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
bool default_can_output_mi_thunk_no_vcall (tree, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
bool hook_bool_tree_tree_false PARAMS ((tree, tree));
bool hook_bool_tree_tree_false (tree, tree);
rtx hook_rtx_rtx_identity PARAMS ((rtx));
rtx hook_rtx_rtx_null PARAMS ((rtx));
rtx hook_rtx_rtx_identity (rtx);
rtx hook_rtx_rtx_null (rtx);
#endif
......@@ -21,9 +21,9 @@ Boston, MA 02111-1307, USA. */
#ifndef GCC_HOST_HOOKS_H
#define GCC_HOST_HOOKS_H
struct host_hooks
struct host_hooks
{
void (*extra_signals) PARAMS((void));
void (*extra_signals) (void);
/* Whenever you add entries here, make sure you adjust hosthooks-def.h. */
};
......
......@@ -25,7 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* The data structure used to record a location in a translation unit. */
struct location_s GTY (())
{
/* The name of the source file involved. */
/* The name of the source file involved. */
const char *file;
/* The line-location in the source file. */
......@@ -53,7 +53,7 @@ extern struct file_stack *input_file_stack;
/* Incremented on each change to input_file_stack. */
extern int input_file_stack_tick;
extern void push_srcloc PARAMS ((const char *name, int line));
extern void pop_srcloc PARAMS ((void));
extern void push_srcloc (const char *name, int line);
extern void pop_srcloc (void);
#endif
/* Function integration definitions for GCC
Copyright (C) 1990, 1995, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1990, 1995, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -112,7 +113,7 @@ struct inline_remap
rtx dest;
rtx equiv;
} equiv_sets[MAX_RECOG_OPERANDS];
/* Record the last thing assigned to pc. This is used for folded
/* Record the last thing assigned to pc. This is used for folded
conditional branch insns. */
rtx last_pc_value;
#ifdef HAVE_cc0
......@@ -127,41 +128,41 @@ struct inline_remap
/* Return a copy of an rtx (as needed), substituting pseudo-register,
labels, and frame-pointer offsets as necessary. */
extern rtx copy_rtx_and_substitute PARAMS ((rtx, struct inline_remap *, int));
extern rtx copy_rtx_and_substitute (rtx, struct inline_remap *, int);
/* Return a pseudo that corresponds to the value in the specified hard
reg as of the start of the function (for inlined functions, the
value at the start of the parent function). */
extern rtx get_hard_reg_initial_val PARAMS ((enum machine_mode, int));
extern rtx get_hard_reg_initial_val (enum machine_mode, int);
/* Likewise, but for a different than the current function, or
arbitrary expression. */
extern rtx get_func_hard_reg_initial_val PARAMS ((struct function *, rtx));
extern rtx get_func_hard_reg_initial_val (struct function *, rtx);
/* Likewise, but iff someone else has caused it to become allocated. */
extern rtx has_func_hard_reg_initial_val PARAMS ((struct function *, rtx));
extern rtx has_func_hard_reg_initial_val (struct function *, rtx);
/* Likewise, but for common cases. */
extern rtx has_hard_reg_initial_val PARAMS ((enum machine_mode, int));
extern rtx has_hard_reg_initial_val (enum machine_mode, int);
/* If a pseudo represents an initial hard reg (or expression), return
it, else return NULL_RTX. */
extern rtx get_hard_reg_initial_reg PARAMS ((struct function *, rtx));
extern rtx get_hard_reg_initial_reg (struct function *, rtx);
/* Called from rest_of_compilation. */
extern void emit_initial_value_sets PARAMS ((void));
extern void allocate_initial_values PARAMS ((rtx *));
extern void emit_initial_value_sets (void);
extern void allocate_initial_values (rtx *);
/* Copy a declaration when one function is substituted inline into
another. */
extern union tree_node *copy_decl_for_inlining PARAMS ((union tree_node *,
union tree_node *,
union tree_node *));
extern union tree_node *copy_decl_for_inlining (union tree_node *,
union tree_node *,
union tree_node *);
/* Check whether there's any attribute in a function declaration that
makes the function uninlinable. Returns false if it finds any,
true otherwise. */
extern bool function_attribute_inlinable_p PARAMS ((union tree_node *));
extern bool function_attribute_inlinable_p (union tree_node *);
extern void try_constants PARAMS ((rtx, struct inline_remap *));
extern void try_constants (rtx, struct inline_remap *);
/* Return the label indicated. */
extern rtx get_label_from_map PARAMS ((struct inline_remap *, int));
extern rtx get_label_from_map (struct inline_remap *, int);
/* Set the label indicated. */
#define set_label_in_map(MAP, I, X) ((MAP)->label_map[I] = (X))
......
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