alias.c (record_set, [...]): Constify.

* alias.c (record_set, memory_modified_1): Constify.
	* bt-load.c (note_btr_set): Likewise.
	* caller-save.c (mark_set_regs, add_stored_regs): Likewise.
	* combine.c (set_nonzero_bits_and_sign_copies,
	expand_field_assignment, record_dead_and_set_regs_1,
	use_crosses_set_p, reg_dead_at_p_1, can_combine_p,
	likely_spilled_retval_1): Likewise.
	* config/frv/frv.c (frv_registers_update_1, frv_io_check_address,
	frv_io_handle_set): Likewise.
	* config/mips/mips.c (mips_sim_record_set,
	vr4130_true_reg_dependence_p_1): Likewise.
	* config/mt/mt.c (insn_dependent_p_1): Likewise.
	* config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
	* config/sh/sh.c (flow_dependent_p_1): Likewise.
	* cselib.c (cselib_invalidate_rtx_note_stores): Likewise.
	* dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise.
	* ddg.c (mark_mem_store): Likewise.
	* df-problems.c (df_urec_mark_reg_change): Likewise.
	* function.c (update_epilogue_consts): Likewise.
	* gcse.c (record_set_info, record_last_set_info,
	mems_conflict_for_gcse_p, canon_list_insert, reg_set_info,
	reg_clear_last_set): Likewise.
	* global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live):
	Likewise.
	* jump.c (reversed_comparison_code_parts): Likewise.
	* local-alloc.c (validate_equiv_mem_from_store, no_equiv,
	reg_is_set): Likewise.
	* loop-iv.c (mark_altered): Likewise.
	* mode-switching.c (reg_becomes_live): Likewise.
	* optabs.c (no_conflict_move_test): Likewise.
	* postreload-gcse.c (record_last_set_info, find_mem_conflicts):
	Likewise.
	* postreload.c (reload_combine_note_store, move2add_note_store):
	Likewise.
	* regmove.c (flags_set_1): Likewise.
	* regrename.c (note_sets, kill_clobbered_value, kill_set_value):
	Likewise.
	* reload1.c (mark_not_eliminable, forget_old_reloads_1):
	Likewise. 
	* resource.c (update_live_status): Likewise.
	* rtl.h (set_of, note_stores): Likewise.
	* rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of,
	note_stores, parms_set): Likewise.
	* sched-rgn.c (sets_likely_spilled_1): Likewise.
	* stack-ptr-mod.c (notice_stack_pointer_modification_1):
	Likewise. 
	* var-tracking.c (count_stores, add_stores): Likewise.

From-SVN: r127065
This commit is contained in:
Kaveh R. Ghazi 2007-07-30 16:30:18 +00:00 committed by Kaveh Ghazi
parent 4f5888905c
commit 7bc980e1d9
33 changed files with 166 additions and 115 deletions

View File

@ -1,3 +1,53 @@
2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* alias.c (record_set, memory_modified_1): Constify.
* bt-load.c (note_btr_set): Likewise.
* caller-save.c (mark_set_regs, add_stored_regs): Likewise.
* combine.c (set_nonzero_bits_and_sign_copies,
expand_field_assignment, record_dead_and_set_regs_1,
use_crosses_set_p, reg_dead_at_p_1, can_combine_p,
likely_spilled_retval_1): Likewise.
* config/frv/frv.c (frv_registers_update_1, frv_io_check_address,
frv_io_handle_set): Likewise.
* config/mips/mips.c (mips_sim_record_set,
vr4130_true_reg_dependence_p_1): Likewise.
* config/mt/mt.c (insn_dependent_p_1): Likewise.
* config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
* config/sh/sh.c (flow_dependent_p_1): Likewise.
* cselib.c (cselib_invalidate_rtx_note_stores): Likewise.
* dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise.
* ddg.c (mark_mem_store): Likewise.
* df-problems.c (df_urec_mark_reg_change): Likewise.
* function.c (update_epilogue_consts): Likewise.
* gcse.c (record_set_info, record_last_set_info,
mems_conflict_for_gcse_p, canon_list_insert, reg_set_info,
reg_clear_last_set): Likewise.
* global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live):
Likewise.
* jump.c (reversed_comparison_code_parts): Likewise.
* local-alloc.c (validate_equiv_mem_from_store, no_equiv,
reg_is_set): Likewise.
* loop-iv.c (mark_altered): Likewise.
* mode-switching.c (reg_becomes_live): Likewise.
* optabs.c (no_conflict_move_test): Likewise.
* postreload-gcse.c (record_last_set_info, find_mem_conflicts):
Likewise.
* postreload.c (reload_combine_note_store, move2add_note_store):
Likewise.
* regmove.c (flags_set_1): Likewise.
* regrename.c (note_sets, kill_clobbered_value, kill_set_value):
Likewise.
* reload1.c (mark_not_eliminable, forget_old_reloads_1):
Likewise.
* resource.c (update_live_status): Likewise.
* rtl.h (set_of, note_stores): Likewise.
* rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of,
note_stores, parms_set): Likewise.
* sched-rgn.c (sets_likely_spilled_1): Likewise.
* stack-ptr-mod.c (notice_stack_pointer_modification_1):
Likewise.
* var-tracking.c (count_stores, add_stores): Likewise.
2007-07-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* alias.c (mems_in_disjoint_alias_sets_p,

View File

@ -150,7 +150,7 @@ typedef struct alias_set_entry *alias_set_entry;
static int rtx_equal_for_memref_p (rtx, rtx);
static int memrefs_conflict_p (int, rtx, int, rtx, HOST_WIDE_INT);
static void record_set (rtx, rtx, void *);
static void record_set (rtx, const_rtx, void *);
static int base_alias_check (rtx, rtx, enum machine_mode,
enum machine_mode);
static rtx find_base_value (rtx);
@ -167,7 +167,7 @@ static rtx adjust_offset_for_component_ref (tree, rtx);
static int nonoverlapping_memrefs_p (const_rtx, const_rtx);
static int write_dependence_p (const_rtx, const_rtx, int);
static void memory_modified_1 (rtx, rtx, void *);
static void memory_modified_1 (rtx, const_rtx, void *);
static void record_alias_subset (HOST_WIDE_INT, HOST_WIDE_INT);
/* Set up all info needed to perform alias analysis on memory references. */
@ -978,7 +978,7 @@ static char *reg_seen;
static int unique_id;
static void
record_set (rtx dest, rtx set, void *data ATTRIBUTE_UNUSED)
record_set (rtx dest, const_rtx set, void *data ATTRIBUTE_UNUSED)
{
unsigned regno;
rtx src;
@ -2353,7 +2353,7 @@ init_alias_once (void)
to be memory reference. */
static bool memory_modified;
static void
memory_modified_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
memory_modified_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
if (MEM_P (x))
{

View File

@ -141,7 +141,7 @@ static void move_btr_def (basic_block, int, btr_def, bitmap, HARD_REG_SET *);
static int migrate_btr_def (btr_def, int);
static void migrate_btr_defs (enum reg_class, int);
static int can_move_up (basic_block, rtx, int);
static void note_btr_set (rtx, rtx, void *);
static void note_btr_set (rtx, const_rtx, void *);
/* The following code performs code motion of target load instructions
(instructions that set branch target registers), to move them
@ -423,7 +423,7 @@ typedef struct {
straightforward definitions. DATA points to information about the
current basic block that needs updating. */
static void
note_btr_set (rtx dest, rtx set ATTRIBUTE_UNUSED, void *data)
note_btr_set (rtx dest, const_rtx set ATTRIBUTE_UNUSED, void *data)
{
defs_uses_info *info = data;
int regno, end_regno;

View File

@ -86,7 +86,7 @@ static int n_regs_saved;
static HARD_REG_SET referenced_regs;
static void mark_set_regs (rtx, rtx, void *);
static void mark_set_regs (rtx, const_rtx, void *);
static void mark_referenced_regs (rtx);
static int insert_save (struct insn_chain *, int, int, HARD_REG_SET *,
enum machine_mode *);
@ -94,7 +94,7 @@ static int insert_restore (struct insn_chain *, int, int, int,
enum machine_mode *);
static struct insn_chain *insert_one_insn (struct insn_chain *, int, int,
rtx);
static void add_stored_regs (rtx, rtx, void *);
static void add_stored_regs (rtx, const_rtx, void *);
static GTY(()) rtx savepat;
static GTY(()) rtx restpat;
@ -511,7 +511,7 @@ save_call_clobbered_regs (void)
been assigned hard regs have had their register number changed already,
so we can ignore pseudos. */
static void
mark_set_regs (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *data)
mark_set_regs (rtx reg, const_rtx setter ATTRIBUTE_UNUSED, void *data)
{
int regno, endregno, i;
HARD_REG_SET *this_insn_sets = data;
@ -542,7 +542,7 @@ mark_set_regs (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *data)
been assigned hard regs have had their register number changed already,
so we can ignore pseudos. */
static void
add_stored_regs (rtx reg, rtx setter, void *data)
add_stored_regs (rtx reg, const_rtx setter, void *data)
{
int regno, endregno, i;
enum machine_mode mode = GET_MODE (reg);

View File

@ -379,7 +379,7 @@ static void do_SUBST (rtx *, rtx);
static void do_SUBST_INT (int *, int);
static void init_reg_last (void);
static void setup_incoming_promotions (rtx);
static void set_nonzero_bits_and_sign_copies (rtx, rtx, void *);
static void set_nonzero_bits_and_sign_copies (rtx, const_rtx, void *);
static int cant_combine_insn_p (rtx);
static int can_combine_p (rtx, rtx, rtx, rtx, rtx *, rtx *);
static int combinable_i3pat (rtx, rtx *, rtx, rtx, int, rtx *);
@ -394,7 +394,7 @@ static rtx simplify_if_then_else (rtx);
static rtx simplify_set (rtx);
static rtx simplify_logical (rtx);
static rtx expand_compound_operation (rtx);
static rtx expand_field_assignment (rtx);
static const_rtx expand_field_assignment (const_rtx);
static rtx make_extraction (enum machine_mode, rtx, HOST_WIDE_INT,
rtx, unsigned HOST_WIDE_INT, int, int, int);
static rtx extract_left_shift (rtx, int);
@ -425,12 +425,12 @@ static enum rtx_code simplify_comparison (enum rtx_code, rtx *, rtx *);
static void update_table_tick (rtx);
static void record_value_for_reg (rtx, rtx, rtx);
static void check_conversions (rtx, rtx);
static void record_dead_and_set_regs_1 (rtx, rtx, void *);
static void record_dead_and_set_regs_1 (rtx, const_rtx, void *);
static void record_dead_and_set_regs (rtx);
static int get_last_value_validate (rtx *, rtx, int, int);
static rtx get_last_value (const_rtx);
static int use_crosses_set_p (rtx, int);
static void reg_dead_at_p_1 (rtx, rtx, void *);
static int use_crosses_set_p (const_rtx, int);
static void reg_dead_at_p_1 (rtx, const_rtx, void *);
static int reg_dead_at_p (rtx, rtx);
static void move_deaths (rtx, rtx, int, rtx, rtx *);
static int reg_bitfield_target_p (rtx, rtx);
@ -1361,7 +1361,7 @@ setup_incoming_promotions (rtx first)
by any set of X. */
static void
set_nonzero_bits_and_sign_copies (rtx x, rtx set, void *data)
set_nonzero_bits_and_sign_copies (rtx x, const_rtx set, void *data)
{
rtx insn = (rtx) data;
unsigned int num;
@ -1483,7 +1483,8 @@ can_combine_p (rtx insn, rtx i3, rtx pred ATTRIBUTE_UNUSED, rtx succ,
rtx *pdest, rtx *psrc)
{
int i;
rtx set = 0, src, dest;
const_rtx set = 0;
rtx src, dest;
rtx p;
#ifdef AUTO_INC_DEC
rtx link;
@ -1992,7 +1993,7 @@ struct likely_spilled_retval_info
/* Called via note_stores by likely_spilled_retval_p. Remove from info->mask
hard registers that are known to be written to / clobbered in full. */
static void
likely_spilled_retval_1 (rtx x, rtx set, void *data)
likely_spilled_retval_1 (rtx x, const_rtx set, void *data)
{
struct likely_spilled_retval_info *info = data;
unsigned regno, nregs;
@ -6169,8 +6170,8 @@ expand_compound_operation (rtx x)
We half-heartedly support variable positions, but do not at all
support variable lengths. */
static rtx
expand_field_assignment (rtx x)
static const_rtx
expand_field_assignment (const_rtx x)
{
rtx inner;
rtx pos; /* Always counts from low bit. */
@ -11357,7 +11358,7 @@ record_value_for_reg (rtx reg, rtx insn, rtx value)
set is occurring. */
static void
record_dead_and_set_regs_1 (rtx dest, rtx setter, void *data)
record_dead_and_set_regs_1 (rtx dest, const_rtx setter, void *data)
{
rtx record_dead_insn = (rtx) data;
@ -11787,7 +11788,7 @@ get_last_value (const_rtx x)
that is set in an instruction more recent than FROM_LUID. */
static int
use_crosses_set_p (rtx x, int from_luid)
use_crosses_set_p (const_rtx x, int from_luid)
{
const char *fmt;
int i;
@ -11848,7 +11849,7 @@ static int reg_dead_flag;
reg_dead_flag to 1 if X is a CLOBBER and to -1 it is a SET. */
static void
reg_dead_at_p_1 (rtx dest, rtx x, void *data ATTRIBUTE_UNUSED)
reg_dead_at_p_1 (rtx dest, const_rtx x, void *data ATTRIBUTE_UNUSED)
{
unsigned int regno, endregno;

View File

@ -331,7 +331,7 @@ static int frv_cond_flags (rtx);
static bool frv_regstate_conflict_p (regstate_t, regstate_t);
static int frv_registers_conflict_p_1 (rtx *, void *);
static bool frv_registers_conflict_p (rtx);
static void frv_registers_update_1 (rtx, rtx, void *);
static void frv_registers_update_1 (rtx, const_rtx, void *);
static void frv_registers_update (rtx);
static void frv_start_packet (void);
static void frv_start_packet_block (void);
@ -7215,7 +7215,7 @@ frv_registers_conflict_p (rtx x)
under which X is modified. Update FRV_PACKET accordingly. */
static void
frv_registers_update_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
frv_registers_update_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
unsigned int regno;
@ -7753,7 +7753,7 @@ frv_extract_membar (struct frv_io *io, rtx insn)
if X is a register and *DATA depends on X. */
static void
frv_io_check_address (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
frv_io_check_address (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
rtx *other = data;
@ -7765,7 +7765,7 @@ frv_io_check_address (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
Remove every modified register from the set. */
static void
frv_io_handle_set (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
frv_io_handle_set (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
HARD_REG_SET *set = data;
unsigned int regno;

View File

@ -371,7 +371,7 @@ static void mips_sim_wait_regs_1 (rtx *, void *);
static void mips_sim_wait_regs (struct mips_sim *, rtx);
static void mips_sim_wait_units (struct mips_sim *, rtx);
static void mips_sim_wait_insn (struct mips_sim *, rtx);
static void mips_sim_record_set (rtx, rtx, void *);
static void mips_sim_record_set (rtx, const_rtx, void *);
static void mips_sim_issue_insn (struct mips_sim *, rtx);
static void mips_sim_issue_nop (struct mips_sim *);
static void mips_sim_finish_insn (struct mips_sim *, rtx);
@ -388,7 +388,7 @@ static bool mips_return_in_memory (tree, tree);
static bool mips_strict_argument_naming (CUMULATIVE_ARGS *);
static void mips_macc_chains_record (rtx);
static void mips_macc_chains_reorder (rtx *, int);
static void vr4130_true_reg_dependence_p_1 (rtx, rtx, void *);
static void vr4130_true_reg_dependence_p_1 (rtx, const_rtx, void *);
static bool vr4130_true_reg_dependence_p (rtx);
static bool vr4130_swap_insns_p (rtx, rtx);
static void vr4130_reorder (rtx *, int);
@ -9705,7 +9705,7 @@ mips_sim_wait_insn (struct mips_sim *state, rtx insn)
in simulation state DATA. */
static void
mips_sim_record_set (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
mips_sim_record_set (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
struct mips_sim *state;
unsigned int i;
@ -10772,7 +10772,7 @@ static rtx vr4130_last_insn;
if the instruction uses the value of register X. */
static void
vr4130_true_reg_dependence_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
vr4130_true_reg_dependence_p_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
rtx *insn_ptr = data;
if (REG_P (x)

View File

@ -156,7 +156,7 @@ mt_get_attr_type (rtx complete_insn)
/* A helper routine for insn_dependent_p called through note_stores. */
static void
insn_dependent_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
insn_dependent_p_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
rtx * pinsn = (rtx *) data;

View File

@ -6348,7 +6348,7 @@ find_unused_clobbered_reg (void)
clobbered hard regs in SETREG. */
static void
s390_reg_clobbered_rtx (rtx setreg, rtx set_insn ATTRIBUTE_UNUSED, void *data)
s390_reg_clobbered_rtx (rtx setreg, const_rtx set_insn ATTRIBUTE_UNUSED, void *data)
{
int *regs_ever_clobbered = (int *)data;
unsigned int i, regno;

View File

@ -223,7 +223,7 @@ static rtx sh_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
static void sh_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree);
static void sh_file_start (void);
static int flow_dependent_p (rtx, rtx);
static void flow_dependent_p_1 (rtx, rtx, void *);
static void flow_dependent_p_1 (rtx, const_rtx, void *);
static int shiftcosts (rtx);
static int andcosts (rtx);
static int addsubcosts (rtx);
@ -8911,7 +8911,7 @@ flow_dependent_p (rtx insn, rtx dep_insn)
/* A helper function for flow_dependent_p called through note_stores. */
static void
flow_dependent_p_1 (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
flow_dependent_p_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
rtx * pinsn = (rtx *) data;

View File

@ -1468,7 +1468,7 @@ cselib_invalidate_rtx (rtx dest)
/* A wrapper for cselib_invalidate_rtx to be called via note_stores. */
static void
cselib_invalidate_rtx_note_stores (rtx dest, rtx ignore ATTRIBUTE_UNUSED,
cselib_invalidate_rtx_note_stores (rtx dest, const_rtx ignore ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
cselib_invalidate_rtx (dest);

View File

@ -168,7 +168,7 @@ mark_insn (rtx insn, bool fast)
instruction containing DEST. */
static void
mark_nonreg_stores_1 (rtx dest, rtx pattern, void *data)
mark_nonreg_stores_1 (rtx dest, const_rtx pattern, void *data)
{
if (GET_CODE (pattern) != CLOBBER && !REG_P (dest))
mark_insn ((rtx) data, true);
@ -179,7 +179,7 @@ mark_nonreg_stores_1 (rtx dest, rtx pattern, void *data)
instruction containing DEST. */
static void
mark_nonreg_stores_2 (rtx dest, rtx pattern, void *data)
mark_nonreg_stores_2 (rtx dest, const_rtx pattern, void *data)
{
if (GET_CODE (pattern) != CLOBBER && !REG_P (dest))
mark_insn ((rtx) data, false);

View File

@ -87,7 +87,7 @@ mem_read_insn_p (rtx insn)
}
static void
mark_mem_store (rtx loc, rtx setter ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED)
mark_mem_store (rtx loc, const_rtx setter ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED)
{
if (MEM_P (loc))
mem_ref_p = true;

View File

@ -2594,7 +2594,7 @@ df_urec_alloc (bitmap all_blocks)
SETTER. DATA is used to pass the current basic block info. */
static void
df_urec_mark_reg_change (rtx reg, rtx setter, void *data)
df_urec_mark_reg_change (rtx reg, const_rtx setter, void *data)
{
int regno;
int endregno;

View File

@ -4700,7 +4700,7 @@ struct epi_info
};
static void handle_epilogue_set (rtx, struct epi_info *);
static void update_epilogue_consts (rtx, rtx, void *);
static void update_epilogue_consts (rtx, const_rtx, void *);
static void emit_equiv_load (struct epi_info *);
/* Modify INSN, a list of one or more insns that is part of the epilogue, to
@ -4976,7 +4976,7 @@ handle_epilogue_set (rtx set, struct epi_info *p)
/* Update the tracking information for registers set to constants. */
static void
update_epilogue_consts (rtx dest, rtx x, void *data)
update_epilogue_consts (rtx dest, const_rtx x, void *data)
{
struct epi_info *p = (struct epi_info *) data;
rtx new;

View File

@ -523,7 +523,7 @@ static void free_gcse_mem (void);
static void alloc_reg_set_mem (int);
static void free_reg_set_mem (void);
static void record_one_set (int, rtx);
static void record_set_info (rtx, rtx, void *);
static void record_set_info (rtx, const_rtx, void *);
static void compute_sets (void);
static void hash_scan_insn (rtx, struct hash_table *, int);
static void hash_scan_set (rtx, rtx, struct hash_table *);
@ -543,7 +543,7 @@ static unsigned int hash_set (int, int);
static int expr_equiv_p (rtx, rtx);
static void record_last_reg_set_info (rtx, int);
static void record_last_mem_set_info (rtx);
static void record_last_set_info (rtx, rtx, void *);
static void record_last_set_info (rtx, const_rtx, void *);
static void compute_hash_table (struct hash_table *);
static void alloc_hash_table (int, struct hash_table *, int);
static void free_hash_table (struct hash_table *);
@ -568,9 +568,9 @@ static void find_used_regs (rtx *, void *);
static int try_replace_reg (rtx, rtx, rtx);
static struct expr *find_avail_set (int, rtx);
static int cprop_jump (basic_block, rtx, rtx, rtx, rtx);
static void mems_conflict_for_gcse_p (rtx, rtx, void *);
static void mems_conflict_for_gcse_p (rtx, const_rtx, void *);
static int load_killed_in_block_p (basic_block, int, rtx, int);
static void canon_list_insert (rtx, rtx, void *);
static void canon_list_insert (rtx, const_rtx, void *);
static int cprop_insn (rtx, int);
static int cprop (int);
static void find_implicit_sets (void);
@ -616,8 +616,8 @@ static void invalidate_any_buried_refs (rtx);
static void compute_ld_motion_mems (void);
static void trim_ld_motion_mems (void);
static void update_ld_motion_stores (struct expr *);
static void reg_set_info (rtx, rtx, void *);
static void reg_clear_last_set (rtx, rtx, void *);
static void reg_set_info (rtx, const_rtx, void *);
static void reg_clear_last_set (rtx, const_rtx, void *);
static bool store_ops_ok (rtx, int *);
static rtx extract_mentioned_regs (rtx);
static rtx extract_mentioned_regs_helper (rtx, rtx);
@ -1129,7 +1129,7 @@ record_one_set (int regno, rtx insn)
occurring. */
static void
record_set_info (rtx dest, rtx setter ATTRIBUTE_UNUSED, void *data)
record_set_info (rtx dest, const_rtx setter ATTRIBUTE_UNUSED, void *data)
{
rtx record_set_insn = (rtx) data;
@ -1332,7 +1332,7 @@ static rtx gcse_mem_operand;
gcse_mems_conflict_p to a nonzero value. */
static void
mems_conflict_for_gcse_p (rtx dest, rtx setter ATTRIBUTE_UNUSED,
mems_conflict_for_gcse_p (rtx dest, const_rtx setter ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
while (GET_CODE (dest) == SUBREG
@ -1940,7 +1940,7 @@ record_last_reg_set_info (rtx insn, int regno)
taken off pairwise. */
static void
canon_list_insert (rtx dest ATTRIBUTE_UNUSED, rtx unused1 ATTRIBUTE_UNUSED,
canon_list_insert (rtx dest ATTRIBUTE_UNUSED, const_rtx unused1 ATTRIBUTE_UNUSED,
void * v_insn)
{
rtx dest_addr, insn;
@ -2001,7 +2001,7 @@ record_last_mem_set_info (rtx insn)
the SET is taking place. */
static void
record_last_set_info (rtx dest, rtx setter ATTRIBUTE_UNUSED, void *data)
record_last_set_info (rtx dest, const_rtx setter ATTRIBUTE_UNUSED, void *data)
{
rtx last_set_insn = (rtx) data;
@ -5471,7 +5471,7 @@ static int num_stores;
note_stores. */
static void
reg_set_info (rtx dest, rtx setter ATTRIBUTE_UNUSED,
reg_set_info (rtx dest, const_rtx setter ATTRIBUTE_UNUSED,
void *data)
{
sbitmap bb_reg = data;
@ -5491,7 +5491,7 @@ reg_set_info (rtx dest, rtx setter ATTRIBUTE_UNUSED,
note_stores. */
static void
reg_clear_last_set (rtx dest, rtx setter ATTRIBUTE_UNUSED,
reg_clear_last_set (rtx dest, const_rtx setter ATTRIBUTE_UNUSED,
void *data)
{
int *dead_vec = data;

View File

@ -343,13 +343,13 @@ static void prune_preferences (void);
static void find_reg (int, HARD_REG_SET, int, int, int);
static void record_one_conflict (int);
static void record_conflicts (int *, int);
static void mark_reg_store (rtx, rtx, void *);
static void mark_reg_clobber (rtx, rtx, void *);
static void mark_reg_store (rtx, const_rtx, void *);
static void mark_reg_clobber (rtx, const_rtx, void *);
static void mark_reg_conflicts (rtx);
static void mark_reg_death (rtx);
static void set_preference (rtx, rtx);
static void dump_conflicts (FILE *);
static void reg_becomes_live (rtx, rtx, void *);
static void reg_becomes_live (rtx, const_rtx, void *);
static void reg_dies (int, enum machine_mode, struct insn_chain *);
@ -1542,7 +1542,7 @@ mirror_conflicts (void)
a REG_INC note was found for it). */
static void
mark_reg_store (rtx reg, rtx setter, void *data ATTRIBUTE_UNUSED)
mark_reg_store (rtx reg, const_rtx setter, void *data ATTRIBUTE_UNUSED)
{
int regno;
@ -1589,7 +1589,7 @@ mark_reg_store (rtx reg, rtx setter, void *data ATTRIBUTE_UNUSED)
/* Like mark_reg_store except notice just CLOBBERs; ignore SETs. */
static void
mark_reg_clobber (rtx reg, rtx setter, void *data)
mark_reg_clobber (rtx reg, const_rtx setter, void *data)
{
if (GET_CODE (setter) == CLOBBER)
mark_reg_store (reg, setter, data);
@ -1798,7 +1798,7 @@ static regset live_relevant_regs;
/* Record in live_relevant_regs and REGS_SET that register REG became live.
This is called via note_stores. */
static void
reg_becomes_live (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *regs_set)
reg_becomes_live (rtx reg, const_rtx setter ATTRIBUTE_UNUSED, void *regs_set)
{
int regno;

View File

@ -302,7 +302,7 @@ reversed_comparison_code_parts (enum rtx_code code, rtx arg0, rtx arg1, rtx insn
prev != 0 && !LABEL_P (prev);
prev = prev_nonnote_insn (prev))
{
rtx set = set_of (arg0, prev);
const_rtx set = set_of (arg0, prev);
if (set && GET_CODE (set) == SET
&& rtx_equal_p (SET_DEST (set), arg0))
{

View File

@ -287,7 +287,7 @@ static struct equivalence *reg_equiv;
static int recorded_label_ref;
static void alloc_qty (int, enum machine_mode, int, int);
static void validate_equiv_mem_from_store (rtx, rtx, void *);
static void validate_equiv_mem_from_store (rtx, const_rtx, void *);
static int validate_equiv_mem (rtx, rtx, rtx);
static int equiv_init_varies_p (rtx);
static int equiv_init_movable_p (rtx, int);
@ -295,7 +295,7 @@ static int contains_replace_regs (rtx);
static int memref_referenced_p (rtx, rtx);
static int memref_used_between_p (rtx, rtx, rtx);
static void update_equiv_regs (void);
static void no_equiv (rtx, rtx, void *);
static void no_equiv (rtx, const_rtx, void *);
static void block_alloc (int);
static int qty_sugg_compare (int, int);
static int qty_sugg_compare_1 (const void *, const void *);
@ -304,7 +304,7 @@ static int qty_compare_1 (const void *, const void *);
static int combine_regs (rtx, rtx, int, int, rtx, int);
static int reg_meets_class_p (int, enum reg_class);
static void update_qty_class (int, int);
static void reg_is_set (rtx, rtx, void *);
static void reg_is_set (rtx, const_rtx, void *);
static void reg_is_born (rtx, int);
static void wipe_dead_reg (rtx, int);
static int find_free_reg (enum reg_class, enum machine_mode, int, int, int,
@ -460,7 +460,7 @@ static int equiv_mem_modified;
Called via note_stores. */
static void
validate_equiv_mem_from_store (rtx dest, rtx set ATTRIBUTE_UNUSED,
validate_equiv_mem_from_store (rtx dest, const_rtx set ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
if ((REG_P (dest)
@ -1235,7 +1235,7 @@ update_equiv_regs (void)
assignment - a SET, CLOBBER or REG_INC note. It is currently not used,
but needs to be there because this function is called from note_stores. */
static void
no_equiv (rtx reg, rtx store ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED)
no_equiv (rtx reg, const_rtx store ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED)
{
int regno;
rtx list;
@ -2071,7 +2071,7 @@ update_qty_class (int qtyno, int reg)
carry info from `block_alloc'. */
static void
reg_is_set (rtx reg, rtx setter, void *data ATTRIBUTE_UNUSED)
reg_is_set (rtx reg, const_rtx setter, void *data ATTRIBUTE_UNUSED)
{
/* Note that note_stores will only pass us a SUBREG if it is a SUBREG of
a hard register. These may actually not exist any more. */

View File

@ -1308,7 +1308,7 @@ altered_reg_used (rtx *reg, void *alt)
/* Marks registers altered by EXPR in set ALT. */
static void
mark_altered (rtx expr, rtx by ATTRIBUTE_UNUSED, void *alt)
mark_altered (rtx expr, const_rtx by ATTRIBUTE_UNUSED, void *alt)
{
if (GET_CODE (expr) == SUBREG)
expr = SUBREG_REG (expr);

View File

@ -93,7 +93,7 @@ static sbitmap *comp;
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 reg_becomes_live (rtx, const_rtx, void *);
static void make_preds_opaque (basic_block, int);
@ -176,7 +176,7 @@ reg_dies (rtx reg, HARD_REG_SET *live)
This is called via note_stores. */
static void
reg_becomes_live (rtx reg, rtx setter ATTRIBUTE_UNUSED, void *live)
reg_becomes_live (rtx reg, const_rtx setter ATTRIBUTE_UNUSED, void *live)
{
int regno;

View File

@ -3395,7 +3395,7 @@ struct no_conflict_data
in the list of insns that constitute the actual no_conflict block /
libcall block. */
static void
no_conflict_move_test (rtx dest, rtx set, void *p0)
no_conflict_move_test (rtx dest, const_rtx set, void *p0)
{
struct no_conflict_data *p= p0;

View File

@ -177,10 +177,10 @@ static void free_mem (void);
static bool oprs_unchanged_p (rtx, rtx, bool);
static void record_last_reg_set_info (rtx, int);
static void record_last_mem_set_info (rtx);
static void record_last_set_info (rtx, rtx, void *);
static void record_last_set_info (rtx, const_rtx, void *);
static void record_opr_changes (rtx);
static void find_mem_conflicts (rtx, rtx, void *);
static void find_mem_conflicts (rtx, const_rtx, void *);
static int load_killed_in_block_p (int, rtx, bool);
static void reset_opr_set_tables (void);
@ -571,7 +571,7 @@ static int mems_conflict_p;
to a nonzero value. */
static void
find_mem_conflicts (rtx dest, rtx setter ATTRIBUTE_UNUSED,
find_mem_conflicts (rtx dest, const_rtx setter ATTRIBUTE_UNUSED,
void *data)
{
rtx mem_op = (rtx) data;
@ -671,7 +671,7 @@ record_last_mem_set_info (rtx insn)
the SET is taking place. */
static void
record_last_set_info (rtx dest, rtx setter ATTRIBUTE_UNUSED, void *data)
record_last_set_info (rtx dest, const_rtx setter ATTRIBUTE_UNUSED, void *data)
{
rtx last_set_insn = (rtx) data;

View File

@ -57,10 +57,10 @@ static int reload_cse_simplify_operands (rtx, rtx);
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_combine_note_store (rtx, const_rtx, void *);
static void reload_cse_move2add (rtx);
static void move2add_note_store (rtx, rtx, void *);
static void move2add_note_store (rtx, const_rtx, void *);
/* Call cse / combine like post-reload optimization phases.
FIRST is the first instruction. */
@ -980,7 +980,7 @@ reload_combine (void)
accordingly. Called via note_stores from reload_combine. */
static void
reload_combine_note_store (rtx dst, rtx set, void *data ATTRIBUTE_UNUSED)
reload_combine_note_store (rtx dst, const_rtx set, void *data ATTRIBUTE_UNUSED)
{
int regno = 0;
int i;
@ -1419,7 +1419,7 @@ reload_cse_move2add (rtx first)
Called from reload_cse_move2add via note_stores. */
static void
move2add_note_store (rtx dst, rtx set, void *data ATTRIBUTE_UNUSED)
move2add_note_store (rtx dst, const_rtx set, void *data ATTRIBUTE_UNUSED)
{
unsigned int regno = 0;
unsigned int nregs = 0;

View File

@ -62,7 +62,7 @@ struct match {
static rtx discover_flags_reg (void);
static void mark_flags_life_zones (rtx);
static void flags_set_1 (rtx, rtx, void *);
static void flags_set_1 (rtx, const_rtx, void *);
static int try_auto_increment (rtx, rtx, rtx, rtx, HOST_WIDE_INT, int);
static int find_matches (rtx, struct match *);
@ -371,7 +371,7 @@ mark_flags_life_zones (rtx flags)
/* A subroutine of mark_flags_life_zones, called through note_stores. */
static void
flags_set_1 (rtx x, rtx pat, void *data ATTRIBUTE_UNUSED)
flags_set_1 (rtx x, const_rtx pat, void *data ATTRIBUTE_UNUSED)
{
if (GET_CODE (pat) == SET
&& reg_overlap_mentioned_p (x, flags_set_1_rtx))

View File

@ -88,7 +88,7 @@ static void scan_rtx (rtx, rtx *, enum reg_class, enum scan_actions,
enum op_type, int);
static struct du_chain *build_def_use (basic_block);
static void dump_def_use_chain (struct du_chain *);
static void note_sets (rtx, rtx, void *);
static void note_sets (rtx, const_rtx, void *);
static void clear_dead_regs (HARD_REG_SET *, enum machine_mode, rtx);
static void merge_overlapping_regs (basic_block, HARD_REG_SET *,
struct du_chain *);
@ -97,7 +97,7 @@ static void merge_overlapping_regs (basic_block, HARD_REG_SET *,
record them in *DATA (which is actually a HARD_REG_SET *). */
static void
note_sets (rtx x, rtx set ATTRIBUTE_UNUSED, void *data)
note_sets (rtx x, const_rtx set ATTRIBUTE_UNUSED, void *data)
{
HARD_REG_SET *pset = (HARD_REG_SET *) data;
@ -1029,8 +1029,8 @@ static void kill_value_regno (unsigned, unsigned, struct value_data *);
static void kill_value (rtx, struct value_data *);
static void set_value_regno (unsigned, enum machine_mode, struct value_data *);
static void init_value_data (struct value_data *);
static void kill_clobbered_value (rtx, rtx, void *);
static void kill_set_value (rtx, rtx, void *);
static void kill_clobbered_value (rtx, const_rtx, void *);
static void kill_set_value (rtx, const_rtx, void *);
static int kill_autoinc_value (rtx *, void *);
static void copy_value (rtx, rtx, struct value_data *);
static bool mode_change_ok (enum machine_mode, enum machine_mode,
@ -1170,7 +1170,7 @@ init_value_data (struct value_data *vd)
/* Called through note_stores. If X is clobbered, kill its value. */
static void
kill_clobbered_value (rtx x, rtx set, void *data)
kill_clobbered_value (rtx x, const_rtx set, void *data)
{
struct value_data *vd = data;
if (GET_CODE (set) == CLOBBER)
@ -1181,7 +1181,7 @@ kill_clobbered_value (rtx x, rtx set, void *data)
current value and install it as the root of its own value list. */
static void
kill_set_value (rtx x, rtx set, void *data)
kill_set_value (rtx x, const_rtx set, void *data)
{
struct value_data *vd = data;
if (GET_CODE (set) != CLOBBER)

View File

@ -395,7 +395,7 @@ static void check_eliminable_occurrences (rtx);
static void elimination_effects (rtx, enum machine_mode);
static int eliminate_regs_in_insn (rtx, int);
static void update_eliminable_offsets (void);
static void mark_not_eliminable (rtx, rtx, void *);
static void mark_not_eliminable (rtx, const_rtx, void *);
static void set_initial_elim_offsets (void);
static bool verify_initial_elim_offsets (void);
static void set_initial_label_offsets (void);
@ -408,7 +408,7 @@ static void scan_paradoxical_subregs (rtx);
static void count_pseudo (int);
static void order_regs_for_reload (struct insn_chain *);
static void reload_as_needed (int);
static void forget_old_reloads_1 (rtx, rtx, void *);
static void forget_old_reloads_1 (rtx, const_rtx, void *);
static void forget_marked_reloads (regset);
static int reload_reg_class_lower (const void *, const void *);
static void mark_reload_reg_in_use (unsigned int, int, enum reload_type,
@ -3477,7 +3477,7 @@ update_eliminable_offsets (void)
the insns of the function. */
static void
mark_not_eliminable (rtx dest, rtx x, void *data ATTRIBUTE_UNUSED)
mark_not_eliminable (rtx dest, const_rtx x, void *data ATTRIBUTE_UNUSED)
{
unsigned int i;
@ -4327,7 +4327,7 @@ reload_as_needed (int live_known)
to be forgotten later. */
static void
forget_old_reloads_1 (rtx x, rtx ignored ATTRIBUTE_UNUSED,
forget_old_reloads_1 (rtx x, const_rtx ignored ATTRIBUTE_UNUSED,
void *data)
{
unsigned int regno;

View File

@ -78,7 +78,7 @@ static HARD_REG_SET current_live_regs;
static HARD_REG_SET pending_dead_regs;
static void update_live_status (rtx, rtx, void *);
static void update_live_status (rtx, const_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*,
@ -89,7 +89,7 @@ static rtx find_dead_or_set_registers (rtx, struct resources*,
It deadens any CLOBBERed registers and livens any SET registers. */
static void
update_live_status (rtx dest, rtx x, void *data ATTRIBUTE_UNUSED)
update_live_status (rtx dest, const_rtx x, void *data ATTRIBUTE_UNUSED)
{
int first_regno, last_regno;
int i;

View File

@ -1701,8 +1701,8 @@ extern int noop_move_p (const_rtx);
extern rtx find_last_value (rtx, rtx *, rtx, int);
extern int refers_to_regno_p (unsigned int, unsigned int, const_rtx, rtx *);
extern int reg_overlap_mentioned_p (const_rtx, const_rtx);
extern rtx set_of (rtx, rtx);
extern void note_stores (rtx, void (*) (rtx, rtx, void *), void *);
extern const_rtx set_of (const_rtx, const_rtx);
extern void note_stores (const_rtx, void (*) (rtx, const_rtx, void *), void *);
extern void note_uses (rtx *, void (*) (rtx *, void *), void *);
extern int dead_or_set_p (const_rtx, const_rtx);
extern int dead_or_set_regno_p (const_rtx, unsigned int);

View File

@ -52,12 +52,12 @@ struct subreg_info
};
/* Forward declarations */
static void set_of_1 (rtx, rtx, void *);
static void set_of_1 (rtx, const_rtx, void *);
static bool covers_regno_p (const_rtx, unsigned int);
static bool covers_regno_no_parallel_p (const_rtx, unsigned int);
static int rtx_referenced_p_1 (rtx *, void *);
static int computed_jump_p_1 (const_rtx);
static void parms_set (rtx, rtx, void *);
static void parms_set (rtx, const_rtx, void *);
static void subreg_get_info (unsigned int, enum machine_mode,
unsigned int, enum machine_mode,
struct subreg_info *);
@ -957,23 +957,23 @@ modified_in_p (rtx x, rtx insn)
/* Helper function for set_of. */
struct set_of_data
{
rtx found;
rtx pat;
const_rtx found;
const_rtx pat;
};
static void
set_of_1 (rtx x, rtx pat, void *data1)
set_of_1 (rtx x, const_rtx pat, void *data1)
{
struct set_of_data *data = (struct set_of_data *) (data1);
if (rtx_equal_p (x, data->pat)
|| (!MEM_P (x) && reg_overlap_mentioned_p (data->pat, x)))
data->found = pat;
struct set_of_data *const data = (struct set_of_data *) (data1);
if (rtx_equal_p (x, data->pat)
|| (!MEM_P (x) && reg_overlap_mentioned_p (data->pat, x)))
data->found = pat;
}
/* Give an INSN, return a SET or CLOBBER expression that does modify PAT
(either directly or via STRICT_LOW_PART and similar modifiers). */
rtx
set_of (rtx pat, rtx insn)
const_rtx
set_of (const_rtx pat, const_rtx insn)
{
struct set_of_data data;
data.found = NULL_RTX;
@ -1407,7 +1407,7 @@ reg_overlap_mentioned_p (const_rtx x, const_rtx in)
the SUBREG will be passed. */
void
note_stores (rtx x, void (*fun) (rtx, rtx, void *), void *data)
note_stores (const_rtx x, void (*fun) (rtx, const_rtx, void *), void *data)
{
int i;
@ -3262,7 +3262,7 @@ struct parms_set_data
/* Helper function for noticing stores to parameter registers. */
static void
parms_set (rtx x, rtx pat ATTRIBUTE_UNUSED, void *data)
parms_set (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
{
struct parms_set_data *d = data;
if (REG_P (x) && REGNO (x) < FIRST_PSEUDO_REGISTER

View File

@ -275,7 +275,7 @@ static int is_prisky (rtx, int, int);
static int is_exception_free (rtx, int, int);
static bool sets_likely_spilled (rtx);
static void sets_likely_spilled_1 (rtx, rtx, void *);
static void sets_likely_spilled_1 (rtx, const_rtx, void *);
static void add_branch_dependences (rtx, rtx);
static void compute_block_backward_dependences (int);
@ -2208,7 +2208,7 @@ sets_likely_spilled (rtx pat)
}
static void
sets_likely_spilled_1 (rtx x, rtx pat, void *data)
sets_likely_spilled_1 (rtx x, const_rtx pat, void *data)
{
bool *ret = (bool *) data;

View File

@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
Only useful before prologues have been emitted. */
static void
notice_stack_pointer_modification_1 (rtx x, rtx pat ATTRIBUTE_UNUSED,
notice_stack_pointer_modification_1 (rtx x, const_rtx pat ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED)
{
if (x == stack_pointer_rtx

View File

@ -333,10 +333,10 @@ static bool track_expr_p (tree);
static bool same_variable_part_p (rtx, tree, HOST_WIDE_INT);
static int count_uses (rtx *, void *);
static void count_uses_1 (rtx *, void *);
static void count_stores (rtx, rtx, void *);
static void count_stores (rtx, const_rtx, void *);
static int add_uses (rtx *, void *);
static void add_uses_1 (rtx *, void *);
static void add_stores (rtx, rtx, void *);
static void add_stores (rtx, const_rtx, void *);
static bool compute_bb_dataflow (basic_block);
static void vt_find_locations (void);
@ -1708,7 +1708,7 @@ count_uses_1 (rtx *x, void *insn)
INSN is instruction which the LOC is part of. */
static void
count_stores (rtx loc, rtx expr ATTRIBUTE_UNUSED, void *insn)
count_stores (rtx loc, const_rtx expr ATTRIBUTE_UNUSED, void *insn)
{
count_uses (&loc, insn);
}
@ -1757,7 +1757,7 @@ add_uses_1 (rtx *x, void *insn)
INSN is instruction which the LOC is part of. */
static void
add_stores (rtx loc, rtx expr, void *insn)
add_stores (rtx loc, const_rtx expr, void *insn)
{
if (REG_P (loc))
{