cselib and incdec

gcc/
	* rtl.h (for_each_inc_dec): Strengthen param 1 from rtx * to
	rtx_insn **.
	(check_for_inc_dec): Strengthen param "insn" from rtx to
	rtx_insn *.

	* cselib.h (cselib_process_insn): Likewise.

	* cselib.c (cselib_record_sets): Likewise.
	(cselib_process_insn): Likewise.

	* dse.c (struct insn_info): Likewise for field "insn".
	(check_for_inc_dec_1): Likewise for local "insn".
	(check_for_inc_dec): Likewise for param "insn".
	(scan_insn): Likewise.
	(dse_step1): Likewise for local "insn".

	* rtlanal.c (for_each_inc_dec): Strengthen param 1 from rtx * to
	rtx_insn **.  Use for_each_rtx_in_insn rather than for_each_rtx.

From-SVN: r214531
This commit is contained in:
David Malcolm 2014-08-26 18:03:09 +00:00 committed by David Malcolm
parent 0e0ce50de6
commit dd60a84ce0
6 changed files with 35 additions and 14 deletions

View File

@ -1,3 +1,24 @@
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* rtl.h (for_each_inc_dec): Strengthen param 1 from rtx * to
rtx_insn **.
(check_for_inc_dec): Strengthen param "insn" from rtx to
rtx_insn *.
* cselib.h (cselib_process_insn): Likewise.
* cselib.c (cselib_record_sets): Likewise.
(cselib_process_insn): Likewise.
* dse.c (struct insn_info): Likewise for field "insn".
(check_for_inc_dec_1): Likewise for local "insn".
(check_for_inc_dec): Likewise for param "insn".
(scan_insn): Likewise.
(dse_step1): Likewise for local "insn".
* rtlanal.c (for_each_inc_dec): Strengthen param 1 from rtx * to
rtx_insn **. Use for_each_rtx_in_insn rather than for_each_rtx.
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* sched-int.h (struct _dep): Strengthen fields "pro" and "con"

View File

@ -67,7 +67,7 @@ static cselib_val *cselib_lookup_mem (rtx, int);
static void cselib_invalidate_regno (unsigned int, enum machine_mode);
static void cselib_invalidate_mem (rtx);
static void cselib_record_set (rtx, cselib_val *, cselib_val *);
static void cselib_record_sets (rtx);
static void cselib_record_sets (rtx_insn *);
struct expand_value_data
{
@ -2469,7 +2469,7 @@ cselib_record_autoinc_cb (rtx mem ATTRIBUTE_UNUSED, rtx op ATTRIBUTE_UNUSED,
/* Record the effects of any sets and autoincs in INSN. */
static void
cselib_record_sets (rtx insn)
cselib_record_sets (rtx_insn *insn)
{
int n_sets = 0;
int i;
@ -2627,7 +2627,7 @@ fp_setter_insn (rtx insn)
/* Record the effects of INSN. */
void
cselib_process_insn (rtx insn)
cselib_process_insn (rtx_insn *insn)
{
int i;
rtx x;

View File

@ -75,7 +75,7 @@ extern cselib_val *cselib_lookup_from_insn (rtx, enum machine_mode,
extern void cselib_init (int);
extern void cselib_clear_table (void);
extern void cselib_finish (void);
extern void cselib_process_insn (rtx);
extern void cselib_process_insn (rtx_insn *);
extern bool fp_setter_insn (rtx);
extern enum machine_mode cselib_reg_set_mode (const_rtx);
extern int rtx_equal_for_cselib_p (rtx, rtx);

View File

@ -379,7 +379,7 @@ struct insn_info
bool contains_cselib_groups;
/* The insn. */
rtx insn;
rtx_insn *insn;
/* The list of mem sets or mem clobbers that are contained in this
insn. If the insn is deletable, it contains only one mem set.
@ -903,7 +903,7 @@ emit_inc_dec_insn_before (rtx mem ATTRIBUTE_UNUSED,
static bool
check_for_inc_dec_1 (insn_info_t insn_info)
{
rtx insn = insn_info->insn;
rtx_insn *insn = insn_info->insn;
rtx note = find_reg_note (insn, REG_INC, NULL_RTX);
if (note)
return for_each_inc_dec (&insn, emit_inc_dec_insn_before, insn_info) == 0;
@ -916,7 +916,7 @@ check_for_inc_dec_1 (insn_info_t insn_info)
and add a parameter to this function so that it can be passed down in
insn_info.fixed_regs_live. */
bool
check_for_inc_dec (rtx insn)
check_for_inc_dec (rtx_insn *insn)
{
struct insn_info insn_info;
rtx note;
@ -2442,7 +2442,7 @@ copy_fixed_regs (const_bitmap in)
non-register target. */
static void
scan_insn (bb_info_t bb_info, rtx insn)
scan_insn (bb_info_t bb_info, rtx_insn *insn)
{
rtx body;
insn_info_t insn_info = (insn_info_t) pool_alloc (insn_info_pool);
@ -2708,7 +2708,7 @@ dse_step1 (void)
if (bb->index >= NUM_FIXED_BLOCKS)
{
rtx insn;
rtx_insn *insn;
cse_store_info_pool
= create_alloc_pool ("cse_store_info_pool",

View File

@ -2648,7 +2648,7 @@ extern int for_each_rtx_in_insn (rtx_insn **, rtx_function, void *);
for_each_inc_dec. */
typedef int (*for_each_inc_dec_fn) (rtx mem, rtx op, rtx dest, rtx src,
rtx srcoff, void *arg);
extern int for_each_inc_dec (rtx *, for_each_inc_dec_fn, void *arg);
extern int for_each_inc_dec (rtx_insn **, for_each_inc_dec_fn, void *arg);
typedef int (*rtx_equal_p_callback_function) (const_rtx *, const_rtx *,
rtx *, rtx *);
@ -3056,7 +3056,7 @@ extern int exp_equiv_p (const_rtx, const_rtx, int, bool);
extern unsigned hash_rtx (const_rtx x, enum machine_mode, int *, int *, bool);
/* In dse.c */
extern bool check_for_inc_dec (rtx insn);
extern bool check_for_inc_dec (rtx_insn *insn);
/* In jump.c */
extern int comparison_dominates_p (enum rtx_code, enum rtx_code);

View File

@ -3120,7 +3120,7 @@ for_each_inc_dec_find_mem (rtx *r, void *d)
return 0;
}
/* Traverse *X looking for MEMs, and for autoinc operations within
/* Traverse *INSN looking for MEMs, and for autoinc operations within
them. For each such autoinc operation found, call FN, passing it
the innermost enclosing MEM, the operation itself, the RTX modified
by the operation, two RTXs (the second may be NULL) that, once
@ -3131,7 +3131,7 @@ for_each_inc_dec_find_mem (rtx *r, void *d)
for_each_inc_dec. */
int
for_each_inc_dec (rtx *x,
for_each_inc_dec (rtx_insn **insn,
for_each_inc_dec_fn fn,
void *arg)
{
@ -3141,7 +3141,7 @@ for_each_inc_dec (rtx *x,
data.arg = arg;
data.mem = NULL;
return for_each_rtx (x, for_each_inc_dec_find_mem, &data);
return for_each_rtx_in_insn (insn, for_each_inc_dec_find_mem, &data);
}