Commit 0c20a65f by Andreas Jaeger Committed by Andreas Jaeger

jump.c: Convert prototypes to ISO C90.

	* jump.c: Convert prototypes to ISO C90.
	* langhooks-def.h: Likewise.  Add extern to prototypes.
	* langhooks.c: Likewise.
	* langhooks.h: Likewise.
	* lcm.c: Likewise.
	* local-alloc.c: Likewise.
	* loop-init.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* loop.c: Likewise.
	* loop.h: Likewise. Add extern to prototypes.
	* machmode.h: Likewise.
	* main.c: Likewise.
	* mbchar.c: Likewise.
	* mbchar.h: Likewise.
	* mkdeps.c: Likewise.
	* mkdeps.h: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* output.h: Likewise.
	* gccspec.c: Likwise.
	* postreload.c: Likewise.
	* prefix.c: Likewise.
	* prefix.h: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* read-rtl.c: Likewise.
	* real.c: Likewise.
	* real.h: Likewise.
	* recog.c: Likewise.
	* recog.h: Likewise.
	* reg-stack.c: Likewise.
	* regclass.c: Likewise.
	* regmove.c: Likewise.
	* regrename.c: Likewise.
	* regs.h: Likewise.
	* reload.c: Likewise.
	* reload.h: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* resource.h: Likewise.
	* rtl-error.c: Likewise.
	* rtl.c: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.

From-SVN: r68998
parent 391cfc46
......@@ -20,6 +20,53 @@
* integrate.c: Likewise.
* input.h: Likewise.
* ifcvt.c: Likewise.
* jump.c: Convert prototypes to ISO C90.
* langhooks-def.h: Likewise. Add extern to prototypes.
* langhooks.c: Likewise.
* langhooks.h: Likewise.
* lcm.c: Likewise.
* local-alloc.c: Likewise.
* loop-init.c: Likewise.
* loop-unroll.c: Likewise.
* loop-unswitch.c: Likewise.
* loop.c: Likewise.
* loop.h: Likewise. Add extern to prototypes.
* machmode.h: Likewise.
* main.c: Likewise.
* mbchar.c: Likewise.
* mbchar.h: Likewise.
* mkdeps.c: Likewise.
* mkdeps.h: Likewise.
* optabs.c: Likewise.
* optabs.h: Likewise.
* output.h: Likewise.
* gccspec.c: Likwise.
* postreload.c: Likewise.
* prefix.c: Likewise.
* prefix.h: Likewise.
* print-rtl.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* read-rtl.c: Likewise.
* real.c: Likewise.
* real.h: Likewise.
* recog.c: Likewise.
* recog.h: Likewise.
* reg-stack.c: Likewise.
* regclass.c: Likewise.
* regmove.c: Likewise.
* regrename.c: Likewise.
* regs.h: Likewise.
* reload.c: Likewise.
* reload.h: Likewise.
* reload1.c: Likewise.
* reorg.c: Likewise.
* resource.c: Likewise.
* resource.h: Likewise.
* rtl-error.c: Likewise.
* rtl.c: Likewise.
* rtl.h: Likewise.
* rtlanal.c: Likewise.
2003-07-05 Kazu Hirata <kazu@cs.umass.edu>
......
/* Specific flags and argument handling of the C front-end.
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -26,10 +26,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Filter argc and argv before processing by the gcc driver proper. */
void
lang_specific_driver (in_argc, in_argv, in_added_libraries)
int *in_argc ATTRIBUTE_UNUSED;
const char *const **in_argv ATTRIBUTE_UNUSED;
int *in_added_libraries ATTRIBUTE_UNUSED;
lang_specific_driver (int *in_argc ATTRIBUTE_UNUSED,
const char *const **in_argv ATTRIBUTE_UNUSED,
int *in_added_libraries ATTRIBUTE_UNUSED)
{
#ifdef ENABLE_SHARED_LIBGCC
int i;
......@@ -96,7 +95,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
/* Called before linking. Returns 0 on success and -1 on failure. */
int
lang_specific_pre_link ()
lang_specific_pre_link (void)
{
return 0; /* Not used for C. */
}
......
/* Default macros to initialize the lang_hooks data structure.
Copyright 2001, 2002 Free Software Foundation, Inc.
Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com>
This file is part of GCC.
......@@ -28,7 +28,7 @@ struct diagnostic_context;
/* Provide a hook routine for alias sets that always returns 1. This is
used by languages that haven't deal with alias sets yet. */
extern HOST_WIDE_INT hook_get_alias_set_0 PARAMS ((tree));
extern HOST_WIDE_INT hook_get_alias_set_0 (tree);
/* Note to creators of new hooks:
......@@ -39,50 +39,48 @@ extern HOST_WIDE_INT hook_get_alias_set_0 PARAMS ((tree));
/* See langhooks.h for the definition and documentation of each hook. */
extern void lhd_do_nothing PARAMS ((void));
extern void lhd_do_nothing_t PARAMS ((tree));
extern void lhd_do_nothing_i PARAMS ((int));
extern void lhd_do_nothing_f PARAMS ((struct function *));
extern bool lhd_post_options PARAMS ((const char **));
extern HOST_WIDE_INT lhd_get_alias_set PARAMS ((tree));
extern tree lhd_return_tree PARAMS ((tree));
extern tree lhd_return_null_tree PARAMS ((tree));
extern int lhd_safe_from_p PARAMS ((rtx, tree));
extern int lhd_staticp PARAMS ((tree));
extern int lhd_unsafe_for_reeval PARAMS ((tree));
extern void lhd_clear_binding_stack PARAMS ((void));
extern void lhd_print_tree_nothing PARAMS ((FILE *, tree, int));
extern const char *lhd_decl_printable_name PARAMS ((tree, int));
extern rtx lhd_expand_expr PARAMS ((tree, rtx, enum machine_mode, int));
extern void lhd_print_error_function PARAMS ((struct diagnostic_context *,
const char *));
extern void lhd_set_decl_assembler_name PARAMS ((tree));
extern bool lhd_can_use_bit_fields_p PARAMS ((void));
extern bool lhd_warn_unused_global_decl PARAMS ((tree));
extern void lhd_incomplete_type_error PARAMS ((tree, tree));
extern tree lhd_type_promotes_to PARAMS ((tree));
extern bool lhd_decl_ok_for_sibcall PARAMS ((tree));
extern tree lhd_expr_size PARAMS ((tree));
extern size_t lhd_tree_size PARAMS ((enum tree_code));
extern void lhd_do_nothing (void);
extern void lhd_do_nothing_t (tree);
extern void lhd_do_nothing_i (int);
extern void lhd_do_nothing_f (struct function *);
extern bool lhd_post_options (const char **);
extern HOST_WIDE_INT lhd_get_alias_set (tree);
extern tree lhd_return_tree (tree);
extern tree lhd_return_null_tree (tree);
extern int lhd_safe_from_p (rtx, tree);
extern int lhd_staticp (tree);
extern int lhd_unsafe_for_reeval (tree);
extern void lhd_clear_binding_stack (void);
extern void lhd_print_tree_nothing (FILE *, tree, int);
extern const char *lhd_decl_printable_name (tree, int);
extern rtx lhd_expand_expr (tree, rtx, enum machine_mode, int);
extern void lhd_print_error_function (struct diagnostic_context *,
const char *);
extern void lhd_set_decl_assembler_name (tree);
extern bool lhd_can_use_bit_fields_p (void);
extern bool lhd_warn_unused_global_decl (tree);
extern void lhd_incomplete_type_error (tree, tree);
extern tree lhd_type_promotes_to (tree);
extern bool lhd_decl_ok_for_sibcall (tree);
extern tree lhd_expr_size (tree);
extern size_t lhd_tree_size (enum tree_code);
/* Declarations of default tree inlining hooks. */
tree lhd_tree_inlining_walk_subtrees PARAMS ((tree *, int *,
walk_tree_fn,
void *, void *));
int lhd_tree_inlining_cannot_inline_tree_fn PARAMS ((tree *));
int lhd_tree_inlining_disregard_inline_limits PARAMS ((tree));
tree lhd_tree_inlining_add_pending_fn_decls PARAMS ((void *, tree));
int lhd_tree_inlining_tree_chain_matters_p PARAMS ((tree));
int lhd_tree_inlining_auto_var_in_fn_p PARAMS ((tree, tree));
tree lhd_tree_inlining_copy_res_decl_for_inlining PARAMS ((tree, tree,
tree, void *,
int *, tree));
int lhd_tree_inlining_anon_aggr_type_p PARAMS ((tree));
int lhd_tree_inlining_start_inlining PARAMS ((tree));
void lhd_tree_inlining_end_inlining PARAMS ((tree));
tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
extern tree lhd_tree_inlining_walk_subtrees (tree *, int *, walk_tree_fn,
void *, void *);
extern int lhd_tree_inlining_cannot_inline_tree_fn (tree *);
extern int lhd_tree_inlining_disregard_inline_limits (tree);
extern tree lhd_tree_inlining_add_pending_fn_decls (void *, tree);
extern int lhd_tree_inlining_tree_chain_matters_p (tree);
extern int lhd_tree_inlining_auto_var_in_fn_p (tree, tree);
extern tree lhd_tree_inlining_copy_res_decl_for_inlining (tree, tree, tree,
void *, int *, tree);
extern int lhd_tree_inlining_anon_aggr_type_p (tree);
extern int lhd_tree_inlining_start_inlining (tree);
extern void lhd_tree_inlining_end_inlining (tree);
extern tree lhd_tree_inlining_convert_parm_for_inlining (tree, tree, tree);
void write_global_declarations PARAMS ((void));
extern void write_global_declarations (void);
#define LANG_HOOKS_NAME "GNU unknown"
#define LANG_HOOKS_IDENTIFIER_SIZE sizeof (struct lang_identifier)
......@@ -184,8 +182,8 @@ void write_global_declarations PARAMS ((void));
}
/* Tree dump hooks. */
bool lhd_tree_dump_dump_tree PARAMS ((void *, tree));
int lhd_tree_dump_type_quals PARAMS ((tree));
extern bool lhd_tree_dump_dump_tree (void *, tree);
extern int lhd_tree_dump_type_quals (tree);
#define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN lhd_tree_dump_dump_tree
#define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN lhd_tree_dump_type_quals
......
/* Generic partial redundancy elimination with lazy code motion support.
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -70,32 +71,22 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "insn-attr.h"
/* Edge based LCM routines. */
static void compute_antinout_edge PARAMS ((sbitmap *, sbitmap *,
sbitmap *, sbitmap *));
static void compute_earliest PARAMS ((struct edge_list *, int,
sbitmap *, sbitmap *,
sbitmap *, sbitmap *,
sbitmap *));
static void compute_laterin PARAMS ((struct edge_list *, sbitmap *,
sbitmap *, sbitmap *,
sbitmap *));
static void compute_insert_delete PARAMS ((struct edge_list *edge_list,
sbitmap *, sbitmap *,
sbitmap *, sbitmap *,
sbitmap *));
static void compute_antinout_edge (sbitmap *, sbitmap *, sbitmap *, sbitmap *);
static void compute_earliest (struct edge_list *, int, sbitmap *, sbitmap *,
sbitmap *, sbitmap *, sbitmap *);
static void compute_laterin (struct edge_list *, sbitmap *, sbitmap *,
sbitmap *, sbitmap *);
static void compute_insert_delete (struct edge_list *edge_list, sbitmap *,
sbitmap *, sbitmap *, sbitmap *, sbitmap *);
/* Edge based LCM routines on a reverse flowgraph. */
static void compute_farthest PARAMS ((struct edge_list *, int,
sbitmap *, sbitmap *,
sbitmap*, sbitmap *,
sbitmap *));
static void compute_nearerout PARAMS ((struct edge_list *, sbitmap *,
sbitmap *, sbitmap *,
sbitmap *));
static void compute_rev_insert_delete PARAMS ((struct edge_list *edge_list,
sbitmap *, sbitmap *,
sbitmap *, sbitmap *,
sbitmap *));
static void compute_farthest (struct edge_list *, int, sbitmap *, sbitmap *,
sbitmap*, sbitmap *, sbitmap *);
static void compute_nearerout (struct edge_list *, sbitmap *, sbitmap *,
sbitmap *, sbitmap *);
static void compute_rev_insert_delete (struct edge_list *edge_list, sbitmap *,
sbitmap *, sbitmap *, sbitmap *,
sbitmap *);
/* Edge based lcm routines. */
......@@ -104,11 +95,8 @@ static void compute_rev_insert_delete PARAMS ((struct edge_list *edge_list,
Other than that, its pretty much identical to compute_antinout. */
static void
compute_antinout_edge (antloc, transp, antin, antout)
sbitmap *antloc;
sbitmap *transp;
sbitmap *antin;
sbitmap *antout;
compute_antinout_edge (sbitmap *antloc, sbitmap *transp, sbitmap *antin,
sbitmap *antout)
{
basic_block bb;
edge e;
......@@ -189,10 +177,9 @@ compute_antinout_edge (antloc, transp, antin, antout)
/* Compute the earliest vector for edge based lcm. */
static void
compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest)
struct edge_list *edge_list;
int n_exprs;
sbitmap *antin, *antout, *avout, *kill, *earliest;
compute_earliest (struct edge_list *edge_list, int n_exprs, sbitmap *antin,
sbitmap *antout, sbitmap *avout, sbitmap *kill,
sbitmap *earliest)
{
sbitmap difference, temp_bitmap;
int x, num_edges;
......@@ -258,9 +245,8 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest)
to compute it. */
static void
compute_laterin (edge_list, earliest, antloc, later, laterin)
struct edge_list *edge_list;
sbitmap *earliest, *antloc, *later, *laterin;
compute_laterin (struct edge_list *edge_list, sbitmap *earliest,
sbitmap *antloc, sbitmap *later, sbitmap *laterin)
{
int num_edges, i;
edge e;
......@@ -361,10 +347,9 @@ compute_laterin (edge_list, earliest, antloc, later, laterin)
/* Compute the insertion and deletion points for edge based LCM. */
static void
compute_insert_delete (edge_list, antloc, later, laterin,
insert, delete)
struct edge_list *edge_list;
sbitmap *antloc, *later, *laterin, *insert, *delete;
compute_insert_delete (struct edge_list *edge_list, sbitmap *antloc,
sbitmap *later, sbitmap *laterin, sbitmap *insert,
sbitmap *delete)
{
int x;
basic_block bb;
......@@ -388,15 +373,9 @@ compute_insert_delete (edge_list, antloc, later, laterin,
map the insert vector to what edge an expression should be inserted on. */
struct edge_list *
pre_edge_lcm (file, n_exprs, transp, avloc, antloc, kill, insert, delete)
FILE *file ATTRIBUTE_UNUSED;
int n_exprs;
sbitmap *transp;
sbitmap *avloc;
sbitmap *antloc;
sbitmap *kill;
sbitmap **insert;
sbitmap **delete;
pre_edge_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
sbitmap *avloc, sbitmap *antloc, sbitmap *kill,
sbitmap **insert, sbitmap **delete)
{
sbitmap *antin, *antout, *earliest;
sbitmap *avin, *avout;
......@@ -491,8 +470,8 @@ pre_edge_lcm (file, n_exprs, transp, avloc, antloc, kill, insert, delete)
Return the number of passes we performed to iterate to a solution. */
void
compute_available (avloc, kill, avout, avin)
sbitmap *avloc, *kill, *avout, *avin;
compute_available (sbitmap *avloc, sbitmap *kill, sbitmap *avout,
sbitmap *avin)
{
edge e;
basic_block *worklist, *qin, *qout, *qend, bb;
......@@ -573,11 +552,9 @@ compute_available (avloc, kill, avout, avin)
/* Compute the farthest vector for edge based lcm. */
static void
compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin,
kill, farthest)
struct edge_list *edge_list;
int n_exprs;
sbitmap *st_avout, *st_avin, *st_antin, *kill, *farthest;
compute_farthest (struct edge_list *edge_list, int n_exprs,
sbitmap *st_avout, sbitmap *st_avin, sbitmap *st_antin,
sbitmap *kill, sbitmap *farthest)
{
sbitmap difference, temp_bitmap;
int x, num_edges;
......@@ -619,9 +596,8 @@ compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin,
implementation can be found before compute_laterin. */
static void
compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout)
struct edge_list *edge_list;
sbitmap *farthest, *st_avloc, *nearer, *nearerout;
compute_nearerout (struct edge_list *edge_list, sbitmap *farthest,
sbitmap *st_avloc, sbitmap *nearer, sbitmap *nearerout)
{
int num_edges, i;
edge e;
......@@ -702,10 +678,9 @@ compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout)
/* Compute the insertion and deletion points for edge based LCM. */
static void
compute_rev_insert_delete (edge_list, st_avloc, nearer, nearerout,
insert, delete)
struct edge_list *edge_list;
sbitmap *st_avloc, *nearer, *nearerout, *insert, *delete;
compute_rev_insert_delete (struct edge_list *edge_list, sbitmap *st_avloc,
sbitmap *nearer, sbitmap *nearerout,
sbitmap *insert, sbitmap *delete)
{
int x;
basic_block bb;
......@@ -729,16 +704,9 @@ compute_rev_insert_delete (edge_list, st_avloc, nearer, nearerout,
an expression should be inserted on. */
struct edge_list *
pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill,
insert, delete)
FILE *file ATTRIBUTE_UNUSED;
int n_exprs;
sbitmap *transp;
sbitmap *st_avloc;
sbitmap *st_antloc;
sbitmap *kill;
sbitmap **insert;
sbitmap **delete;
pre_edge_rev_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
sbitmap *st_avloc, sbitmap *st_antloc, sbitmap *kill,
sbitmap **insert, sbitmap **delete)
{
sbitmap *st_antin, *st_antout;
sbitmap *st_avout, *st_avin, *farthest;
......@@ -887,11 +855,11 @@ static sbitmap *comp;
static sbitmap *delete;
static sbitmap *insert;
static struct seginfo * new_seginfo PARAMS ((int, rtx, int, HARD_REG_SET));
static void add_seginfo PARAMS ((struct bb_info *, struct seginfo *));
static void reg_dies PARAMS ((rtx, HARD_REG_SET));
static void reg_becomes_live PARAMS ((rtx, rtx, void *));
static void make_preds_opaque PARAMS ((basic_block, int));
static struct seginfo * new_seginfo (int, rtx, int, HARD_REG_SET);
static void add_seginfo (struct bb_info *, struct seginfo *);
static void reg_dies (rtx, HARD_REG_SET);
static void reg_becomes_live (rtx, rtx, void *);
static void make_preds_opaque (basic_block, int);
#endif
#ifdef OPTIMIZE_MODE_SWITCHING
......@@ -900,11 +868,7 @@ static void make_preds_opaque PARAMS ((basic_block, int));
with the MODE, INSN, and basic block BB parameters. */
static struct seginfo *
new_seginfo (mode, insn, bb, regs_live)
int mode;
rtx insn;
int bb;
HARD_REG_SET regs_live;
new_seginfo (int mode, rtx insn, int bb, HARD_REG_SET regs_live)
{
struct seginfo *ptr;
ptr = xmalloc (sizeof (struct seginfo));
......@@ -921,9 +885,7 @@ new_seginfo (mode, insn, bb, regs_live)
INFO is the structure to be linked in. */
static void
add_seginfo (head, info)
struct bb_info *head;
struct seginfo *info;
add_seginfo (struct bb_info *head, struct seginfo *info)
{
struct seginfo *ptr;
......@@ -945,9 +907,7 @@ add_seginfo (head, info)
we are currently handling mode-switching for. */
static void
make_preds_opaque (b, j)
basic_block b;
int j;
make_preds_opaque (basic_block b, int j)
{
edge e;
......@@ -966,9 +926,7 @@ make_preds_opaque (b, j)
/* Record in LIVE that register REG died. */
static void
reg_dies (reg, live)
rtx reg;
HARD_REG_SET live;
reg_dies (rtx reg, HARD_REG_SET live)
{
int regno, nregs;
......@@ -986,10 +944,7 @@ reg_dies (reg, live)
This is called via note_stores. */
static void
reg_becomes_live (reg, setter, live)
rtx reg;
rtx setter ATTRIBUTE_UNUSED;
void *live;
reg_becomes_live (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *live)
{
int regno, nregs;
......@@ -1010,8 +965,7 @@ reg_becomes_live (reg, setter, live)
necessary mode switches. Return true if we did work. */
int
optimize_mode_switching (file)
FILE *file;
optimize_mode_switching (FILE *file)
{
rtx insn;
int e;
......
......@@ -31,8 +31,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Initialize loop optimizer. */
struct loops *
loop_optimizer_init (dumpfile)
FILE *dumpfile;
loop_optimizer_init (FILE *dumpfile)
{
struct loops *loops = xcalloc (1, sizeof (struct loops));
edge e;
......@@ -91,9 +90,7 @@ loop_optimizer_init (dumpfile)
/* Finalize loop optimizer. */
void
loop_optimizer_finalize (loops, dumpfile)
struct loops *loops;
FILE *dumpfile;
loop_optimizer_finalize (struct loops *loops, FILE *dumpfile)
{
basic_block bb;
......@@ -118,4 +115,3 @@ loop_optimizer_finalize (loops, dumpfile)
verify_flow_info ();
#endif
}
/* Loop unrolling and peeling.
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -66,27 +66,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
showed that this choice may affect performance in order of several %.
*/
static void decide_unrolling_and_peeling PARAMS ((struct loops *, int));
static void peel_loops_completely PARAMS ((struct loops *, int));
static void decide_peel_simple PARAMS ((struct loops *, struct loop *, int));
static void decide_peel_once_rolling PARAMS ((struct loops *, struct loop *, int));
static void decide_peel_completely PARAMS ((struct loops *, struct loop *, int));
static void decide_unroll_stupid PARAMS ((struct loops *, struct loop *, int));
static void decide_unroll_constant_iterations PARAMS ((struct loops *, struct loop *, int));
static void decide_unroll_runtime_iterations PARAMS ((struct loops *, struct loop *, int));
static void peel_loop_simple PARAMS ((struct loops *, struct loop *));
static void peel_loop_completely PARAMS ((struct loops *, struct loop *));
static void unroll_loop_stupid PARAMS ((struct loops *, struct loop *));
static void unroll_loop_constant_iterations PARAMS ((struct loops *,
struct loop *));
static void unroll_loop_runtime_iterations PARAMS ((struct loops *,
struct loop *));
static void decide_unrolling_and_peeling (struct loops *, int);
static void peel_loops_completely (struct loops *, int);
static void decide_peel_simple (struct loops *, struct loop *, int);
static void decide_peel_once_rolling (struct loops *, struct loop *, int);
static void decide_peel_completely (struct loops *, struct loop *, int);
static void decide_unroll_stupid (struct loops *, struct loop *, int);
static void decide_unroll_constant_iterations (struct loops *,
struct loop *, int);
static void decide_unroll_runtime_iterations (struct loops *, struct loop *,
int);
static void peel_loop_simple (struct loops *, struct loop *);
static void peel_loop_completely (struct loops *, struct loop *);
static void unroll_loop_stupid (struct loops *, struct loop *);
static void unroll_loop_constant_iterations (struct loops *, struct loop *);
static void unroll_loop_runtime_iterations (struct loops *, struct loop *);
/* Unroll and/or peel (depending on FLAGS) LOOPS. */
void
unroll_and_peel_loops (loops, flags)
struct loops *loops;
int flags;
unroll_and_peel_loops (struct loops *loops, int flags)
{
struct loop *loop, *next;
int check;
......@@ -152,9 +150,7 @@ unroll_and_peel_loops (loops, flags)
/* Check whether to peel LOOPS (depending on FLAGS) completely and do so. */
static void
peel_loops_completely (loops, flags)
struct loops *loops;
int flags;
peel_loops_completely (struct loops *loops, int flags)
{
struct loop *loop, *next;
......@@ -200,9 +196,7 @@ peel_loops_completely (loops, flags)
/* Decide whether unroll or peel LOOPS (depending on FLAGS) and how much. */
static void
decide_unrolling_and_peeling (loops, flags)
struct loops *loops;
int flags;
decide_unrolling_and_peeling (struct loops *loops, int flags)
{
struct loop *loop = loops->tree_root, *next;
......@@ -275,10 +269,8 @@ decide_unrolling_and_peeling (loops, flags)
/* Decide whether the LOOP is once rolling and suitable for complete
peeling. */
static void
decide_peel_once_rolling (loops, loop, flags)
struct loops *loops;
struct loop *loop;
int flags ATTRIBUTE_UNUSED;
decide_peel_once_rolling (struct loops *loops, struct loop *loop,
int flags ATTRIBUTE_UNUSED)
{
if (rtl_dump_file)
fprintf (rtl_dump_file, ";; Considering peeling once rolling loop\n");
......@@ -311,10 +303,8 @@ decide_peel_once_rolling (loops, loop, flags)
/* Decide whether the LOOP is suitable for complete peeling. */
static void
decide_peel_completely (loops, loop, flags)
struct loops *loops;
struct loop *loop;
int flags ATTRIBUTE_UNUSED;
decide_peel_completely (struct loops *loops, struct loop *loop,
int flags ATTRIBUTE_UNUSED)
{
unsigned npeel;
......@@ -406,9 +396,7 @@ decide_peel_completely (loops, loop, flags)
body; i++;
*/
static void
peel_loop_completely (loops, loop)
struct loops *loops;
struct loop *loop;
peel_loop_completely (struct loops *loops, struct loop *loop)
{
sbitmap wont_exit;
unsigned HOST_WIDE_INT npeel;
......@@ -453,10 +441,8 @@ peel_loop_completely (loops, loop)
/* Decide whether to unroll LOOP iterating constant number of times and how much. */
static void
decide_unroll_constant_iterations (loops, loop, flags)
struct loops *loops;
struct loop *loop;
int flags;
decide_unroll_constant_iterations (struct loops *loops, struct loop *loop,
int flags)
{
unsigned nunroll, nunroll_by_av, best_copies, best_unroll = -1, n_copies, i;
......@@ -565,9 +551,7 @@ decide_unroll_constant_iterations (loops, loop, flags)
}
*/
static void
unroll_loop_constant_iterations (loops, loop)
struct loops *loops;
struct loop *loop;
unroll_loop_constant_iterations (struct loops *loops, struct loop *loop)
{
unsigned HOST_WIDE_INT niter;
unsigned exit_mod;
......@@ -665,10 +649,8 @@ unroll_loop_constant_iterations (loops, loop)
/* Decide whether to unroll LOOP iterating runtime computable number of times
and how much. */
static void
decide_unroll_runtime_iterations (loops, loop, flags)
struct loops *loops;
struct loop *loop;
int flags;
decide_unroll_runtime_iterations (struct loops *loops, struct loop *loop,
int flags)
{
unsigned nunroll, nunroll_by_av, i;
......@@ -768,9 +750,7 @@ decide_unroll_runtime_iterations (loops, loop, flags)
}
*/
static void
unroll_loop_runtime_iterations (loops, loop)
struct loops *loops;
struct loop *loop;
unroll_loop_runtime_iterations (struct loops *loops, struct loop *loop)
{
rtx niter, init_code, branch_code, jump, label;
unsigned i, j, p;
......@@ -966,10 +946,7 @@ unroll_loop_runtime_iterations (loops, loop)
/* Decide whether to simply peel LOOP and how much. */
static void
decide_peel_simple (loops, loop, flags)
struct loops *loops;
struct loop *loop;
int flags;
decide_peel_simple (struct loops *loops, struct loop *loop, int flags)
{
unsigned npeel;
......@@ -1064,9 +1041,7 @@ decide_peel_simple (loops, loop, flags)
end: ;
*/
static void
peel_loop_simple (loops, loop)
struct loops *loops;
struct loop *loop;
peel_loop_simple (struct loops *loops, struct loop *loop)
{
sbitmap wont_exit;
unsigned npeel = loop->lpt_decision.times;
......@@ -1087,10 +1062,7 @@ peel_loop_simple (loops, loop)
/* Decide whether to unroll LOOP stupidly and how much. */
static void
decide_unroll_stupid (loops, loop, flags)
struct loops *loops;
struct loop *loop;
int flags;
decide_unroll_stupid (struct loops *loops, struct loop *loop, int flags)
{
unsigned nunroll, nunroll_by_av, i;
......@@ -1179,9 +1151,7 @@ decide_unroll_stupid (loops, loop, flags)
}
*/
static void
unroll_loop_stupid (loops, loop)
struct loops *loops;
struct loop *loop;
unroll_loop_stupid (struct loops *loops, struct loop *loop)
{
sbitmap wont_exit;
unsigned nunroll = loop->lpt_decision.times;
......
/* Loop unswitching for GNU compiler.
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -78,18 +78,16 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
containing subloops would not be very large compared to complications
with handling this case. */
static struct loop *unswitch_loop PARAMS ((struct loops *,
struct loop *, basic_block));
static void unswitch_single_loop PARAMS ((struct loops *, struct loop *,
rtx, int));
static bool may_unswitch_on_p PARAMS ((struct loops *, basic_block,
struct loop *, basic_block *));
static rtx reversed_condition PARAMS ((rtx));
static struct loop *unswitch_loop (struct loops *, struct loop *,
basic_block);
static void unswitch_single_loop (struct loops *, struct loop *, rtx, int);
static bool may_unswitch_on_p (struct loops *, basic_block, struct loop *,
basic_block *);
static rtx reversed_condition (rtx);
/* Main entry point. Perform loop unswitching on all suitable LOOPS. */
void
unswitch_loops (loops)
struct loops *loops;
unswitch_loops (struct loops *loops)
{
int i, num;
struct loop *loop;
......@@ -119,11 +117,8 @@ unswitch_loops (loops)
basic blocks (for what it means see comments below). List of basic blocks
inside LOOP is provided in BODY to save time. */
static bool
may_unswitch_on_p (loops, bb, loop, body)
struct loops *loops;
basic_block bb;
struct loop *loop;
basic_block *body;
may_unswitch_on_p (struct loops *loops, basic_block bb, struct loop *loop,
basic_block *body)
{
rtx test;
unsigned i;
......@@ -159,8 +154,7 @@ may_unswitch_on_p (loops, bb, loop, body)
/* Reverses CONDition; returns NULL if we cannot. */
static rtx
reversed_condition (cond)
rtx cond;
reversed_condition (rtx cond)
{
enum rtx_code reversed;
reversed = reversed_comparison_code (cond, NULL);
......@@ -177,11 +171,8 @@ reversed_condition (cond)
number of unswitchings done; do not allow it to grow too much, it is too
easy to create example on that the code would grow exponentially. */
static void
unswitch_single_loop (loops, loop, cond_checked, num)
struct loops *loops;
struct loop *loop;
rtx cond_checked;
int num;
unswitch_single_loop (struct loops *loops, struct loop *loop,
rtx cond_checked, int num)
{
basic_block *bbs, bb;
struct loop *nloop;
......@@ -330,10 +321,7 @@ unswitch_single_loop (loops, loop, cond_checked, num)
for the condition we unswitch on. Returns NULL if impossible, new
loop otherwise. */
static struct loop *
unswitch_loop (loops, loop, unswitch_on)
struct loops *loops;
struct loop *loop;
basic_block unswitch_on;
unswitch_loop (struct loops *loops, struct loop *loop, basic_block unswitch_on)
{
edge entry, latch_edge;
basic_block switch_bb, unswitch_on_alt, src;
......
/* Loop optimization definitions for GCC
Copyright (C) 1991, 1995, 1998, 1999, 2000, 2001, 2002
Copyright (C) 1991, 1995, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -398,34 +398,31 @@ extern FILE *loop_dump_stream;
/* Forward declarations for non-static functions declared in loop.c and
unroll.c. */
int loop_invariant_p PARAMS ((const struct loop *, rtx));
rtx get_condition_for_loop PARAMS ((const struct loop *, rtx));
void loop_iv_add_mult_hoist PARAMS ((const struct loop *, rtx, rtx, rtx, rtx));
void loop_iv_add_mult_sink PARAMS ((const struct loop *, rtx, rtx, rtx, rtx));
void loop_iv_add_mult_emit_before PARAMS ((const struct loop *, rtx,
rtx, rtx, rtx,
basic_block, rtx));
rtx express_from PARAMS ((struct induction *, struct induction *));
rtx extend_value_for_giv PARAMS ((struct induction *, rtx));
void unroll_loop PARAMS ((struct loop *, int, int));
rtx biv_total_increment PARAMS ((const struct iv_class *));
unsigned HOST_WIDE_INT loop_iterations PARAMS ((struct loop *));
int precondition_loop_p PARAMS ((const struct loop *,
rtx *, rtx *, rtx *,
enum machine_mode *mode));
rtx final_biv_value PARAMS ((const struct loop *, struct iv_class *));
rtx final_giv_value PARAMS ((const struct loop *, struct induction *));
void emit_unrolled_add PARAMS ((rtx, rtx, rtx));
int back_branch_in_range_p PARAMS ((const struct loop *, rtx));
int loop_insn_first_p PARAMS ((rtx, rtx));
typedef rtx (*loop_insn_callback) PARAMS ((struct loop *, rtx, int, int));
void for_each_insn_in_loop PARAMS ((struct loop *, loop_insn_callback));
rtx loop_insn_emit_before PARAMS((const struct loop *, basic_block,
rtx, rtx));
rtx loop_insn_sink PARAMS((const struct loop *, rtx));
rtx loop_insn_hoist PARAMS((const struct loop *, rtx));
extern int loop_invariant_p (const struct loop *, rtx);
extern rtx get_condition_for_loop (const struct loop *, rtx);
extern void loop_iv_add_mult_hoist (const struct loop *, rtx, rtx, rtx, rtx);
extern void loop_iv_add_mult_sink (const struct loop *, rtx, rtx, rtx, rtx);
extern void loop_iv_add_mult_emit_before (const struct loop *, rtx, rtx,
rtx, rtx, basic_block, rtx);
extern rtx express_from (struct induction *, struct induction *);
extern rtx extend_value_for_giv (struct induction *, rtx);
extern void unroll_loop (struct loop *, int, int);
extern rtx biv_total_increment (const struct iv_class *);
extern unsigned HOST_WIDE_INT loop_iterations (struct loop *);
extern int precondition_loop_p (const struct loop *, rtx *, rtx *, rtx *,
enum machine_mode *mode);
extern rtx final_biv_value (const struct loop *, struct iv_class *);
extern rtx final_giv_value (const struct loop *, struct induction *);
extern void emit_unrolled_add (rtx, rtx, rtx);
extern int back_branch_in_range_p (const struct loop *, rtx);
extern int loop_insn_first_p (rtx, rtx);
typedef rtx (*loop_insn_callback) (struct loop *, rtx, int, int);
extern void for_each_insn_in_loop (struct loop *, loop_insn_callback);
extern rtx loop_insn_emit_before (const struct loop *, basic_block, rtx, rtx);
extern rtx loop_insn_sink (const struct loop *, rtx);
extern rtx loop_insn_hoist (const struct loop *, rtx);
/* Forward declarations for non-static functions declared in doloop.c. */
int doloop_optimize PARAMS ((const struct loop *));
extern int doloop_optimize (const struct loop *);
/* Machine mode definitions for GCC; included by rtl.h and tree.h.
Copyright (C) 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2001
Copyright (C) 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -136,28 +136,27 @@ extern const unsigned char mode_wider_mode[NUM_MACHINE_MODES];
If LIMIT is nonzero, then don't use modes bigger than MAX_FIXED_MODE_SIZE.
The value is BLKmode if no other mode is found. */
extern enum machine_mode mode_for_size PARAMS ((unsigned int,
enum mode_class, int));
extern enum machine_mode mode_for_size (unsigned int, enum mode_class, int);
/* Similar, but find the smallest mode for a given width. */
extern enum machine_mode smallest_mode_for_size
PARAMS ((unsigned int, enum mode_class));
extern enum machine_mode smallest_mode_for_size (unsigned int,
enum mode_class);
/* Return an integer mode of the exact same size as the input mode,
or BLKmode on failure. */
extern enum machine_mode int_mode_for_mode PARAMS ((enum machine_mode));
extern enum machine_mode int_mode_for_mode (enum machine_mode);
/* Find the best mode to use to access a bit field. */
extern enum machine_mode get_best_mode PARAMS ((int, int, unsigned int,
enum machine_mode, int));
extern enum machine_mode get_best_mode (int, int, unsigned int,
enum machine_mode, int);
/* Determine alignment, 1<=result<=BIGGEST_ALIGNMENT. */
extern unsigned get_mode_alignment PARAMS ((enum machine_mode));
extern unsigned get_mode_alignment (enum machine_mode);
#define GET_MODE_ALIGNMENT(MODE) get_mode_alignment (MODE)
......
......@@ -23,16 +23,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tm.h"
#include "toplev.h"
int main PARAMS ((int argc, char **argv));
int main (int argc, char **argv);
/* We define main() to call toplev_main(), which is defined in toplev.c.
We do this in a separate file in order to allow the language front-end
to define a different main(), if it so desires. */
int
main (argc, argv)
int argc;
char **argv;
main (int argc, char **argv)
{
return toplev_main (argc, (const char **) argv);
}
/* Multibyte Character Functions.
Copyright (C) 1998 Free Software Foundation, Inc.
Copyright (C) 1998, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -94,10 +94,7 @@ const char *literal_codeset = NULL;
it treats locale names of the form "C-..." specially. */
int
local_mbtowc (pwc, s, n)
wchar_t *pwc;
const char *s;
size_t n;
local_mbtowc (wchar_t *pwc, const char *s, size_t n)
{
static JIS_STATE save_state = ASCII;
JIS_STATE curr_state = save_state;
......@@ -298,9 +295,7 @@ local_mbtowc (pwc, s, n)
it treats locale names of the form "C-..." specially. */
int
local_mblen (s, n)
const char *s;
size_t n;
local_mblen (const char *s, size_t n)
{
return local_mbtowc (NULL, s, n);
}
......@@ -311,7 +306,7 @@ local_mblen (s, n)
except it treats locale names of the form "C-..." specially. */
int
local_mb_cur_max ()
local_mb_cur_max (void)
{
if (literal_codeset == NULL || strlen (literal_codeset) <= 1)
;
......
/* Various declarations for functions found in mbchar.c
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -31,9 +31,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define ISEUCJP(c) ((c) >= 0xa1 && (c) <= 0xfe)
#define ISJIS(c) ((c) >= 0x21 && (c) <= 0x7e)
extern int local_mbtowc PARAMS ((wchar_t *, const char *, size_t));
extern int local_mblen PARAMS ((const char *, size_t));
extern int local_mb_cur_max PARAMS ((void));
extern int local_mbtowc (wchar_t *, const char *, size_t);
extern int local_mblen (const char *, size_t);
extern int local_mb_cur_max (void);
/* The locale being used for multibyte characters in string/char literals. */
extern const char *literal_codeset;
......
/* Dependency generator for Makefile fragments.
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Zack Weinberg, Mar 2000
This program is free software; you can redistribute it and/or modify it
......@@ -39,7 +39,7 @@ struct deps
unsigned int deps_size;
};
static const char *munge PARAMS ((const char *));
static const char *munge (const char *);
/* Given a filename, quote characters in that filename which are
significant to Make. Note that it's not possible to quote all such
......@@ -49,8 +49,7 @@ static const char *munge PARAMS ((const char *));
3.76.1.) */
static const char *
munge (filename)
const char *filename;
munge (const char *filename)
{
int len;
const char *p, *q;
......@@ -111,7 +110,7 @@ munge (filename)
/* Public routines. */
struct deps *
deps_init ()
deps_init (void)
{
struct deps *d = (struct deps *) xmalloc (sizeof (struct deps));
......@@ -129,8 +128,7 @@ deps_init ()
}
void
deps_free (d)
struct deps *d;
deps_free (struct deps *d)
{
unsigned int i;
......@@ -154,10 +152,7 @@ deps_free (d)
/* Adds a target T. We make a copy, so it need not be a permanent
string. QUOTE is true if the string should be quoted. */
void
deps_add_target (d, t, quote)
struct deps *d;
const char *t;
int quote;
deps_add_target (struct deps *d, const char *t, int quote)
{
if (d->ntargets == d->targets_size)
{
......@@ -178,9 +173,7 @@ deps_add_target (d, t, quote)
string as the default target in interpreted as stdin. The string
is quoted for MAKE. */
void
deps_add_default_target (d, tgt)
struct deps *d;
const char *tgt;
deps_add_default_target (struct deps *d, const char *tgt)
{
/* Only if we have no targets. */
if (d->ntargets)
......@@ -209,9 +202,7 @@ deps_add_default_target (d, tgt)
}
void
deps_add_dep (d, t)
struct deps *d;
const char *t;
deps_add_dep (struct deps *d, const char *t)
{
t = munge (t); /* Also makes permanent copy. */
......@@ -225,10 +216,7 @@ deps_add_dep (d, t)
}
void
deps_write (d, fp, colmax)
const struct deps *d;
FILE *fp;
unsigned int colmax;
deps_write (const struct deps *d, FILE *fp, unsigned int colmax)
{
unsigned int size, i, column;
......@@ -277,9 +265,7 @@ deps_write (d, fp, colmax)
}
void
deps_phony_targets (d, fp)
const struct deps *d;
FILE *fp;
deps_phony_targets (const struct deps *d, FILE *fp)
{
unsigned int i;
......@@ -297,9 +283,7 @@ deps_phony_targets (d, fp)
error number will be in errno. */
int
deps_save (deps, f)
struct deps *deps;
FILE *f;
deps_save (struct deps *deps, FILE *f)
{
unsigned int i;
......@@ -328,10 +312,7 @@ deps_save (deps, f)
in which case that filename is skipped. */
int
deps_restore (deps, fd, self)
struct deps *deps;
FILE *fd;
const char *self;
deps_restore (struct deps *deps, FILE *fd, const char *self)
{
unsigned int i, count;
size_t num_to_read;
......
/* Dependency generator for Makefile fragments.
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
Contributed by Zack Weinberg, Mar 2000
This program is free software; you can redistribute it and/or modify it
......@@ -29,45 +29,44 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct deps;
/* Create a deps buffer. */
extern struct deps *deps_init PARAMS ((void));
extern struct deps *deps_init (void);
/* Destroy a deps buffer. */
extern void deps_free PARAMS ((struct deps *));
extern void deps_free (struct deps *);
/* Add a target (appears on left side of the colon) to the deps list. Takes
a boolean indicating whether to quote the target for MAKE. */
extern void deps_add_target PARAMS ((struct deps *, const char *, int));
extern void deps_add_target (struct deps *, const char *, int);
/* Sets the default target if none has been given already. An empty
string as the default target is interpreted as stdin. */
extern void deps_add_default_target PARAMS ((struct deps *, const char *));
extern void deps_add_default_target (struct deps *, const char *);
/* Add a dependency (appears on the right side of the colon) to the
deps list. Dependencies will be printed in the order that they
were entered with this function. By convention, the first
dependency entered should be the primary source file. */
extern void deps_add_dep PARAMS ((struct deps *, const char *));
extern void deps_add_dep (struct deps *, const char *);
/* Write out a deps buffer to a specified file. The third argument
is the number of columns to word-wrap at (0 means don't wrap). */
extern void deps_write PARAMS ((const struct deps *, FILE *,
unsigned int));
extern void deps_write (const struct deps *, FILE *, unsigned int);
/* Write out a deps buffer to a file, in a form that can be read back
with deps_restore. Returns nonzero on error, in which case the
error number will be in errno. */
extern int deps_save PARAMS ((struct deps *, FILE *));
extern int deps_save (struct deps *, FILE *);
/* Read back dependency information written with deps_save into
the deps buffer. The third argument may be NULL, in which case
the dependency information is just skipped, or it may be a filename,
in which case that filename is skipped. */
extern int deps_restore PARAMS ((struct deps *, FILE *, const char *));
extern int deps_restore (struct deps *, FILE *, const char *);
/* For each dependency *except the first*, emit a dummy rule for that
file, causing it to depend on nothing. This is used to work around
the intermediate-file deletion misfeature in Make, in some
automatic dependency schemes. */
extern void deps_phony_targets PARAMS ((const struct deps *, FILE *));
extern void deps_phony_targets (const struct deps *, FILE *);
#endif /* ! GCC_MKDEPS_H */
......@@ -269,7 +269,7 @@ extern enum insn_code reload_out_optab[NUM_MACHINE_MODES];
extern GTY(()) optab code_to_optab[NUM_RTX_CODE + 1];
typedef rtx (*rtxfun) PARAMS ((rtx));
typedef rtx (*rtxfun) (rtx);
/* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
gives the gen_function to make a branch to test that condition. */
......@@ -298,43 +298,43 @@ extern enum insn_code clrstr_optab[NUM_MACHINE_MODES];
/* Define functions given in optabs.c. */
/* Expand a binary operation given optab and rtx operands. */
extern rtx expand_binop PARAMS ((enum machine_mode, optab, rtx, rtx, rtx,
int, enum optab_methods));
extern rtx expand_binop (enum machine_mode, optab, rtx, rtx, rtx, int,
enum optab_methods);
/* Expand a binary operation with both signed and unsigned forms. */
extern rtx sign_expand_binop PARAMS ((enum machine_mode, optab, optab, rtx,
rtx, rtx, int, enum optab_methods));
extern rtx sign_expand_binop (enum machine_mode, optab, optab, rtx, rtx,
rtx, int, enum optab_methods);
/* Generate code to perform an operation on two operands with two results. */
extern int expand_twoval_binop PARAMS ((optab, rtx, rtx, rtx, rtx, int));
extern int expand_twoval_binop (optab, rtx, rtx, rtx, rtx, int);
/* Expand a unary arithmetic operation given optab rtx operand. */
extern rtx expand_unop PARAMS ((enum machine_mode, optab, rtx, rtx, int));
extern rtx expand_unop (enum machine_mode, optab, rtx, rtx, int);
/* Expand the absolute value operation. */
extern rtx expand_abs_nojump PARAMS ((enum machine_mode, rtx, rtx, int));
extern rtx expand_abs PARAMS ((enum machine_mode, rtx, rtx, int, int));
extern rtx expand_abs_nojump (enum machine_mode, rtx, rtx, int);
extern rtx expand_abs (enum machine_mode, rtx, rtx, int, int);
/* Expand the complex absolute value operation. */
extern rtx expand_complex_abs PARAMS ((enum machine_mode, rtx, rtx, int));
extern rtx expand_complex_abs (enum machine_mode, rtx, rtx, int);
/* Generate an instruction with a given INSN_CODE with an output and
an input. */
extern void emit_unop_insn PARAMS ((int, rtx, rtx, enum rtx_code));
extern void emit_unop_insn (int, rtx, rtx, enum rtx_code);
/* Emit code to perform a series of operations on a multi-word quantity, one
word at a time. */
extern rtx emit_no_conflict_block PARAMS ((rtx, rtx, rtx, rtx, rtx));
extern rtx emit_no_conflict_block (rtx, rtx, rtx, rtx, rtx);
/* Emit one rtl instruction to store zero in specified rtx. */
extern void emit_clr_insn PARAMS ((rtx));
extern void emit_clr_insn (rtx);
/* Emit one rtl insn to store 1 in specified rtx assuming it contains 0. */
extern void emit_0_to_1_insn PARAMS ((rtx));
extern void emit_0_to_1_insn (rtx);
/* Emit one rtl insn to compare two rtx's. */
extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
enum machine_mode, int));
extern void emit_cmp_insn (rtx, rtx, enum rtx_code, rtx, enum machine_mode,
int);
/* The various uses that a comparison can have; used by can_compare_p:
jumps, conditional moves, store flag operations. */
......@@ -347,30 +347,29 @@ enum can_compare_purpose
/* Nonzero if a compare of mode MODE can be done straightforwardly
(without splitting it into pieces). */
extern int can_compare_p PARAMS ((enum rtx_code, enum machine_mode,
enum can_compare_purpose));
extern int can_compare_p (enum rtx_code, enum machine_mode,
enum can_compare_purpose);
extern rtx prepare_operand PARAMS ((int, rtx, int, enum machine_mode,
enum machine_mode, int));
extern rtx prepare_operand (int, rtx, int, enum machine_mode,
enum machine_mode, int);
/* Return the INSN_CODE to use for an extend operation. */
extern enum insn_code can_extend_p PARAMS ((enum machine_mode,
enum machine_mode, int));
extern enum insn_code can_extend_p (enum machine_mode, enum machine_mode, int);
/* Generate the body of an insn to extend Y (with mode MFROM)
into X (with mode MTO). Do zero-extension if UNSIGNEDP is nonzero. */
extern rtx gen_extend_insn PARAMS ((rtx, rtx, enum machine_mode,
enum machine_mode, int));
extern rtx gen_extend_insn (rtx, rtx, enum machine_mode,
enum machine_mode, int);
/* Initialize the tables that control conversion between fixed and
floating values. */
extern void init_fixtab PARAMS ((void));
extern void init_floattab PARAMS ((void));
extern void init_fixtab (void);
extern void init_floattab (void);
/* Generate code for a FLOAT_EXPR. */
extern void expand_float PARAMS ((rtx, rtx, int));
extern void expand_float (rtx, rtx, int);
/* Generate code for a FIX_EXPR. */
extern void expand_fix PARAMS ((rtx, rtx, int));
extern void expand_fix (rtx, rtx, int);
#endif /* GCC_OPTABS_H */
......@@ -45,24 +45,23 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "except.h"
#include "tree.h"
static int reload_cse_noop_set_p PARAMS ((rtx));
static void reload_cse_simplify PARAMS ((rtx, rtx));
static void reload_cse_regs_1 PARAMS ((rtx));
static int reload_cse_simplify_set PARAMS ((rtx, rtx));
static int reload_cse_simplify_operands PARAMS ((rtx, rtx));
static int reload_cse_noop_set_p (rtx);
static void reload_cse_simplify (rtx, rtx);
static void reload_cse_regs_1 (rtx);
static int reload_cse_simplify_set (rtx, rtx);
static int reload_cse_simplify_operands (rtx, rtx);
static void reload_combine PARAMS ((void));
static void reload_combine_note_use PARAMS ((rtx *, rtx));
static void reload_combine_note_store PARAMS ((rtx, rtx, void *));
static void reload_combine (void);
static void reload_combine_note_use (rtx *, rtx);
static void reload_combine_note_store (rtx, rtx, void *);
static void reload_cse_move2add PARAMS ((rtx));
static void move2add_note_store PARAMS ((rtx, rtx, void *));
static void reload_cse_move2add (rtx);
static void move2add_note_store (rtx, rtx, void *);
/* Call cse / combine like post-reload optimization phases.
FIRST is the first instruction. */
void
reload_cse_regs (first)
rtx first ATTRIBUTE_UNUSED;
reload_cse_regs (rtx first ATTRIBUTE_UNUSED)
{
reload_cse_regs_1 (first);
reload_combine ();
......@@ -73,8 +72,7 @@ reload_cse_regs (first)
/* See whether a single set SET is a noop. */
static int
reload_cse_noop_set_p (set)
rtx set;
reload_cse_noop_set_p (rtx set)
{
if (cselib_reg_set_mode (SET_DEST (set)) != GET_MODE (SET_DEST (set)))
return 0;
......@@ -84,9 +82,7 @@ reload_cse_noop_set_p (set)
/* Try to simplify INSN. */
static void
reload_cse_simplify (insn, testreg)
rtx insn;
rtx testreg;
reload_cse_simplify (rtx insn, rtx testreg)
{
rtx body = PATTERN (insn);
......@@ -180,8 +176,7 @@ reload_cse_simplify (insn, testreg)
if possible, much like an optional reload would. */
static void
reload_cse_regs_1 (first)
rtx first;
reload_cse_regs_1 (rtx first)
{
rtx insn;
rtx testreg = gen_rtx_REG (VOIDmode, -1);
......@@ -209,9 +204,7 @@ reload_cse_regs_1 (first)
and change the set into a register copy. */
static int
reload_cse_simplify_set (set, insn)
rtx set;
rtx insn;
reload_cse_simplify_set (rtx set, rtx insn)
{
int did_change = 0;
int dreg;
......@@ -354,9 +347,7 @@ reload_cse_simplify_set (set, insn)
hard registers. */
static int
reload_cse_simplify_operands (insn, testreg)
rtx insn;
rtx testreg;
reload_cse_simplify_operands (rtx insn, rtx testreg)
{
int i, j;
......@@ -629,7 +620,7 @@ static int reload_combine_ruid;
(label_live[CODE_LABEL_NUMBER (LABEL) - min_labelno])
static void
reload_combine ()
reload_combine (void)
{
rtx insn, set;
int first_index_reg = -1;
......@@ -922,9 +913,7 @@ reload_combine ()
accordingly. Called via note_stores from reload_combine. */
static void
reload_combine_note_store (dst, set, data)
rtx dst, set;
void *data ATTRIBUTE_UNUSED;
reload_combine_note_store (rtx dst, rtx set, void *data ATTRIBUTE_UNUSED)
{
int regno = 0;
int i;
......@@ -972,8 +961,7 @@ reload_combine_note_store (dst, set, data)
*XP is the pattern of INSN, or a part of it.
Called from reload_combine, and recursively by itself. */
static void
reload_combine_note_use (xp, insn)
rtx *xp, insn;
reload_combine_note_use (rtx *xp, rtx insn)
{
rtx x = *xp;
enum rtx_code code = x->code;
......@@ -1131,8 +1119,7 @@ static int move2add_last_label_luid;
GET_MODE_BITSIZE (INMODE))))
static void
reload_cse_move2add (first)
rtx first;
reload_cse_move2add (rtx first)
{
int i;
rtx insn;
......@@ -1374,9 +1361,7 @@ reload_cse_move2add (first)
Called from reload_cse_move2add via note_stores. */
static void
move2add_note_store (dst, set, data)
rtx dst, set;
void *data ATTRIBUTE_UNUSED;
move2add_note_store (rtx dst, rtx set, void *data ATTRIBUTE_UNUSED)
{
unsigned int regno = 0;
unsigned int i;
......
/* Utility to update paths from internal to external forms.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -76,21 +76,20 @@ Boston, MA 02111-1307, USA. */
static const char *std_prefix = PREFIX;
static const char *get_key_value PARAMS ((char *));
static char *translate_name PARAMS ((char *));
static char *save_string PARAMS ((const char *, int));
static void tr PARAMS ((char *, int, int));
static const char *get_key_value (char *);
static char *translate_name (char *);
static char *save_string (const char *, int);
static void tr (char *, int, int);
#if defined(_WIN32) && defined(ENABLE_WIN32_REGISTRY)
static char *lookup_key PARAMS ((char *));
static char *lookup_key (char *);
static HKEY reg_key = (HKEY) INVALID_HANDLE_VALUE;
#endif
/* Given KEY, as above, return its value. */
static const char *
get_key_value (key)
char *key;
get_key_value (char *key)
{
const char *prefix = 0;
char *temp = 0;
......@@ -114,9 +113,7 @@ get_key_value (key)
/* Return a copy of a string that has been placed in the heap. */
static char *
save_string (s, len)
const char *s;
int len;
save_string (const char *s, int len)
{
char *result = xmalloc (len + 1);
......@@ -130,8 +127,7 @@ save_string (s, len)
/* Look up "key" in the registry, as above. */
static char *
lookup_key (key)
char *key;
lookup_key (char *key)
{
char *dst;
DWORD size;
......@@ -183,8 +179,7 @@ lookup_key (key)
Otherwise, return the given name. */
static char *
translate_name (name)
char *name;
translate_name (char *name)
{
char code;
char *key, *old_name;
......@@ -233,9 +228,7 @@ translate_name (name)
/* In a NUL-terminated STRING, replace character C1 with C2 in-place. */
static void
tr (string, c1, c2)
char *string;
int c1, c2;
tr (char *string, int c1, int c2)
{
do
{
......@@ -250,9 +243,7 @@ tr (string, c1, c2)
freeing it. */
char *
update_path (path, key)
const char *path;
const char *key;
update_path (const char *path, const char *key)
{
char *result, *p;
......@@ -352,9 +343,7 @@ update_path (path, key)
/* Reset the standard prefix. */
void
set_std_prefix (prefix, len)
const char *prefix;
int len;
set_std_prefix (const char *prefix, int len)
{
std_prefix = save_string (prefix, len);
}
/* Provide prototypes for functions exported from prefix.c.
Copyright (C) 1999 Free Software Foundation, Inc.
Copyright (C) 1999, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -25,7 +25,7 @@ Boston, MA 02111-1307, USA. */
/* Update PATH using KEY if PATH starts with PREFIX. The returned
string is always malloc-ed, and the caller is responsible for
freeing it. */
extern char *update_path PARAMS ((const char *path, const char *key));
extern void set_std_prefix PARAMS ((const char *, int));
extern char *update_path (const char *path, const char *key);
extern void set_std_prefix (const char *, int);
#endif /* ! GCC_PREFIX_H */
......@@ -58,7 +58,7 @@ static int sawclose = 0;
static int indent;
static void print_rtx PARAMS ((rtx));
static void print_rtx (rtx);
/* String printed at beginning of each RTL when it is dumped.
This string is set to ASM_COMMENT_START when the RTL is dumped in
......@@ -80,9 +80,7 @@ int dump_for_graph;
static int debug_call_placeholder_verbose;
void
print_mem_expr (outfile, expr)
FILE *outfile;
tree expr;
print_mem_expr (FILE *outfile, tree expr)
{
if (TREE_CODE (expr) == COMPONENT_REF)
{
......@@ -111,8 +109,7 @@ print_mem_expr (outfile, expr)
/* Print IN_RTX onto OUTFILE. This is the recursive part of printing. */
static void
print_rtx (in_rtx)
rtx in_rtx;
print_rtx (rtx in_rtx)
{
int i = 0;
int j;
......@@ -638,10 +635,7 @@ print_rtx (in_rtx)
characters. */
void
print_inline_rtx (outf, x, ind)
FILE *outf;
rtx x;
int ind;
print_inline_rtx (FILE *outf, rtx x, int ind)
{
int oldsaw = sawclose;
int oldindent = indent;
......@@ -657,8 +651,7 @@ print_inline_rtx (outf, x, ind)
/* Call this function from the debugger to see what X looks like. */
void
debug_rtx (x)
rtx x;
debug_rtx (rtx x)
{
outfile = stderr;
sawclose = 0;
......@@ -678,9 +671,7 @@ int debug_rtx_count = 0; /* 0 is treated as equivalent to 1 */
EG: -5 prints 2 rtx's on either side (in addition to the specified rtx). */
void
debug_rtx_list (x, n)
rtx x;
int n;
debug_rtx_list (rtx x, int n)
{
int i,count;
rtx insn;
......@@ -707,8 +698,7 @@ debug_rtx_list (x, n)
/* Call this function to print an rtx list from START to END inclusive. */
void
debug_rtx_range (start, end)
rtx start, end;
debug_rtx_range (rtx start, rtx end)
{
while (1)
{
......@@ -725,9 +715,7 @@ debug_rtx_range (start, end)
The found insn is returned to enable further debugging analysis. */
rtx
debug_rtx_find (x, uid)
rtx x;
int uid;
debug_rtx_find (rtx x, int uid)
{
while (x != 0 && INSN_UID (x) != uid)
x = NEXT_INSN (x);
......@@ -750,9 +738,7 @@ debug_rtx_find (x, uid)
If RTX_FIRST is not an insn, then it alone is printed, with no newline. */
void
print_rtl (outf, rtx_first)
FILE *outf;
rtx rtx_first;
print_rtl (FILE *outf, rtx rtx_first)
{
rtx tmp_rtx;
......@@ -793,9 +779,7 @@ print_rtl (outf, rtx_first)
/* Return nonzero if we actually printed anything. */
int
print_rtl_single (outf, x)
FILE *outf;
rtx x;
print_rtl_single (FILE *outf, rtx x)
{
outfile = outf;
sawclose = 0;
......@@ -815,9 +799,7 @@ print_rtl_single (outf, x)
if RTX is a CONST_INT then print in decimal format. */
void
print_simple_rtl (outf, x)
FILE *outf;
rtx x;
print_simple_rtl (FILE *outf, rtx x)
{
flag_simple = 1;
print_rtl (outf, x);
......
......@@ -47,8 +47,7 @@ static struct bucket **table;
down to a depth of six. */
void
debug_tree (node)
tree node;
debug_tree (tree node)
{
table = (struct bucket **) xcalloc (HASH_SIZE, sizeof (struct bucket *));
print_node (stderr, "", node, 0);
......@@ -60,11 +59,7 @@ debug_tree (node)
/* Print a node in brief fashion, with just the code, address and name. */
void
print_node_brief (file, prefix, node, indent)
FILE *file;
const char *prefix;
tree node;
int indent;
print_node_brief (FILE *file, const char *prefix, tree node, int indent)
{
char class;
......@@ -141,9 +136,7 @@ print_node_brief (file, prefix, node, indent)
}
void
indent_to (file, column)
FILE *file;
int column;
indent_to (FILE *file, int column)
{
int i;
......@@ -158,11 +151,7 @@ indent_to (file, column)
starting in column INDENT. */
void
print_node (file, prefix, node, indent)
FILE *file;
const char *prefix;
tree node;
int indent;
print_node (FILE *file, const char *prefix, tree node, int indent)
{
int hash;
struct bucket *b;
......
......@@ -105,18 +105,21 @@ static int total_num_never_executed;
static int total_num_branches;
/* Forward declarations. */
static void find_spanning_tree PARAMS ((struct edge_list *));
static rtx gen_edge_profiler PARAMS ((int));
static rtx gen_interval_profiler (struct histogram_value *, unsigned, unsigned);
static void find_spanning_tree (struct edge_list *);
static rtx gen_edge_profiler (int);
static rtx gen_interval_profiler (struct histogram_value *, unsigned,
unsigned);
static rtx gen_pow2_profiler (struct histogram_value *, unsigned, unsigned);
static rtx gen_one_value_profiler (struct histogram_value *, unsigned, unsigned);
static rtx gen_const_delta_profiler (struct histogram_value *, unsigned, unsigned);
static unsigned instrument_edges PARAMS ((struct edge_list *));
static rtx gen_one_value_profiler (struct histogram_value *, unsigned,
unsigned);
static rtx gen_const_delta_profiler (struct histogram_value *, unsigned,
unsigned);
static unsigned instrument_edges (struct edge_list *);
static void instrument_values (unsigned, struct histogram_value *);
static void compute_branch_probabilities PARAMS ((void));
static gcov_type * get_exec_counts PARAMS ((void));
static basic_block find_group PARAMS ((basic_block));
static void union_groups PARAMS ((basic_block, basic_block));
static void compute_branch_probabilities (void);
static gcov_type * get_exec_counts (void);
static basic_block find_group (basic_block);
static void union_groups (basic_block, basic_block);
/* Add edge instrumentation code to the entire insn chain.
......@@ -125,8 +128,7 @@ static void union_groups PARAMS ((basic_block, basic_block));
NUM_BLOCKS is the number of basic blocks found in F. */
static unsigned
instrument_edges (el)
struct edge_list *el;
instrument_edges (struct edge_list *el)
{
unsigned num_instr_edges = 0;
int num_edges = NUM_EDGES (el);
......@@ -233,7 +235,7 @@ instrument_values (unsigned n_values, struct histogram_value *values)
/* Computes hybrid profile for all matching entries in da_file. */
static gcov_type *
get_exec_counts ()
get_exec_counts (void)
{
unsigned num_edges = 0;
basic_block bb;
......@@ -264,7 +266,7 @@ get_exec_counts ()
Annotate them accordingly. */
static void
compute_branch_probabilities ()
compute_branch_probabilities (void)
{
basic_block bb;
int i;
......@@ -616,7 +618,7 @@ compute_branch_probabilities ()
Main entry point of this file. */
void
branch_prob ()
branch_prob (void)
{
basic_block bb;
unsigned i;
......@@ -920,8 +922,7 @@ branch_prob ()
aux fields. */
static basic_block
find_group (bb)
basic_block bb;
find_group (basic_block bb)
{
basic_block group = bb, bb1;
......@@ -939,8 +940,7 @@ find_group (bb)
}
static void
union_groups (bb1, bb2)
basic_block bb1, bb2;
union_groups (basic_block bb1, basic_block bb2)
{
basic_block bb1g = find_group (bb1);
basic_block bb2g = find_group (bb2);
......@@ -961,8 +961,7 @@ union_groups (bb1, bb2)
are more expensive to instrument. */
static void
find_spanning_tree (el)
struct edge_list *el;
find_spanning_tree (struct edge_list *el)
{
int i;
int num_edges = NUM_EDGES (el);
......@@ -1031,7 +1030,7 @@ find_spanning_tree (el)
/* Perform file-level initialization for branch-prob processing. */
void
init_branch_prob ()
init_branch_prob (void)
{
int i;
......@@ -1052,7 +1051,7 @@ init_branch_prob ()
is completed. */
void
end_branch_prob ()
end_branch_prob (void)
{
if (rtl_dump_file)
{
......@@ -1092,8 +1091,7 @@ end_branch_prob ()
/* Output instructions as RTL to increment the edge execution count. */
static rtx
gen_edge_profiler (edgeno)
int edgeno;
gen_edge_profiler (int edgeno)
{
rtx ref = coverage_counter_ref (GCOV_COUNTER_ARCS, edgeno);
rtx tmp;
......@@ -1119,8 +1117,8 @@ gen_edge_profiler (edgeno)
section for counters, BASE is offset of the counter position. */
static rtx
gen_interval_profiler (struct histogram_value *value,
unsigned tag, unsigned base)
gen_interval_profiler (struct histogram_value *value, unsigned tag,
unsigned base)
{
unsigned gcov_size = tree_low_cst (TYPE_SIZE (GCOV_TYPE_NODE), 1);
enum machine_mode mode = mode_for_size (gcov_size, MODE_INT, 0);
......@@ -1220,8 +1218,7 @@ gen_interval_profiler (struct histogram_value *value,
section for counters, BASE is offset of the counter position. */
static rtx
gen_pow2_profiler (struct histogram_value *value,
unsigned tag, unsigned base)
gen_pow2_profiler (struct histogram_value *value, unsigned tag, unsigned base)
{
unsigned gcov_size = tree_low_cst (TYPE_SIZE (GCOV_TYPE_NODE), 1);
enum machine_mode mode = mode_for_size (gcov_size, MODE_INT, 0);
......@@ -1294,8 +1291,8 @@ gen_pow2_profiler (struct histogram_value *value,
section for counters, BASE is offset of the counter position. */
static rtx
gen_one_value_profiler (struct histogram_value *value,
unsigned tag, unsigned base)
gen_one_value_profiler (struct histogram_value *value, unsigned tag,
unsigned base)
{
unsigned gcov_size = tree_low_cst (TYPE_SIZE (GCOV_TYPE_NODE), 1);
enum machine_mode mode = mode_for_size (gcov_size, MODE_INT, 0);
......@@ -1375,8 +1372,8 @@ gen_one_value_profiler (struct histogram_value *value,
section for counters, BASE is offset of the counter position. */
static rtx
gen_const_delta_profiler (struct histogram_value *value,
unsigned tag, unsigned base)
gen_const_delta_profiler (struct histogram_value *value, unsigned tag,
unsigned base)
{
struct histogram_value one_value_delta;
unsigned gcov_size = tree_low_cst (TYPE_SIZE (GCOV_TYPE_NODE), 1);
......
/* RTL reader for GCC.
Copyright (C) 1987, 1988, 1991, 1994, 1997, 1998, 1999, 2000, 2001, 2002
Copyright (C) 1987, 1988, 1991, 1994, 1997, 1998, 1999, 2000, 2001, 2002,
2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -29,18 +30,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
static htab_t md_constants;
static void fatal_with_file_and_line PARAMS ((FILE *, const char *, ...))
static void fatal_with_file_and_line (FILE *, const char *, ...)
ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN;
static void fatal_expected_char PARAMS ((FILE *, int, int)) ATTRIBUTE_NORETURN;
static void read_name PARAMS ((char *, FILE *));
static char *read_string PARAMS ((struct obstack *, FILE *, int));
static char *read_quoted_string PARAMS ((struct obstack *, FILE *));
static char *read_braced_string PARAMS ((struct obstack *, FILE *));
static void read_escape PARAMS ((struct obstack *, FILE *));
static hashval_t def_hash PARAMS ((const void *));
static int def_name_eq_p PARAMS ((const void *, const void *));
static void read_constants PARAMS ((FILE *infile, char *tmp_char));
static void validate_const_int PARAMS ((FILE *, const char *));
static void fatal_expected_char (FILE *, int, int) ATTRIBUTE_NORETURN;
static void read_name (char *, FILE *);
static char *read_string (struct obstack *, FILE *, int);
static char *read_quoted_string (struct obstack *, FILE *);
static char *read_braced_string (struct obstack *, FILE *);
static void read_escape (struct obstack *, FILE *);
static hashval_t def_hash (const void *);
static int def_name_eq_p (const void *, const void *);
static void read_constants (FILE *infile, char *tmp_char);
static void validate_const_int (FILE *, const char *);
/* Subroutines of read_rtx. */
......@@ -87,9 +88,7 @@ fatal_with_file_and_line (FILE *infile, const char *msg, ...)
invalid data. */
static void
fatal_expected_char (infile, expected_c, actual_c)
FILE *infile;
int expected_c, actual_c;
fatal_expected_char (FILE *infile, int expected_c, int actual_c)
{
fatal_with_file_and_line (infile, "expected character `%c', found `%c'",
expected_c, actual_c);
......@@ -101,8 +100,7 @@ fatal_expected_char (infile, expected_c, actual_c)
Tools such as genflags use this function. */
int
read_skip_spaces (infile)
FILE *infile;
read_skip_spaces (FILE *infile)
{
int c;
......@@ -154,9 +152,7 @@ read_skip_spaces (infile)
It is terminated by any of the punctuation chars of rtx printed syntax. */
static void
read_name (str, infile)
char *str;
FILE *infile;
read_name (char *str, FILE *infile)
{
char *p;
int c;
......@@ -207,9 +203,7 @@ read_name (str, infile)
/* Subroutine of the string readers. Handles backslash escapes.
Caller has read the backslash, but not placed it into the obstack. */
static void
read_escape (ob, infile)
struct obstack *ob;
FILE *infile;
read_escape (struct obstack *ob, FILE *infile)
{
int c = getc (infile);
......@@ -262,9 +256,7 @@ read_escape (ob, infile)
/* Read a double-quoted string onto the obstack. Caller has scanned
the leading quote. */
static char *
read_quoted_string (ob, infile)
struct obstack *ob;
FILE *infile;
read_quoted_string (struct obstack *ob, FILE *infile)
{
int c;
......@@ -292,9 +284,7 @@ read_quoted_string (ob, infile)
scanned the leading brace. Note that unlike quoted strings,
the outermost braces _are_ included in the string constant. */
static char *
read_braced_string (ob, infile)
struct obstack *ob;
FILE *infile;
read_braced_string (struct obstack *ob, FILE *infile)
{
int c;
int brace_depth = 1; /* caller-processed */
......@@ -333,10 +323,7 @@ read_braced_string (ob, infile)
and dispatch to the appropriate string constant reader. */
static char *
read_string (ob, infile, star_if_braced)
struct obstack *ob;
FILE *infile;
int star_if_braced;
read_string (struct obstack *ob, FILE *infile, int star_if_braced)
{
char *stringbuf;
int saw_paren = 0;
......@@ -373,11 +360,10 @@ read_string (ob, infile, star_if_braced)
/* Provide a version of a function to read a long long if the system does
not provide one. */
#if HOST_BITS_PER_WIDE_INT > HOST_BITS_PER_LONG && !defined(HAVE_ATOLL) && !defined(HAVE_ATOQ)
HOST_WIDE_INT atoll PARAMS ((const char *));
HOST_WIDE_INT atoll (const char *);
HOST_WIDE_INT
atoll (p)
const char *p;
atoll (const char *p)
{
int neg = 0;
HOST_WIDE_INT tmp_wide;
......@@ -411,8 +397,7 @@ atoll (p)
/* Given a constant definition, return a hash code for its name. */
static hashval_t
def_hash (def)
const void *def;
def_hash (const void *def)
{
unsigned result, i;
const char *string = ((const struct md_constant *) def)->name;
......@@ -424,8 +409,7 @@ def_hash (def)
/* Given two constant definitions, return true if they have the same name. */
static int
def_name_eq_p (def1, def2)
const void *def1, *def2;
def_name_eq_p (const void *def1, const void *def2)
{
return ! strcmp (((const struct md_constant *) def1)->name,
((const struct md_constant *) def2)->name);
......@@ -435,9 +419,7 @@ def_name_eq_p (def1, def2)
to read a name or number into. Process a define_constants directive,
starting with the optional space after the "define_constants". */
static void
read_constants (infile, tmp_char)
FILE *infile;
char *tmp_char;
read_constants (FILE *infile, char *tmp_char)
{
int c;
htab_t defs;
......@@ -493,18 +475,14 @@ read_constants (infile, tmp_char)
a pointer a pointer to the constant definition and INFO.
Stops when CALLBACK returns zero. */
void
traverse_md_constants (callback, info)
htab_trav callback;
void *info;
traverse_md_constants (htab_trav callback, void *info)
{
if (md_constants)
htab_traverse (md_constants, callback, info);
}
static void
validate_const_int (infile, string)
FILE *infile;
const char *string;
validate_const_int (FILE *infile, const char *string)
{
const char *cp;
int valid = 1;
......@@ -529,8 +507,7 @@ validate_const_int (infile, string)
the utilities gen*.c that construct C code from machine descriptions. */
rtx
read_rtx (infile)
FILE *infile;
read_rtx (FILE *infile)
{
int i, j;
RTX_CODE tmp_code;
......
......@@ -106,10 +106,10 @@ extern char test_real_width
struct real_format
{
/* Move to and from the target bytes. */
void (*encode) PARAMS ((const struct real_format *, long *,
const REAL_VALUE_TYPE *));
void (*decode) PARAMS ((const struct real_format *, REAL_VALUE_TYPE *,
const long *));
void (*encode) (const struct real_format *, long *,
const REAL_VALUE_TYPE *);
void (*decode) (const struct real_format *, REAL_VALUE_TYPE *,
const long *);
/* The radix of the exponent and digits of the significand. */
int b;
......@@ -149,82 +149,72 @@ extern const struct real_format *real_format_for_mode[TFmode - QFmode + 1];
/* Declare functions in real.c. */
/* Binary or unary arithmetic on tree_code. */
extern void real_arithmetic PARAMS ((REAL_VALUE_TYPE *, int,
const REAL_VALUE_TYPE *,
const REAL_VALUE_TYPE *));
extern void real_arithmetic (REAL_VALUE_TYPE *, int, const REAL_VALUE_TYPE *,
const REAL_VALUE_TYPE *);
/* Compare reals by tree_code. */
extern bool real_compare PARAMS ((int, const REAL_VALUE_TYPE *,
const REAL_VALUE_TYPE *));
extern bool real_compare (int, const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *);
/* Determine whether a floating-point value X is infinite. */
extern bool real_isinf PARAMS ((const REAL_VALUE_TYPE *));
extern bool real_isinf (const REAL_VALUE_TYPE *);
/* Determine whether a floating-point value X is a NaN. */
extern bool real_isnan PARAMS ((const REAL_VALUE_TYPE *));
extern bool real_isnan (const REAL_VALUE_TYPE *);
/* Determine whether a floating-point value X is negative. */
extern bool real_isneg PARAMS ((const REAL_VALUE_TYPE *));
extern bool real_isneg (const REAL_VALUE_TYPE *);
/* Determine whether a floating-point value X is minus zero. */
extern bool real_isnegzero PARAMS ((const REAL_VALUE_TYPE *));
extern bool real_isnegzero (const REAL_VALUE_TYPE *);
/* Compare two floating-point objects for bitwise identity. */
extern bool real_identical PARAMS ((const REAL_VALUE_TYPE *,
const REAL_VALUE_TYPE *));
extern bool real_identical (const REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *);
/* Extend or truncate to a new mode. */
extern void real_convert PARAMS ((REAL_VALUE_TYPE *,
enum machine_mode,
const REAL_VALUE_TYPE *));
extern void real_convert (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
/* Return true if truncating to NEW is exact. */
extern bool exact_real_truncate PARAMS ((enum machine_mode,
const REAL_VALUE_TYPE *));
extern bool exact_real_truncate (enum machine_mode, const REAL_VALUE_TYPE *);
/* Render R as a decimal floating point constant. */
extern void real_to_decimal PARAMS ((char *, const REAL_VALUE_TYPE *,
size_t, size_t, int));
extern void real_to_decimal (char *, const REAL_VALUE_TYPE *, size_t,
size_t, int);
/* Render R as a hexadecimal floating point constant. */
extern void real_to_hexadecimal PARAMS ((char *, const REAL_VALUE_TYPE *,
size_t, size_t, int));
extern void real_to_hexadecimal (char *, const REAL_VALUE_TYPE *,
size_t, size_t, int);
/* Render R as an integer. */
extern HOST_WIDE_INT real_to_integer PARAMS ((const REAL_VALUE_TYPE *));
extern void real_to_integer2 PARAMS ((HOST_WIDE_INT *, HOST_WIDE_INT *,
const REAL_VALUE_TYPE *));
extern HOST_WIDE_INT real_to_integer (const REAL_VALUE_TYPE *);
extern void real_to_integer2 (HOST_WIDE_INT *, HOST_WIDE_INT *,
const REAL_VALUE_TYPE *);
/* Initialize R from a decimal or hexadecimal string. */
extern void real_from_string PARAMS ((REAL_VALUE_TYPE *, const char *));
extern void real_from_string (REAL_VALUE_TYPE *, const char *);
/* Initialize R from an integer pair HIGH/LOW. */
extern void real_from_integer PARAMS ((REAL_VALUE_TYPE *,
enum machine_mode,
unsigned HOST_WIDE_INT,
HOST_WIDE_INT, int));
extern void real_from_integer (REAL_VALUE_TYPE *, enum machine_mode,
unsigned HOST_WIDE_INT, HOST_WIDE_INT, int);
extern long real_to_target_fmt PARAMS ((long *, const REAL_VALUE_TYPE *,
const struct real_format *));
extern long real_to_target PARAMS ((long *, const REAL_VALUE_TYPE *,
enum machine_mode));
extern long real_to_target_fmt (long *, const REAL_VALUE_TYPE *,
const struct real_format *);
extern long real_to_target (long *, const REAL_VALUE_TYPE *, enum machine_mode);
extern void real_from_target_fmt PARAMS ((REAL_VALUE_TYPE *, const long *,
const struct real_format *));
extern void real_from_target PARAMS ((REAL_VALUE_TYPE *, const long *,
enum machine_mode));
extern void real_from_target_fmt (REAL_VALUE_TYPE *, const long *,
const struct real_format *);
extern void real_from_target (REAL_VALUE_TYPE *, const long *,
enum machine_mode);
extern void real_inf PARAMS ((REAL_VALUE_TYPE *));
extern void real_inf (REAL_VALUE_TYPE *);
extern bool real_nan PARAMS ((REAL_VALUE_TYPE *, const char *,
int, enum machine_mode));
extern bool real_nan (REAL_VALUE_TYPE *, const char *, int, enum machine_mode);
extern void real_maxval PARAMS ((REAL_VALUE_TYPE *, int,
enum machine_mode));
extern void real_maxval (REAL_VALUE_TYPE *, int, enum machine_mode);
extern void real_2expN PARAMS ((REAL_VALUE_TYPE *, int));
extern void real_2expN (REAL_VALUE_TYPE *, int);
extern unsigned int real_hash PARAMS ((const REAL_VALUE_TYPE *));
extern unsigned int real_hash (const REAL_VALUE_TYPE *);
/* Target formats defined in real.c. */
......@@ -290,14 +280,14 @@ extern const struct real_format real_internal_format;
#define REAL_VALUE_FROM_UNSIGNED_INT(r, lo, hi, mode) \
real_from_integer (&(r), mode, lo, hi, 1)
extern REAL_VALUE_TYPE real_value_truncate PARAMS ((enum machine_mode,
REAL_VALUE_TYPE));
extern REAL_VALUE_TYPE real_value_truncate (enum machine_mode,
REAL_VALUE_TYPE);
#define REAL_VALUE_TO_INT(plow, phigh, r) \
real_to_integer2 (plow, phigh, &(r))
extern REAL_VALUE_TYPE real_arithmetic2 PARAMS ((int, const REAL_VALUE_TYPE *,
const REAL_VALUE_TYPE *));
extern REAL_VALUE_TYPE real_arithmetic2 (int, const REAL_VALUE_TYPE *,
const REAL_VALUE_TYPE *);
#define REAL_VALUE_NEGATE(X) \
real_arithmetic2 (NEGATE_EXPR, &(X), NULL)
......@@ -305,10 +295,9 @@ extern REAL_VALUE_TYPE real_arithmetic2 PARAMS ((int, const REAL_VALUE_TYPE *,
#define REAL_VALUE_ABS(X) \
real_arithmetic2 (ABS_EXPR, &(X), NULL)
extern int significand_size PARAMS ((enum machine_mode));
extern int significand_size (enum machine_mode);
extern REAL_VALUE_TYPE real_from_string2 PARAMS ((const char *,
enum machine_mode));
extern REAL_VALUE_TYPE real_from_string2 (const char *, enum machine_mode);
#define REAL_VALUE_ATOF(s, m) \
real_from_string2 (s, m)
......@@ -326,11 +315,10 @@ extern REAL_VALUE_TYPE real_from_string2 PARAMS ((const char *,
/* ??? These were added for Paranoia support. */
/* Return floor log2(R). */
extern int real_exponent PARAMS ((const REAL_VALUE_TYPE *));
extern int real_exponent (const REAL_VALUE_TYPE *);
/* R = A * 2**EXP. */
extern void real_ldexp PARAMS ((REAL_VALUE_TYPE *,
const REAL_VALUE_TYPE *, int));
extern void real_ldexp (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int);
/* **** End of software floating point emulator interface macros **** */
......@@ -345,8 +333,7 @@ extern REAL_VALUE_TYPE dconsthalf;
/* Function to return a real value (not a tree node)
from a given integer constant. */
REAL_VALUE_TYPE real_value_from_int_cst PARAMS ((union tree_node *,
union tree_node *));
REAL_VALUE_TYPE real_value_from_int_cst (union tree_node *, union tree_node *);
/* Given a CONST_DOUBLE in FROM, store into TO the value it represents. */
#define REAL_VALUE_FROM_CONST_DOUBLE(to, from) \
......@@ -355,35 +342,28 @@ REAL_VALUE_TYPE real_value_from_int_cst PARAMS ((union tree_node *,
/* Return a CONST_DOUBLE with value R and mode M. */
#define CONST_DOUBLE_FROM_REAL_VALUE(r, m) \
const_double_from_real_value (r, m)
extern rtx const_double_from_real_value PARAMS ((REAL_VALUE_TYPE,
enum machine_mode));
extern rtx const_double_from_real_value (REAL_VALUE_TYPE, enum machine_mode);
/* Replace R by 1/R in the given machine mode, if the result is exact. */
extern bool exact_real_inverse PARAMS ((enum machine_mode, REAL_VALUE_TYPE *));
extern bool exact_real_inverse (enum machine_mode, REAL_VALUE_TYPE *);
/* In tree.c: wrap up a REAL_VALUE_TYPE in a tree node. */
extern tree build_real PARAMS ((tree, REAL_VALUE_TYPE));
extern tree build_real (tree, REAL_VALUE_TYPE);
/* Calculate R as the square root of X in the given machine mode. */
extern bool real_sqrt PARAMS ((REAL_VALUE_TYPE *,
enum machine_mode,
const REAL_VALUE_TYPE *));
extern bool real_sqrt (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
/* Calculate R as X raised to the integer exponent N in mode MODE. */
extern bool real_powi PARAMS ((REAL_VALUE_TYPE *,
enum machine_mode,
const REAL_VALUE_TYPE *,
HOST_WIDE_INT));
extern bool real_powi (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *, HOST_WIDE_INT);
/* Standard round to integer value functions. */
extern void real_trunc PARAMS ((REAL_VALUE_TYPE *,
enum machine_mode,
const REAL_VALUE_TYPE *));
extern void real_floor PARAMS ((REAL_VALUE_TYPE *,
enum machine_mode,
const REAL_VALUE_TYPE *));
extern void real_ceil PARAMS ((REAL_VALUE_TYPE *,
enum machine_mode,
const REAL_VALUE_TYPE *));
extern void real_trunc (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
extern void real_floor (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
extern void real_ceil (REAL_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *);
#endif /* ! GCC_REAL_H */
/* Declarations for interface to insn recognizer and insn-output.c.
Copyright (C) 1987, 1996, 1997, 1998, 1999, 2000, 2001
Copyright (C) 1987, 1996, 1997, 1998, 1999, 2000, 2001, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -71,75 +71,73 @@ struct operand_alternative
};
extern void init_recog PARAMS ((void));
extern void init_recog_no_volatile PARAMS ((void));
extern int recog_memoized_1 PARAMS ((rtx));
extern int check_asm_operands PARAMS ((rtx));
extern int asm_operand_ok PARAMS ((rtx, const char *));
extern int validate_change PARAMS ((rtx, rtx *, rtx, int));
extern int insn_invalid_p PARAMS ((rtx));
extern int apply_change_group PARAMS ((void));
extern int num_validated_changes PARAMS ((void));
extern void cancel_changes PARAMS ((int));
extern int constrain_operands PARAMS ((int));
extern int constrain_operands_cached PARAMS ((int));
extern int memory_address_p PARAMS ((enum machine_mode, rtx));
extern int strict_memory_address_p PARAMS ((enum machine_mode, rtx));
extern int validate_replace_rtx_subexp PARAMS ((rtx, rtx, rtx, rtx *));
extern int validate_replace_rtx PARAMS ((rtx, rtx, rtx));
extern void validate_replace_rtx_group PARAMS ((rtx, rtx, rtx));
extern int validate_replace_src PARAMS ((rtx, rtx, rtx));
extern void validate_replace_src_group PARAMS ((rtx, rtx, rtx));
extern int num_changes_pending PARAMS ((void));
extern void init_recog (void);
extern void init_recog_no_volatile (void);
extern int recog_memoized_1 (rtx);
extern int check_asm_operands (rtx);
extern int asm_operand_ok (rtx, const char *);
extern int validate_change (rtx, rtx *, rtx, int);
extern int insn_invalid_p (rtx);
extern int apply_change_group (void);
extern int num_validated_changes (void);
extern void cancel_changes (int);
extern int constrain_operands (int);
extern int constrain_operands_cached (int);
extern int memory_address_p (enum machine_mode, rtx);
extern int strict_memory_address_p (enum machine_mode, rtx);
extern int validate_replace_rtx_subexp (rtx, rtx, rtx, rtx *);
extern int validate_replace_rtx (rtx, rtx, rtx);
extern void validate_replace_rtx_group (rtx, rtx, rtx);
extern int validate_replace_src (rtx, rtx, rtx);
extern void validate_replace_src_group (rtx, rtx, rtx);
extern int num_changes_pending (void);
#ifdef HAVE_cc0
extern int next_insn_tests_no_inequality PARAMS ((rtx));
extern int next_insn_tests_no_inequality (rtx);
#endif
extern int reg_fits_class_p PARAMS ((rtx, enum reg_class, int,
enum machine_mode));
extern rtx *find_single_use PARAMS ((rtx, rtx, rtx *));
extern int general_operand PARAMS ((rtx, enum machine_mode));
extern int address_operand PARAMS ((rtx, enum machine_mode));
extern int register_operand PARAMS ((rtx, enum machine_mode));
extern int pmode_register_operand PARAMS ((rtx, enum machine_mode));
extern int scratch_operand PARAMS ((rtx, enum machine_mode));
extern int immediate_operand PARAMS ((rtx, enum machine_mode));
extern int const_int_operand PARAMS ((rtx, enum machine_mode));
extern int const_double_operand PARAMS ((rtx, enum machine_mode));
extern int nonimmediate_operand PARAMS ((rtx, enum machine_mode));
extern int nonmemory_operand PARAMS ((rtx, enum machine_mode));
extern int push_operand PARAMS ((rtx, enum machine_mode));
extern int pop_operand PARAMS ((rtx, enum machine_mode));
extern int memory_operand PARAMS ((rtx, enum machine_mode));
extern int indirect_operand PARAMS ((rtx, enum machine_mode));
extern int comparison_operator PARAMS ((rtx, enum machine_mode));
extern int offsettable_memref_p PARAMS ((rtx));
extern int offsettable_nonstrict_memref_p PARAMS ((rtx));
extern int offsettable_address_p PARAMS ((int, enum machine_mode, rtx));
extern int mode_dependent_address_p PARAMS ((rtx));
extern int recog PARAMS ((rtx, rtx, int *));
extern void add_clobbers PARAMS ((rtx, int));
extern int added_clobbers_hard_reg_p PARAMS ((int));
extern void insn_extract PARAMS ((rtx));
extern void extract_insn PARAMS ((rtx));
extern void extract_constrain_insn_cached PARAMS ((rtx));
extern void extract_insn_cached PARAMS ((rtx));
extern void preprocess_constraints PARAMS ((void));
extern rtx peep2_next_insn PARAMS ((int));
extern int peep2_regno_dead_p PARAMS ((int, int));
extern int peep2_reg_dead_p PARAMS ((int, rtx));
extern int reg_fits_class_p (rtx, enum reg_class, int, enum machine_mode);
extern rtx *find_single_use (rtx, rtx, rtx *);
extern int general_operand (rtx, enum machine_mode);
extern int address_operand (rtx, enum machine_mode);
extern int register_operand (rtx, enum machine_mode);
extern int pmode_register_operand (rtx, enum machine_mode);
extern int scratch_operand (rtx, enum machine_mode);
extern int immediate_operand (rtx, enum machine_mode);
extern int const_int_operand (rtx, enum machine_mode);
extern int const_double_operand (rtx, enum machine_mode);
extern int nonimmediate_operand (rtx, enum machine_mode);
extern int nonmemory_operand (rtx, enum machine_mode);
extern int push_operand (rtx, enum machine_mode);
extern int pop_operand (rtx, enum machine_mode);
extern int memory_operand (rtx, enum machine_mode);
extern int indirect_operand (rtx, enum machine_mode);
extern int comparison_operator (rtx, enum machine_mode);
extern int offsettable_memref_p (rtx);
extern int offsettable_nonstrict_memref_p (rtx);
extern int offsettable_address_p (int, enum machine_mode, rtx);
extern int mode_dependent_address_p (rtx);
extern int recog (rtx, rtx, int *);
extern void add_clobbers (rtx, int);
extern int added_clobbers_hard_reg_p (int);
extern void insn_extract (rtx);
extern void extract_insn (rtx);
extern void extract_constrain_insn_cached (rtx);
extern void extract_insn_cached (rtx);
extern void preprocess_constraints (void);
extern rtx peep2_next_insn (int);
extern int peep2_regno_dead_p (int, int);
extern int peep2_reg_dead_p (int, rtx);
#ifdef CLEAR_HARD_REG_SET
extern rtx peep2_find_free_register PARAMS ((int, int, const char *,
enum machine_mode,
HARD_REG_SET *));
extern rtx peep2_find_free_register (int, int, const char *,
enum machine_mode, HARD_REG_SET *);
#endif
extern void peephole2_optimize PARAMS ((FILE *));
extern rtx peephole2_insns PARAMS ((rtx, rtx, int *));
extern void peephole2_optimize (FILE *);
extern rtx peephole2_insns (rtx, rtx, int *);
extern int store_data_bypass_p PARAMS ((rtx, rtx));
extern int if_test_bypass_p PARAMS ((rtx, rtx));
extern int store_data_bypass_p (rtx, rtx);
extern int if_test_bypass_p (rtx, rtx);
/* Nonzero means volatile operands are recognized. */
extern int volatile_ok;
......@@ -213,9 +211,9 @@ extern struct operand_alternative recog_op_alt[MAX_RECOG_OPERANDS][MAX_RECOG_ALT
/* A table defined in insn-output.c that give information about
each insn-code value. */
typedef int (*insn_operand_predicate_fn) PARAMS ((rtx, enum machine_mode));
typedef const char * (*insn_output_fn) PARAMS ((rtx *, rtx));
typedef rtx (*insn_gen_fn) PARAMS ((rtx, ...));
typedef int (*insn_operand_predicate_fn) (rtx, enum machine_mode);
typedef const char * (*insn_output_fn) (rtx *, rtx);
typedef rtx (*insn_gen_fn) (rtx, ...);
struct insn_operand_data
{
......
......@@ -220,4 +220,4 @@ extern int caller_save_needed;
#endif
/* Allocate reg_n_info tables */
extern void allocate_reg_info PARAMS ((size_t, int, int));
extern void allocate_reg_info (size_t, int, int);
......@@ -44,7 +44,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define MEMORY_MOVE_COST(MODE,CLASS,IN) 4
#endif
#endif
extern int memory_move_secondary_cost PARAMS ((enum machine_mode, enum reg_class, int));
extern int memory_move_secondary_cost (enum machine_mode, enum reg_class, int);
/* Maximum number of reloads we can need. */
#define MAX_RELOADS (2 * MAX_RECOG_OPERANDS * (MAX_REGS_PER_ADDRESS + 1))
......@@ -247,9 +247,9 @@ struct insn_chain
extern struct insn_chain *reload_insn_chain;
/* Allocate a new insn_chain structure. */
extern struct insn_chain *new_insn_chain PARAMS ((void));
extern struct insn_chain *new_insn_chain (void);
extern void compute_use_by_pseudos PARAMS ((HARD_REG_SET *, regset));
extern void compute_use_by_pseudos (HARD_REG_SET *, regset);
#endif
/* Functions from reload.c: */
......@@ -257,136 +257,134 @@ extern void compute_use_by_pseudos PARAMS ((HARD_REG_SET *, regset));
/* Return a memory location that will be used to copy X in mode MODE.
If we haven't already made a location for this mode in this insn,
call find_reloads_address on the location being returned. */
extern rtx get_secondary_mem PARAMS ((rtx, enum machine_mode,
int, enum reload_type));
extern rtx get_secondary_mem (rtx, enum machine_mode, int, enum reload_type);
/* Clear any secondary memory locations we've made. */
extern void clear_secondary_mem PARAMS ((void));
extern void clear_secondary_mem (void);
/* Transfer all replacements that used to be in reload FROM to be in
reload TO. */
extern void transfer_replacements PARAMS ((int, int));
extern void transfer_replacements (int, int);
/* IN_RTX is the value loaded by a reload that we now decided to inherit,
or a subpart of it. If we have any replacements registered for IN_RTX,
cancel the reloads that were supposed to load them.
Return nonzero if we canceled any reloads. */
extern int remove_address_replacements PARAMS ((rtx in_rtx));
extern int remove_address_replacements (rtx in_rtx);
/* Like rtx_equal_p except that it allows a REG and a SUBREG to match
if they are the same hard reg, and has special hacks for
autoincrement and autodecrement. */
extern int operands_match_p PARAMS ((rtx, rtx));
extern int operands_match_p (rtx, rtx);
/* Return 1 if altering OP will not modify the value of CLOBBER. */
extern int safe_from_earlyclobber PARAMS ((rtx, rtx));
extern int safe_from_earlyclobber (rtx, rtx);
/* Search the body of INSN for values that need reloading and record them
with push_reload. REPLACE nonzero means record also where the values occur
so that subst_reloads can be used. */
extern int find_reloads PARAMS ((rtx, int, int, int, short *));
extern int find_reloads (rtx, int, int, int, short *);
/* Compute the sum of X and Y, making canonicalizations assumed in an
address, namely: sum constant integers, surround the sum of two
constants with a CONST, put the constant as the second operand, and
group the constant on the outermost sum. */
extern rtx form_sum PARAMS ((rtx, rtx));
extern rtx form_sum (rtx, rtx);
/* Substitute into the current INSN the registers into which we have reloaded
the things that need reloading. */
extern void subst_reloads PARAMS ((rtx));
extern void subst_reloads (rtx);
/* Make a copy of any replacements being done into X and move those copies
to locations in Y, a copy of X. We only look at the highest level of
the RTL. */
extern void copy_replacements PARAMS ((rtx, rtx));
extern void copy_replacements (rtx, rtx);
/* Change any replacements being done to *X to be done to *Y */
extern void move_replacements PARAMS ((rtx *x, rtx *y));
extern void move_replacements (rtx *x, rtx *y);
/* If LOC was scheduled to be replaced by something, return the replacement.
Otherwise, return *LOC. */
extern rtx find_replacement PARAMS ((rtx *));
extern rtx find_replacement (rtx *);
/* Return nonzero if register in range [REGNO, ENDREGNO)
appears either explicitly or implicitly in X
other than being stored into. */
extern int refers_to_regno_for_reload_p PARAMS ((unsigned int, unsigned int,
rtx, rtx *));
extern int refers_to_regno_for_reload_p (unsigned int, unsigned int,
rtx, rtx *);
/* Nonzero if modifying X will affect IN. */
extern int reg_overlap_mentioned_for_reload_p PARAMS ((rtx, rtx));
extern int reg_overlap_mentioned_for_reload_p (rtx, rtx);
/* Return nonzero if anything in X contains a MEM. Look also for pseudo
registers. */
extern int refers_to_mem_for_reload_p PARAMS ((rtx));
extern int refers_to_mem_for_reload_p (rtx);
/* Check the insns before INSN to see if there is a suitable register
containing the same value as GOAL. */
extern rtx find_equiv_reg PARAMS ((rtx, rtx, enum reg_class, int, short *,
int, enum machine_mode));
extern rtx find_equiv_reg (rtx, rtx, enum reg_class, int, short *,
int, enum machine_mode);
/* Return 1 if register REGNO is the subject of a clobber in insn INSN. */
extern int regno_clobbered_p PARAMS ((unsigned int, rtx, enum machine_mode,
int));
extern int regno_clobbered_p (unsigned int, rtx, enum machine_mode, int);
/* Return 1 if X is an operand of an insn that is being earlyclobbered. */
extern int earlyclobber_operand_p PARAMS ((rtx));
extern int earlyclobber_operand_p (rtx);
/* Record one reload that needs to be performed. */
extern int push_reload PARAMS ((rtx, rtx, rtx *, rtx *, enum reg_class,
extern int push_reload (rtx, rtx, rtx *, rtx *, enum reg_class,
enum machine_mode, enum machine_mode,
int, int, int, enum reload_type));
int, int, int, enum reload_type);
/* Functions in postreload.c: */
extern void reload_cse_regs PARAMS ((rtx));
extern void reload_cse_regs (rtx);
/* Functions in reload1.c: */
extern int reloads_conflict PARAMS ((int, int));
extern int reloads_conflict (int, int);
/* Initialize the reload pass once per compilation. */
extern void init_reload PARAMS ((void));
extern void init_reload (void);
/* The reload pass itself. */
extern int reload PARAMS ((rtx, int));
extern int reload (rtx, int);
/* Mark the slots in regs_ever_live for the hard regs
used by pseudo-reg number REGNO. */
extern void mark_home_live PARAMS ((int));
extern void mark_home_live (int);
/* Scan X and replace any eliminable registers (such as fp) with a
replacement (such as sp), plus an offset. */
extern rtx eliminate_regs PARAMS ((rtx, enum machine_mode, rtx));
extern rtx eliminate_regs (rtx, enum machine_mode, rtx);
/* Emit code to perform a reload from IN (which may be a reload register) to
OUT (which may also be a reload register). IN or OUT is from operand
OPNUM with reload type TYPE. */
extern rtx gen_reload PARAMS ((rtx, rtx, int, enum reload_type));
extern rtx gen_reload (rtx, rtx, int, enum reload_type);
/* Deallocate the reload register used by reload number R. */
extern void deallocate_reload_reg PARAMS ((int r));
extern void deallocate_reload_reg (int r);
/* Functions in caller-save.c: */
/* Initialize for caller-save. */
extern void init_caller_save PARAMS ((void));
extern void init_caller_save (void);
/* Initialize save areas by showing that we haven't allocated any yet. */
extern void init_save_areas PARAMS ((void));
extern void init_save_areas (void);
/* Allocate save areas for any hard registers that might need saving. */
extern void setup_save_areas PARAMS ((void));
extern void setup_save_areas (void);
/* Find the places where hard regs are live across calls and save them. */
extern void save_call_clobbered_regs PARAMS ((void));
extern void save_call_clobbered_regs (void);
/* Replace (subreg (reg)) with the appropriate (reg) for any operands. */
extern void cleanup_subreg_operands PARAMS ((rtx));
extern void cleanup_subreg_operands (rtx);
/* Debugging support. */
extern void debug_reload_to_stream PARAMS ((FILE *));
extern void debug_reload PARAMS ((void));
extern void debug_reload_to_stream (FILE *);
extern void debug_reload (void);
/* Compute the actual register we should reload to, in case we're
reloading to/from a register that is wider than a word. */
extern rtx reload_adjust_reg_for_mode PARAMS ((rtx, enum machine_mode));
extern rtx reload_adjust_reg_for_mode (rtx, enum machine_mode);
/* Definitions for computing resource usage of specific insns.
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -78,21 +79,18 @@ static HARD_REG_SET current_live_regs;
static HARD_REG_SET pending_dead_regs;
static void update_live_status PARAMS ((rtx, rtx, void *));
static int find_basic_block PARAMS ((rtx, int));
static rtx next_insn_no_annul PARAMS ((rtx));
static rtx find_dead_or_set_registers PARAMS ((rtx, struct resources*,
static void update_live_status (rtx, rtx, void *);
static int find_basic_block (rtx, int);
static rtx next_insn_no_annul (rtx);
static rtx find_dead_or_set_registers (rtx, struct resources*,
rtx*, int, struct resources,
struct resources));
struct resources);
/* Utility function called from mark_target_live_regs via note_stores.
It deadens any CLOBBERed registers and livens any SET registers. */
static void
update_live_status (dest, x, data)
rtx dest;
rtx x;
void *data ATTRIBUTE_UNUSED;
update_live_status (rtx dest, rtx x, void *data ATTRIBUTE_UNUSED)
{
int first_regno, last_regno;
int i;
......@@ -131,9 +129,7 @@ update_live_status (dest, x, data)
correct. */
static int
find_basic_block (insn, search_limit)
rtx insn;
int search_limit;
find_basic_block (rtx insn, int search_limit)
{
basic_block bb;
......@@ -170,8 +166,7 @@ find_basic_block (insn, search_limit)
an annulled branch. */
static rtx
next_insn_no_annul (insn)
rtx insn;
next_insn_no_annul (rtx insn)
{
if (insn)
{
......@@ -210,10 +205,8 @@ next_insn_no_annul (insn)
CALL_INSNs. */
void
mark_referenced_resources (x, res, include_delayed_effects)
rtx x;
struct resources *res;
int include_delayed_effects;
mark_referenced_resources (rtx x, struct resources *res,
int include_delayed_effects)
{
enum rtx_code code = GET_CODE (x);
int i, j;
......@@ -443,12 +436,9 @@ mark_referenced_resources (x, res, include_delayed_effects)
number of unconditional branches. */
static rtx
find_dead_or_set_registers (target, res, jump_target, jump_count, set, needed)
rtx target;
struct resources *res;
rtx *jump_target;
int jump_count;
struct resources set, needed;
find_dead_or_set_registers (rtx target, struct resources *res,
rtx *jump_target, int jump_count,
struct resources set, struct resources needed)
{
HARD_REG_SET scratch;
rtx insn, next;
......@@ -638,11 +628,8 @@ find_dead_or_set_registers (target, res, jump_target, jump_count, set, needed)
our computation and thus may be placed in a delay slot. */
void
mark_set_resources (x, res, in_dest, mark_type)
rtx x;
struct resources *res;
int in_dest;
enum mark_resource_type mark_type;
mark_set_resources (rtx x, struct resources *res, int in_dest,
enum mark_resource_type mark_type)
{
enum rtx_code code;
int i, j;
......@@ -902,10 +889,7 @@ mark_set_resources (x, res, in_dest, mark_type)
init_resource_info () was invoked before we are called. */
void
mark_target_live_regs (insns, target, res)
rtx insns;
rtx target;
struct resources *res;
mark_target_live_regs (rtx insns, rtx target, struct resources *res)
{
int b = -1;
unsigned int i;
......@@ -1172,8 +1156,7 @@ mark_target_live_regs (insns, target, res)
This should be invoked before the first call to mark_target_live_regs. */
void
init_resource_info (epilogue_insn)
rtx epilogue_insn;
init_resource_info (rtx epilogue_insn)
{
int i;
......@@ -1249,7 +1232,7 @@ init_resource_info (epilogue_insn)
should be invoked after the last call to mark_target_live_regs (). */
void
free_resource_info ()
free_resource_info (void)
{
if (target_hash_table != NULL)
{
......@@ -1281,8 +1264,7 @@ free_resource_info ()
/* Clear any hashed information that we have stored for INSN. */
void
clear_hashed_info_for_insn (insn)
rtx insn;
clear_hashed_info_for_insn (rtx insn)
{
struct target_info *tinfo;
......@@ -1301,8 +1283,7 @@ clear_hashed_info_for_insn (insn)
/* Increment the tick count for the basic block that contains INSN. */
void
incr_ticks_for_insn (insn)
rtx insn;
incr_ticks_for_insn (rtx insn)
{
int b = find_basic_block (insn, MAX_DELAY_SLOT_LIVE_SEARCH);
......@@ -1313,9 +1294,7 @@ incr_ticks_for_insn (insn)
/* Add TRIAL to the set of resources used at the end of the current
function. */
void
mark_end_of_function_resources (trial, include_delayed_effects)
rtx trial;
int include_delayed_effects;
mark_end_of_function_resources (rtx trial, int include_delayed_effects)
{
mark_referenced_resources (trial, &end_of_function_needs,
include_delayed_effects);
......
/* Definitions for computing resource usage of specific insns.
Copyright (C) 1999 Free Software Foundation, Inc.
Copyright (C) 1999, 2003 Free Software Foundation, Inc.
This file is part of GCC.
......@@ -41,12 +41,12 @@ enum mark_resource_type
MARK_DEST = 2
};
extern void mark_target_live_regs PARAMS ((rtx, rtx, struct resources *));
extern void mark_set_resources PARAMS ((rtx, struct resources *, int,
enum mark_resource_type));
extern void mark_referenced_resources PARAMS ((rtx, struct resources *, int));
extern void clear_hashed_info_for_insn PARAMS ((rtx));
extern void incr_ticks_for_insn PARAMS ((rtx));
extern void mark_end_of_function_resources PARAMS ((rtx, int));
extern void init_resource_info PARAMS ((rtx));
extern void free_resource_info PARAMS ((void));
extern void mark_target_live_regs (rtx, rtx, struct resources *);
extern void mark_set_resources (rtx, struct resources *, int,
enum mark_resource_type);
extern void mark_referenced_resources (rtx, struct resources *, int);
extern void clear_hashed_info_for_insn (rtx);
extern void incr_ticks_for_insn (rtx);
extern void mark_end_of_function_resources (rtx, int);
extern void init_resource_info (rtx);
extern void free_resource_info (void);
......@@ -33,14 +33,12 @@ Boston, MA 02111-1307, USA. */
#include "intl.h"
#include "diagnostic.h"
static location_t location_for_asm PARAMS ((rtx));
static void diagnostic_for_asm PARAMS ((rtx, const char *, va_list *,
diagnostic_t));
static location_t location_for_asm (rtx);
static void diagnostic_for_asm (rtx, const char *, va_list *, diagnostic_t);
/* Figure the location of the given INSN. */
static location_t
location_for_asm (insn)
rtx insn;
location_for_asm (rtx insn)
{
rtx body = PATTERN (insn);
rtx asmop;
......@@ -74,11 +72,8 @@ location_for_asm (insn)
of the insn INSN. This is used only when INSN is an `asm' with operands,
and each ASM_OPERANDS records its own source file and line. */
static void
diagnostic_for_asm (insn, msg, args_ptr, kind)
rtx insn;
const char *msg;
va_list *args_ptr;
diagnostic_t kind;
diagnostic_for_asm (rtx insn, const char *msg, va_list *args_ptr,
diagnostic_t kind)
{
diagnostic_info diagnostic;
......@@ -108,12 +103,8 @@ warning_for_asm (rtx insn, const char *msgid, ...)
}
void
_fatal_insn (msgid, insn, file, line, function)
const char *msgid;
rtx insn;
const char *file;
int line;
const char *function;
_fatal_insn (const char *msgid, rtx insn, const char *file, int line,
const char *function)
{
error ("%s", _(msgid));
......@@ -126,11 +117,8 @@ _fatal_insn (msgid, insn, file, line, function)
}
void
_fatal_insn_not_found (insn, file, line, function)
rtx insn;
const char *file;
int line;
const char *function;
_fatal_insn_not_found (rtx insn, const char *file, int line,
const char *function)
{
if (INSN_CODE (insn) < 0)
_fatal_insn ("unrecognizable insn:", insn, file, line, function);
......@@ -138,4 +126,3 @@ _fatal_insn_not_found (insn, file, line, function)
_fatal_insn ("insn does not satisfy its constraints:",
insn, file, line, function);
}
......@@ -240,8 +240,7 @@ const char * const reg_note_name[] =
Store the length, and initialize all elements to zero. */
rtvec
rtvec_alloc (n)
int n;
rtvec_alloc (int n)
{
rtvec rt;
......@@ -257,8 +256,7 @@ rtvec_alloc (n)
all the rest is initialized to zero. */
rtx
rtx_alloc (code)
RTX_CODE code;
rtx_alloc (RTX_CODE code)
{
rtx rt;
int n = GET_RTX_LENGTH (code);
......@@ -280,8 +278,7 @@ rtx_alloc (code)
except for those few rtx codes that are sharable. */
rtx
copy_rtx (orig)
rtx orig;
copy_rtx (rtx orig)
{
rtx copy;
int i, j;
......@@ -386,8 +383,7 @@ copy_rtx (orig)
/* Create a new copy of an rtx. Only copy just one level. */
rtx
shallow_copy_rtx (orig)
rtx orig;
shallow_copy_rtx (rtx orig)
{
RTX_CODE code = GET_CODE (orig);
size_t n = GET_RTX_LENGTH (code);
......@@ -409,8 +405,7 @@ int generating_concat_p;
This is the Lisp function EQUAL for rtx arguments. */
int
rtx_equal_p (x, y)
rtx x, y;
rtx_equal_p (rtx x, rtx y)
{
int i;
int j;
......@@ -526,12 +521,8 @@ rtx_equal_p (x, y)
#if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
void
rtl_check_failed_bounds (r, n, file, line, func)
rtx r;
int n;
const char *file;
int line;
const char *func;
rtl_check_failed_bounds (rtx r, int n, const char *file, int line,
const char *func)
{
internal_error
("RTL check: access of elt %d of `%s' with last elt %d in %s, at %s:%d",
......@@ -540,13 +531,8 @@ rtl_check_failed_bounds (r, n, file, line, func)
}
void
rtl_check_failed_type1 (r, n, c1, file, line, func)
rtx r;
int n;
int c1;
const char *file;
int line;
const char *func;
rtl_check_failed_type1 (rtx r, int n, int c1, const char *file, int line,
const char *func)
{
internal_error
("RTL check: expected elt %d type '%c', have '%c' (rtx %s) in %s, at %s:%d",
......@@ -555,14 +541,8 @@ rtl_check_failed_type1 (r, n, c1, file, line, func)
}
void
rtl_check_failed_type2 (r, n, c1, c2, file, line, func)
rtx r;
int n;
int c1;
int c2;
const char *file;
int line;
const char *func;
rtl_check_failed_type2 (rtx r, int n, int c1, int c2, const char *file,
int line, const char *func)
{
internal_error
("RTL check: expected elt %d type '%c' or '%c', have '%c' (rtx %s) in %s, at %s:%d",
......@@ -571,12 +551,8 @@ rtl_check_failed_type2 (r, n, c1, c2, file, line, func)
}
void
rtl_check_failed_code1 (r, code, file, line, func)
rtx r;
enum rtx_code code;
const char *file;
int line;
const char *func;
rtl_check_failed_code1 (rtx r, enum rtx_code code, const char *file,
int line, const char *func)
{
internal_error ("RTL check: expected code `%s', have `%s' in %s, at %s:%d",
GET_RTX_NAME (code), GET_RTX_NAME (GET_CODE (r)), func,
......@@ -584,12 +560,8 @@ rtl_check_failed_code1 (r, code, file, line, func)
}
void
rtl_check_failed_code2 (r, code1, code2, file, line, func)
rtx r;
enum rtx_code code1, code2;
const char *file;
int line;
const char *func;
rtl_check_failed_code2 (rtx r, enum rtx_code code1, enum rtx_code code2,
const char *file, int line, const char *func)
{
internal_error
("RTL check: expected code `%s' or `%s', have `%s' in %s, at %s:%d",
......@@ -599,12 +571,8 @@ rtl_check_failed_code2 (r, code1, code2, file, line, func)
/* XXX Maybe print the vector? */
void
rtvec_check_failed_bounds (r, n, file, line, func)
rtvec r;
int n;
const char *file;
int line;
const char *func;
rtvec_check_failed_bounds (rtvec r, int n, const char *file, int line,
const char *func)
{
internal_error
("RTL check: access of elt %d of vector with last elt %d in %s, at %s:%d",
......@@ -614,12 +582,8 @@ rtvec_check_failed_bounds (r, n, file, line, func)
#if defined ENABLE_RTL_FLAG_CHECKING
void
rtl_check_failed_flag (name, r, file, line, func)
const char *name;
rtx r;
const char *file;
int line;
const char *func;
rtl_check_failed_flag (const char *name, rtx r, const char *file,
int line, const char *func)
{
internal_error
("RTL flag check: %s used with unexpected rtx code `%s' in %s, at %s:%d",
......
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