From 848323170b9b9d7ce1a3ab19dcd945700f37b36a Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 27 Oct 1999 19:27:41 +0000 Subject: rtl.h (note_stores): Add additional paramter. * rtl.h (note_stores): Add additional paramter. * rtlanal.c (reg_set_p_1): Take additional paramter. (reg_set_last_1): Likewise. (reg_set_p): Adjust call to note_stores. (reg_set_last): Likewise. (note_stores): Pass data parameter to worker function. * alias.c (record_set): Take additional parameter. (init_alias_analysis): Pass it. * caller-save.c (mark_set_regs): Take additional parameter. (save_call_clobbered_regs): Pass NULL to note_stores. * combine.c (set_nonzero_bits_and_sign_copies): Take additional parameter. (record_dead_and_set_regs_1): Likewise. (reg_dead_at_p_1): Likewise. (combine_instructions): Adjust calls to note_stores. (try_combine): Likewise. (record_dead_insn): Remove. (record_dead_and_set_regs): Adjust calls to note_stores. (reg_dead_at_p): Likewise. * cse.c (invalidate_skipped_set): Take additional parameter. (cse_check_loop_start): Likewise. (cse_check_loop_start_value): Remove. (cse_set_around_loop): Adjust calls to note_stores. * flow.c (notice_stack_pointer_modification): Take additional parameter. Remove duplicate declaration. (record_volatile_insns): Adjust calls to note_stores. * gcse.c (record_set_info): Take additional parameter. (record_last_set_info): Likewise. (invalidate_nonnull_info): Likewise. (record_set_insn): Remove. (compute_sets): Adjust calls to note_stores. (last_set_insn): Remove. (compute_hash_table): Adjust calls to note_stores. (insert_insn_end_bb): Likewise. (delete_null_pointer_checks): Likewise. * global.c (mark_reg_store): Take additional parameter. (mark_reg_clobber): Likewise. (reg_becomes_live): Likewise. (global_conflicts): Adjust calls to note_stores. (build_insn_chain): Likewise. * integrate.c (note_modified_parmregs): Take additional parameter. (mark_stores): Likewise. Make it static. (save_for_inline_nocopy): Adjust calls to note_stores. (try_constants): Likewise. * integrate.h (mark_stores): Remove declaration. * jump.c (mark_modified_reg): Take additional parameter. (thread_jumps): Adjust calls to note_stores. * local-alloc.c (validate_equiv_mem_from_store): Take additional parameter. (no_equiv): Likewise. (reg_is_set): Likewise. (validate_equiv_mem): Adjust calls to note_stores. (update_equiv_regs): Likewise. (block_alloc): Likewise. * loop.c (note_set_pseudo_multiple_uses_retval): Remove. (note_addr_stored): Take additional parameter. (note_set_pseudo_multiple_uses): Likewise. (record_initial): Likewise. (prescan_loop): Adjust calls to note_stores. (strength_reduce): Likewise. (check_dbra_loop): Likewise. * regmove.c (flags_set_1): Take additional paramter. (mark_flags_life_zones): Adjust calls to note_stores. * reload1.c (mark_not_eliminable): Take additional parameter. (forget_old_reloads_1): Likewise. (reload_cse_invalidate_rtx): Likewise. (reload_cse_check_clobber): Likewise. (reload_combine_note_store): Likewise. (move2add_note_store): Likewise. (reload): Adjust calls to note_stores. (reload_as_needed): Likewise. (emit_reload_insns): Likewise. (reload_cse_regs_1): Likewise. (reload_cse_record_set): Adjust calls to reload_cse_invalidate_rtx. (reload_combine): Adjust calls to note_stores. * resource.c (update_live_status): Take additional paramter. (mark_target_live_regs): Adjust calls to note_stores. * stupid.c (find_clobbered_regs): Take additional parameter. (stupid_life_analysis): Adjust calls to note_stores. From-SVN: r30221 --- gcc/reload1.c | 68 +++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 30 deletions(-) (limited to 'gcc/reload1.c') diff --git a/gcc/reload1.c b/gcc/reload1.c index 0a3371f5..2909519 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -398,7 +398,7 @@ static void check_eliminable_occurrences PROTO((rtx)); static void elimination_effects PROTO((rtx, enum machine_mode)); static int eliminate_regs_in_insn PROTO((rtx, int)); static void update_eliminable_offsets PROTO((void)); -static void mark_not_eliminable PROTO((rtx, rtx)); +static void mark_not_eliminable PROTO((rtx, rtx, void *)); static void set_initial_elim_offsets PROTO((void)); static void verify_initial_elim_offsets PROTO((void)); static void set_initial_label_offsets PROTO((void)); @@ -413,7 +413,7 @@ static int hard_reg_use_compare PROTO((const PTR, const PTR)); static void count_pseudo PROTO((struct hard_reg_n_uses *, int)); static void order_regs_for_reload PROTO((struct insn_chain *)); static void reload_as_needed PROTO((int)); -static void forget_old_reloads_1 PROTO((rtx, rtx)); +static void forget_old_reloads_1 PROTO((rtx, rtx, void *)); static int reload_reg_class_lower PROTO((const PTR, const PTR)); static void mark_reload_reg_in_use PROTO((int, int, enum reload_type, enum machine_mode)); @@ -437,18 +437,18 @@ static void reload_cse_regs_1 PROTO((rtx)); static void reload_cse_invalidate_regno PROTO((int, enum machine_mode, int)); static int reload_cse_mem_conflict_p PROTO((rtx, rtx)); static void reload_cse_invalidate_mem PROTO((rtx)); -static void reload_cse_invalidate_rtx PROTO((rtx, rtx)); +static void reload_cse_invalidate_rtx PROTO((rtx, rtx, void *)); static int reload_cse_regno_equal_p PROTO((int, rtx, enum machine_mode)); static int reload_cse_noop_set_p PROTO((rtx, rtx)); static int reload_cse_simplify_set PROTO((rtx, rtx)); static int reload_cse_simplify_operands PROTO((rtx)); -static void reload_cse_check_clobber PROTO((rtx, rtx)); +static void reload_cse_check_clobber PROTO((rtx, rtx, void *)); static void reload_cse_record_set PROTO((rtx, rtx)); static void reload_combine PROTO((void)); static void reload_combine_note_use PROTO((rtx *, rtx)); -static void reload_combine_note_store PROTO((rtx, rtx)); +static void reload_combine_note_store PROTO((rtx, rtx, void *)); static void reload_cse_move2add PROTO((rtx)); -static void move2add_note_store PROTO((rtx, rtx)); +static void move2add_note_store PROTO((rtx, rtx, void *)); #ifdef AUTO_INC_DEC static void add_auto_inc_notes PROTO((rtx, rtx)); #endif @@ -805,7 +805,7 @@ reload (first, global, dumpfile) for (insn = first; insn && num_eliminable; insn = NEXT_INSN (insn)) if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN || GET_CODE (insn) == CALL_INSN) - note_stores (PATTERN (insn), mark_not_eliminable); + note_stores (PATTERN (insn), mark_not_eliminable, NULL); maybe_fix_stack_asms (); @@ -3631,9 +3631,10 @@ update_eliminable_offsets () the insns of the function. */ static void -mark_not_eliminable (dest, x) +mark_not_eliminable (dest, x, data) rtx dest; rtx x; + void *data ATTRIBUTE_UNUSED; { register unsigned int i; @@ -4424,13 +4425,13 @@ reload_as_needed (live_known) for this insn in order to be stored in (obeying register constraints). That is correct; such reload registers ARE still valid. */ - note_stores (oldpat, forget_old_reloads_1); + note_stores (oldpat, forget_old_reloads_1, NULL); /* There may have been CLOBBER insns placed after INSN. So scan between INSN and NEXT and use them to forget old reloads. */ for (x = NEXT_INSN (insn); x != old_next; x = NEXT_INSN (x)) if (GET_CODE (x) == INSN && GET_CODE (PATTERN (x)) == CLOBBER) - note_stores (PATTERN (x), forget_old_reloads_1); + note_stores (PATTERN (x), forget_old_reloads_1, NULL); #ifdef AUTO_INC_DEC /* Likewise for regs altered by auto-increment in this insn. @@ -4512,7 +4513,8 @@ reload_as_needed (live_known) reg_has_output_reload[REGNO (XEXP (in_reg, 0))] = 1; } else - forget_old_reloads_1 (XEXP (in_reg, 0), NULL_RTX); + forget_old_reloads_1 (XEXP (in_reg, 0), NULL_RTX, + NULL); } else if ((code == PRE_INC || code == PRE_DEC) && TEST_HARD_REG_BIT (reg_reloaded_valid, @@ -4542,7 +4544,7 @@ reload_as_needed (live_known) break; if (i == n_reloads) - forget_old_reloads_1 (XEXP (x, 0), NULL_RTX); + forget_old_reloads_1 (XEXP (x, 0), NULL_RTX, NULL); } #endif } @@ -4579,9 +4581,10 @@ reload_as_needed (live_known) or it may be a pseudo reg that was reloaded from. */ static void -forget_old_reloads_1 (x, ignored) +forget_old_reloads_1 (x, ignored, data) rtx x; rtx ignored ATTRIBUTE_UNUSED; + void *data ATTRIBUTE_UNUSED; { register int regno; int nr; @@ -7312,7 +7315,7 @@ emit_reload_insns (chain) clear any memory of reloaded copies of the pseudo reg. If this output reload comes from a spill reg, reg_has_output_reload will make this do nothing. */ - note_stores (pat, forget_old_reloads_1); + note_stores (pat, forget_old_reloads_1, NULL); if (reg_mentioned_p (rld[j].reg_rtx, pat)) { @@ -8680,9 +8683,10 @@ reload_cse_invalidate_mem (mem_rtx) note_stores; it is ignored. */ static void -reload_cse_invalidate_rtx (dest, ignore) +reload_cse_invalidate_rtx (dest, ignore, data) rtx dest; rtx ignore ATTRIBUTE_UNUSED; + void *data ATTRIBUTE_UNUSED; { while (GET_CODE (dest) == STRICT_LOW_PART || GET_CODE (dest) == SIGN_EXTRACT @@ -8895,11 +8899,11 @@ reload_cse_regs_1 (first) if (GET_CODE (x) == SET) reload_cse_record_set (x, body); else - note_stores (x, reload_cse_invalidate_rtx); + note_stores (x, reload_cse_invalidate_rtx, NULL); } } else - note_stores (body, reload_cse_invalidate_rtx); + note_stores (body, reload_cse_invalidate_rtx, NULL); #ifdef AUTO_INC_DEC /* Clobber any registers which appear in REG_INC notes. We @@ -8910,7 +8914,7 @@ reload_cse_regs_1 (first) for (x = REG_NOTES (insn); x; x = XEXP (x, 1)) if (REG_NOTE_KIND (x) == REG_INC) - reload_cse_invalidate_rtx (XEXP (x, 0), NULL_RTX); + reload_cse_invalidate_rtx (XEXP (x, 0), NULL_RTX, NULL); } #endif @@ -8922,7 +8926,8 @@ reload_cse_regs_1 (first) for (x = CALL_INSN_FUNCTION_USAGE (insn); x; x = XEXP (x, 1)) if (GET_CODE (XEXP (x, 0)) == CLOBBER) - reload_cse_invalidate_rtx (XEXP (XEXP (x, 0), 0), NULL_RTX); + reload_cse_invalidate_rtx (XEXP (XEXP (x, 0), 0), NULL_RTX, + NULL); } } @@ -9367,9 +9372,10 @@ static rtx reload_cse_check_src; second argument, which is passed by note_stores, is ignored. */ static void -reload_cse_check_clobber (dest, ignore) +reload_cse_check_clobber (dest, ignore, data) rtx dest; rtx ignore ATTRIBUTE_UNUSED; + void *data ATTRIBUTE_UNUSED; { if (reg_overlap_mentioned_p (dest, reload_cse_check_src)) reload_cse_check_clobbered = 1; @@ -9405,8 +9411,8 @@ reload_cse_record_set (set, body) x = XEXP (x, 0); if (push_operand (x, GET_MODE (x))) { - reload_cse_invalidate_rtx (stack_pointer_rtx, NULL_RTX); - reload_cse_invalidate_rtx (dest, NULL_RTX); + reload_cse_invalidate_rtx (stack_pointer_rtx, NULL_RTX, NULL); + reload_cse_invalidate_rtx (dest, NULL_RTX, NULL); return; } @@ -9418,7 +9424,7 @@ reload_cse_record_set (set, body) || side_effects_p (src) || side_effects_p (dest)) { - reload_cse_invalidate_rtx (dest, NULL_RTX); + reload_cse_invalidate_rtx (dest, NULL_RTX, NULL); return; } @@ -9428,7 +9434,7 @@ reload_cse_record_set (set, body) if (reg_mentioned_p (cc0_rtx, src) || reg_mentioned_p (cc0_rtx, dest)) { - reload_cse_invalidate_rtx (dest, NULL_RTX); + reload_cse_invalidate_rtx (dest, NULL_RTX, NULL); return; } #endif @@ -9449,10 +9455,10 @@ reload_cse_record_set (set, body) reload_cse_check_clobbered = 0; reload_cse_check_src = src; - note_stores (x, reload_cse_check_clobber); + note_stores (x, reload_cse_check_clobber, NULL); if (reload_cse_check_clobbered) { - reload_cse_invalidate_rtx (dest, NULL_RTX); + reload_cse_invalidate_rtx (dest, NULL_RTX, NULL); return; } } @@ -9767,7 +9773,7 @@ reload_combine () } } } - note_stores (PATTERN (insn), reload_combine_note_store); + note_stores (PATTERN (insn), reload_combine_note_store, NULL); if (GET_CODE (insn) == CALL_INSN) { rtx link; @@ -9830,8 +9836,9 @@ reload_combine () update reg_state[regno].store_ruid and reg_state[regno].use_index accordingly. Called via note_stores from reload_combine. */ static void -reload_combine_note_store (dst, set) +reload_combine_note_store (dst, set, data) rtx dst, set; + void *data ATTRIBUTE_UNUSED; { int regno = 0; int i; @@ -10157,7 +10164,7 @@ reload_cse_move2add (first) } } } - note_stores (PATTERN (insn), move2add_note_store); + note_stores (PATTERN (insn), move2add_note_store, NULL); /* If this is a CALL_INSN, all call used registers are stored with unknown values. */ if (GET_CODE (insn) == CALL_INSN) @@ -10178,8 +10185,9 @@ reload_cse_move2add (first) Update reg_set_luid, reg_offset and reg_base_reg accordingly. Called from reload_cse_move2add via note_stores. */ static void -move2add_note_store (dst, set) +move2add_note_store (dst, set, data) rtx dst, set; + void *data ATTRIBUTE_UNUSED; { int regno = 0; int i; -- cgit v1.1