pointers and casts for `int_handler' and `quit_handler'.
* flow.c (verify_flow_info, split_hard_reg_notes,
find_insn_with_note, sets_reg_or_subreg_1, prepend_reg_notes,
remove_edge, remove_fake_successors): Add static prototypes.
(verify_flow_info): Wrap with macro ENABLE_CHECKING.
(mark_set_1): Initialize variable `regno'.
(unlink_insn_chain): Likewise for variable `curr'.
(remove_fake_edges): Remove unused variables `e', `tmp' and `last'.
* loop.c (strength_reduce): Initialize variable
`unrolled_insn_copies'.
(cmp_combine_givs_stats, cmp_recombine_givs_stats): Add static
prototypes. Change these functions to take const PTR parameters
to avoid prototype conflict when used as the comparson argument
for qsort.
(check_dbra_loop): Initialize variable `comparison_val'.
* reload.c (debug_reload_to_stream, debug_reload): Add prototypes.
(get_secondary_mem): Mark parameter `x' with ATTRIBUTE_UNUSED.
(find_valid_class): Initialize variable `best_class'.
(find_reloads): Call memcpy, not bcopy.
* reload1.c (gen_mode_int, dump_needs): Add prototypes.
(hard_reg_use_compare): Don't needlessly cast away const.
(reload_reg_class_lower): Likewise.
(choose_reload_regs): Initialize variable `regno'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29840
138bc75d-0d04-0410-961f-
82ee72b054a4
+Wed Oct 6 10:41:56 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * collect2.c (scan_prog_file, scan_libraries): Prototype function
+ pointers and casts for `int_handler' and `quit_handler'.
+
+ * flow.c (verify_flow_info, split_hard_reg_notes,
+ find_insn_with_note, sets_reg_or_subreg_1, prepend_reg_notes,
+ remove_edge, remove_fake_successors): Add static prototypes.
+ (verify_flow_info): Wrap with macro ENABLE_CHECKING.
+ (mark_set_1): Initialize variable `regno'.
+ (unlink_insn_chain): Likewise for variable `curr'.
+ (remove_fake_edges): Remove unused variables `e', `tmp' and `last'.
+
+ * loop.c (strength_reduce): Initialize variable
+ `unrolled_insn_copies'.
+ (cmp_combine_givs_stats, cmp_recombine_givs_stats): Add static
+ prototypes. Change these functions to take const PTR parameters
+ to avoid prototype conflict when used as the comparson argument
+ for qsort.
+ (check_dbra_loop): Initialize variable `comparison_val'.
+
+ * reload.c (debug_reload_to_stream, debug_reload): Add prototypes.
+ (get_secondary_mem): Mark parameter `x' with ATTRIBUTE_UNUSED.
+ (find_valid_class): Initialize variable `best_class'.
+ (find_reloads): Call memcpy, not bcopy.
+
+ * reload1.c (gen_mode_int, dump_needs): Add prototypes.
+ (hard_reg_use_compare): Don't needlessly cast away const.
+ (reload_reg_class_lower): Likewise.
+ (choose_reload_regs): Initialize variable `regno'.
+
Tue Oct 5 16:34:12 1999 Paul Burchard <burchard@pobox.com>
* ggc-page.c (GGC_ALWAYS_COLLECT): Fix typo when undef'ing.
const char *prog_name;
enum pass which_pass;
{
- void (*int_handler) ();
- void (*quit_handler) ();
+ void (*int_handler) PROTO ((int));
+ void (*quit_handler) PROTO ((int));
char *real_nm_argv[4];
const char **nm_argv = (const char **) real_nm_argv;
int pid;
}
/* Parent context from here on. */
- int_handler = (void (*) ())signal (SIGINT, SIG_IGN);
+ int_handler = (void (*) PROTO ((int))) signal (SIGINT, SIG_IGN);
#ifdef SIGQUIT
- quit_handler = (void (*) ())signal (SIGQUIT, SIG_IGN);
+ quit_handler = (void (*) PROTO ((int))) signal (SIGQUIT, SIG_IGN);
#endif
if (close (pipe_fd[1]) < 0)
{
static struct head libraries; /* list of shared libraries found */
struct id *list;
- void (*int_handler) ();
- void (*quit_handler) ();
+ void (*int_handler) PROTO ((int));
+ void (*quit_handler) PROTO ((int));
char *real_ldd_argv[4];
const char **ldd_argv = (const char **) real_ldd_argv;
int pid;
}
/* Parent context from here on. */
- int_handler = (void (*) ()) signal (SIGINT, SIG_IGN);
+ int_handler = (void (*) PROTO ((int))) signal (SIGINT, SIG_IGN);
#ifdef SIGQUIT
- quit_handler = (void (*) ()) signal (SIGQUIT, SIG_IGN);
+ quit_handler = (void (*) PROTO ((int))) signal (SIGQUIT, SIG_IGN);
#endif
if (close (pipe_fd[1]) < 0)
static int sets_reg_or_subreg PROTO ((rtx, rtx));
static void update_n_sets PROTO ((rtx, int));
static void new_insn_dead_notes PROTO ((rtx, rtx, rtx, rtx, rtx, rtx));
-void verify_flow_info PROTO ((void));
+#ifdef ENABLE_CHECKING
+static void verify_flow_info PROTO ((void));
+#endif
+static void split_hard_reg_notes PROTO ((rtx, rtx, rtx, rtx));
+static rtx find_insn_with_note PROTO ((rtx, rtx, rtx));
+static void sets_reg_or_subreg_1 PROTO ((rtx, rtx));
+static rtx prepend_reg_notes PROTO ((rtx, rtx));
+static void remove_edge PROTO ((edge));
+static void remove_fake_successors PROTO ((basic_block));
\f
/* Find basic blocks of the current function.
F is the first insn of the function and NREGS the number of register
rtx insn;
regset significant;
{
- register int regno;
+ register int regno = -1;
register rtx reg = SET_DEST (x);
/* Some targets place small structures in registers for
rtx start, finish;
{
rtx insert_point = PREV_INSN (start);
- rtx chain = NULL_RTX, curr;
+ rtx chain = NULL_RTX, curr = NULL_RTX;
/* Unchain the insns one by one. It would be quicker to delete all
of these with a single unchaining, rather than one at a time, but
/* Find the first insn in the set of insns from FIRST to LAST inclusive
that contains the note NOTE. */
-rtx
+static rtx
find_insn_with_note (note, first, last)
rtx note, first, last;
{
In future it can be extended check a lot of other stuff as well
(reachability of basic blocks, life information, etc. etc.). */
-void
+#ifdef ENABLE_CHECKING
+static void
verify_flow_info ()
{
const int max_uid = get_max_uid ();
x = NEXT_INSN (x);
}
}
+#endif
\f
/* Functions to access an edge list with a vector representation.
Enough data is kept such that given an index number, the
remove_fake_edges ()
{
int x;
- edge e;
basic_block bb;
for (x = 0; x < n_basic_blocks; x++)
{
- edge tmp, last = NULL;
bb = BASIC_BLOCK (x);
remove_fake_successors (bb);
}
rtx end_insert_before;
int loop_depth = 0;
int n_extra_increment;
- int unrolled_insn_copies;
+ int unrolled_insn_copies = 0;
/* If scan_start points to the loop exit test, we have to be wary of
subversive use of gotos inside expression statements. */
*BENEFIT will be incremented by the benefit of any sub-giv encountered. */
-static rtx sge_plus PROTO ((enum machine_mode, rtx, rtx));
-static rtx sge_plus_constant PROTO ((rtx, rtx));
+static rtx sge_plus PARAMS ((enum machine_mode, rtx, rtx));
+static rtx sge_plus_constant PARAMS ((rtx, rtx));
+static int cmp_combine_givs_stats PARAMS ((const PTR, const PTR));
+static int cmp_recombine_givs_stats PARAMS ((const PTR, const PTR));
static rtx
simplify_giv_expr (x, benefit)
};
static int
-cmp_combine_givs_stats (x, y)
- struct combine_givs_stats *x, *y;
+cmp_combine_givs_stats (xp, yp)
+ const PTR xp;
+ const PTR yp;
{
+ const struct combine_givs_stats * const x =
+ (const struct combine_givs_stats *) xp;
+ const struct combine_givs_stats * const y =
+ (const struct combine_givs_stats *) yp;
int d;
d = y->total_benefit - x->total_benefit;
/* Stabilize the sort. */
when scanning the array starting at the end, thus the arguments are
used in reverse. */
static int
-cmp_recombine_givs_stats (x, y)
- struct recombine_givs_stats *x, *y;
+cmp_recombine_givs_stats (xp, yp)
+ const PTR xp;
+ const PTR yp;
{
+ const struct recombine_givs_stats * const x =
+ (const struct recombine_givs_stats *) xp;
+ const struct recombine_givs_stats * const y =
+ (const struct recombine_givs_stats *) yp;
int d;
d = y->start_luid - x->start_luid;
/* Stabilize the sort. */
|| (GET_CODE (comparison) == LE
&& no_use_except_counting)))
{
- HOST_WIDE_INT add_val, add_adjust, comparison_val;
+ HOST_WIDE_INT add_val, add_adjust, comparison_val = 0;
rtx initial_value, comparison_value;
int nonneg = 0;
enum rtx_code cmp_code;
int, rtx));
static int find_inc_amount PROTO((rtx, rtx));
static int loc_mentioned_in_p PROTO((rtx *, rtx));
+extern void debug_reload_to_stream PROTO((FILE *));
+extern void debug_reload PROTO((void));
\f
#ifdef HAVE_SECONDARY_RELOADS
rtx
get_secondary_mem (x, mode, opnum, type)
- rtx x;
+ rtx x ATTRIBUTE_UNUSED;
enum machine_mode mode;
int opnum;
enum reload_type type;
{
int class;
int regno;
- enum reg_class best_class;
+ enum reg_class best_class = NO_REGS;
int best_size = 0;
for (class = 1; class < N_REG_CLASSES; class++)
insn_code_number = INSN_CODE (insn);
this_insn_is_asm = insn_code_number < 0;
- bcopy ((char *) recog_data.operand_mode, (char *) operand_mode,
- noperands * sizeof (enum machine_mode));
- bcopy ((char *) recog_data.constraints, (char *) constraints,
- noperands * sizeof (char *));
+ memcpy (operand_mode, recog_data.operand_mode,
+ noperands * sizeof (enum machine_mode));
+ memcpy (constraints, recog_data.constraints, noperands * sizeof (char *));
commutative = -1;
pref_or_nothing[commutative] = pref_or_nothing[commutative + 1];
pref_or_nothing[commutative + 1] = t;
- bcopy ((char *) recog_data.constraints, (char *) constraints,
- noperands * sizeof (char *));
+ memcpy (constraints, recog_data.constraints,
+ noperands * sizeof (char *));
goto try_swapped;
}
else
#ifdef AUTO_INC_DEC
static void add_auto_inc_notes PROTO((rtx, rtx));
#endif
+static rtx gen_mode_int PROTO((enum machine_mode,
+ HOST_WIDE_INT));
+extern void dump_needs PROTO((struct insn_chain *, FILE *));
\f
/* Initialize the reload pass once per compilation. */
const PTR p1p;
const PTR p2p;
{
- struct hard_reg_n_uses *p1 = (struct hard_reg_n_uses *)p1p;
- struct hard_reg_n_uses *p2 = (struct hard_reg_n_uses *)p2p;
+ const struct hard_reg_n_uses *p1 = (const struct hard_reg_n_uses *)p1p;
+ const struct hard_reg_n_uses *p2 = (const struct hard_reg_n_uses *)p2p;
int bad1 = TEST_HARD_REG_BIT (bad_spill_regs, p1->regno);
int bad2 = TEST_HARD_REG_BIT (bad_spill_regs, p2->regno);
if (bad1 && bad2)
const PTR r1p;
const PTR r2p;
{
- register int r1 = *(short *)r1p, r2 = *(short *)r2p;
+ register int r1 = *(const short *)r1p, r2 = *(const short *)r2p;
register int t;
/* Consider required reloads before optional ones. */
register rtx equiv
= find_equiv_reg (search_equiv, insn, rld[r].class,
-1, NULL_PTR, 0, reload_mode[r]);
- int regno;
+ int regno = 0;
if (equiv != 0)
{