diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-10-27 19:27:41 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-10-27 19:27:41 +0000 |
commit | 848323170b9b9d7ce1a3ab19dcd945700f37b36a (patch) | |
tree | ea2baf03b5fb6cdb1cb4627f42bbf6bd5341560e /gcc/gcse.c | |
parent | 6ead9ba5a235459ceb3e3d4f6e963d38efd6c6a8 (diff) | |
download | gcc-848323170b9b9d7ce1a3ab19dcd945700f37b36a.zip gcc-848323170b9b9d7ce1a3ab19dcd945700f37b36a.tar.gz gcc-848323170b9b9d7ce1a3ab19dcd945700f37b36a.tar.bz2 |
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
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 46 |
1 files changed, 22 insertions, 24 deletions
@@ -521,7 +521,7 @@ static void free_gcse_mem PROTO ((void)); static void alloc_reg_set_mem PROTO ((int)); static void free_reg_set_mem PROTO ((void)); static void record_one_set PROTO ((int, rtx)); -static void record_set_info PROTO ((rtx, rtx)); +static void record_set_info PROTO ((rtx, rtx, void *)); static void compute_sets PROTO ((rtx)); static void hash_scan_insn PROTO ((rtx, int, int)); @@ -542,7 +542,7 @@ static unsigned int hash_set PROTO ((int, int)); static int expr_equiv_p PROTO ((rtx, rtx)); static void record_last_reg_set_info PROTO ((rtx, int)); static void record_last_mem_set_info PROTO ((rtx)); -static void record_last_set_info PROTO ((rtx, rtx)); +static void record_last_set_info PROTO ((rtx, rtx, void *)); static void compute_hash_table PROTO ((int)); static void alloc_set_hash_table PROTO ((int)); static void free_set_hash_table PROTO ((void)); @@ -621,7 +621,7 @@ static int can_disregard_other_sets PROTO ((struct reg_set **, rtx, int)); static int handle_avail_expr PROTO ((rtx, struct expr *)); static int classic_gcse PROTO ((void)); static int one_classic_gcse_pass PROTO ((int)); -static void invalidate_nonnull_info PROTO ((rtx, rtx)); +static void invalidate_nonnull_info PROTO ((rtx, rtx, void *)); static rtx process_insert_insn PROTO ((struct expr *)); static int pre_edge_insert PROTO ((struct edge_list *, struct expr **)); @@ -1130,16 +1130,17 @@ record_one_set (regno, insn) } } -/* For communication between next two functions (via note_stores). */ -static rtx record_set_insn; - /* Called from compute_sets via note_stores to handle one - SET or CLOBBER in an insn. */ + SET or CLOBBER in an insn. The DATA is really the instruction + in which the SET is occurring. */ static void -record_set_info (dest, setter) +record_set_info (dest, setter, data) rtx dest, setter ATTRIBUTE_UNUSED; + void *data; { + rtx record_set_insn = (rtx) data; + if (GET_CODE (dest) == SUBREG) dest = SUBREG_REG (dest); @@ -1164,10 +1165,7 @@ compute_sets (f) while (insn) { if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') - { - record_set_insn = insn; - note_stores (PATTERN (insn), record_set_info); - } + note_stores (PATTERN (insn), record_set_info, insn); insn = NEXT_INSN (insn); } } @@ -2069,16 +2067,17 @@ record_last_mem_set_info (insn) mem_set_in_block[BLOCK_NUM (insn)] = 1; } -/* Used for communicating between next two routines. */ -static rtx last_set_insn; - /* Called from compute_hash_table via note_stores to handle one - SET or CLOBBER in an insn. */ + SET or CLOBBER in an insn. DATA is really the instruction in which + the SET is taking place. */ static void -record_last_set_info (dest, setter) +record_last_set_info (dest, setter, data) rtx dest, setter ATTRIBUTE_UNUSED; + void *data; { + rtx last_set_insn = (rtx) data; + if (GET_CODE (dest) == SUBREG) dest = SUBREG_REG (dest); @@ -2183,8 +2182,7 @@ compute_hash_table (set_p) record_last_mem_set_info (insn); } - last_set_insn = insn; - note_stores (PATTERN (insn), record_last_set_info); + note_stores (PATTERN (insn), record_last_set_info, insn); } /* The next pass builds the hash table. */ @@ -4433,8 +4431,7 @@ insert_insn_end_bb (expr, bb, pre) set_block_num (insn, bb); if (GET_RTX_CLASS (GET_CODE (insn)) == 'i') add_label_notes (PATTERN (insn), new_insn); - record_set_insn = insn; - note_stores (PATTERN (insn), record_set_info); + note_stores (PATTERN (insn), record_set_info, insn); } } else @@ -4930,9 +4927,10 @@ static sbitmap *nonnull_killed; We ignore hard registers. */ static void -invalidate_nonnull_info (x, setter) +invalidate_nonnull_info (x, setter, data) rtx x; rtx setter ATTRIBUTE_UNUSED; + void *data ATTRIBUTE_UNUSED; { int offset, regno; @@ -5058,7 +5056,7 @@ delete_null_pointer_checks (f) set = single_set (insn); if (!set) { - note_stores (PATTERN (insn), invalidate_nonnull_info); + note_stores (PATTERN (insn), invalidate_nonnull_info, NULL); continue; } @@ -5072,7 +5070,7 @@ delete_null_pointer_checks (f) REGNO (XEXP (SET_SRC (set), 0))); /* Now invalidate stuff clobbered by this insn. */ - note_stores (PATTERN (insn), invalidate_nonnull_info); + note_stores (PATTERN (insn), invalidate_nonnull_info, NULL); /* And handle stores, we do these last since any sets in INSN can not kill the nonnull property if it is derived from a MEM |