blob: 84805049177d68acfa8fa3287498cd06d44c95ad [file] [log] [blame]
2007-06-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* emit-rtl.c (set_insn_deleted): Changed NOTE_LINE_NUMBER to
NOTE_KIND.
(emit_note_after): Fixed merge glitch.
* combine.c (try_combine): Changed NOTE_LINE_NUMBER to
NOTE_KIND.
* reg-stack.c (convert_regs_1): Fixed merge glitch.
* config/rs6000/rs6000.c (no_global_regs_above): Fixed merge typo.
(rs6000_emit_prologue): Fixed merge glitch.
2007-06-06 Kenneth Zadeck <zadeck@naturalbridge.com>
* regrename.c (do_replace): Removed ifdefed out code.
* fwprop.c: Fixed copyright.
* testsuite/Changelog.dataflow: Merged entry into
testsuite/Changelog. Deleted file.
* global.c: Fixed comments.
* recog.c (confirm_change_group): Fixed comments.
(peephole2_optimize): Removed ifdefed out code.
* gcse.c (try_replace_reg): Removed redundant changing and
rescanning of notes.
* rtl.h (SET_REGNO): Replaced brackets.
* stack-ptr-mod.c: Changed copyright years.
2007-06-06 Seongbae Park <seongbae.park@gmail.com>
* config/ia64/ia64.c (ia64_frame_info): Restored the comment
for the structure above. Removed left-over dead code from debugging.
(ia64_compute_frame_size): Comment cleanup.
(ia64_expand_prologue): Style fix. Debugging information header.
(ia64_init_expanders): Added a comment.
* config/ia64/ia64.h (ia64_init_expanders): Declaration moved
to ia64-protos.h
* config/ia64/ia64-protos.h (ia64_init_expanders): Declaration
moved from ia64.h
2007-06-06 Kenneth Zadeck <zadeck@naturalbridge.com>
* doc/rtl.text: Fixed spelling.
* dse.c (store_info, read_info, insn_info, bb_info, group_info,
deferred_change): Fixed formatting.
(step0): Renamed to dse_step0.
(step1): Renamed to dse_step1.
(step2_init): Renamed to dse_step2_init.
(step2_nospill): Renamed to dse_step2_nospill.
(step2_spill): Renamed to dse_step2_spill.
(step3_scan): Renamed to dse_step3_scan.
(step3_exit_block_scan): Renamed to dse_step3_exit_block_scan.
(step3): Renamed to dse_step3.
(step4_nospill): Renamed to dse_step4_nospill.
(step4_spill): Renamed to dse_step4_spill.
(step4): Renamed to dse_step4.
(step5_nospill): Renamed to dse_step5_nospill.
(step5_spill): Renamed to dse_step5_spill.
(step6): Renamed to dse_step6.
(rest_of_handle_dse): Updated names of functions.
* emit_rtl.c (verify_rtx_sharing, copy_rtx_if_shared_1,
copy_insn_1): Now calls shared_const_p.
* cselib.c (expand_loc, cselib_expand_value_rtx): Fixed comments.
(cselib_expand_value_rtx): Now calls shared_const_p.
* rtl.c (shared_const_p): New function.
(copy_rtx): Now calls shared_const_p.
* rtl.h (shared_const_p): New function.
2007-06-06 Kenneth Zadeck <zadeck@naturalbridge.com>
* combine.c (find_single_use_1): Fixed comment and changed 0 to NULL.
(find_single_use): Removed comment.
(delete_noop_move): Removed unnecessary continue and removed
nnoops counter. Function now does not return anything.
2007-05-31 Kenneth Zadeck <zadeck@naturalbridge.com>
* bitmap.c (bitmap_elt_copy): Fixed comment.
* cfganal.c (inverted_post_order_compute): Fixed comment and
formatting of test.
* basic_block.h: Removed include rtl.h.
(enum bb_flags): Renumbered.
(FOR_EACH_BB_IN_REGION, FOR_EACH_BB_REVERSE_IN_REGION): Removed.
(FOR_BB_INSNS_SAFE, FOR_BB_INSNS_REVERSE_SAFE): Fixed formatting.
2007-05-30 Kenneth Zadeck <zadeck@naturalbridge.com>
* auto-inc-dec.c: Updated copyright date.
(enum form, set_inc_state, dump_inc_insn, move_dead_notes,
insert_move_insn_before, attempt_change, try_merge, find_address,
find_mem): Reformatted.
(reverse_inc, find_address): Fixed spelling.
(attempt_change, try_merge): Add default case.
* basic-block.h: Updated copyright date.
* bitmap.c: Updated copyright date.
* bitmap.h: Updated copyright date.
* cfganal.c: Updated copyright date.
* cfg.c: Updated copyright date.
* cfghooks.h: Updated copyright date.
* cfglayout.c: Updated copyright date.
* cfgloop.c: Updated copyright date.
* cfgloop.h: Updated copyright date.
* cfgrtl.c: Updated copyright date.
* combine.c: Updated copyright date.
* combine-stack-adj.c: Updated copyright date.
* config/arc/arc.c: Updated copyright date.
* config/arm/arm.c: (use_return_insn,
arm_compute_save_reg0_reg12_mask, arm_get_frame_offsets,
arm_save_coproc_regs): Fixed formatting.
* config/bfin/bfin.c: Updated copyright date.
* config/c4x/c4x.c: Updated copyright date.
* config/c4x/c4x.h: Updated copyright date.
* config/cris/cris.c: Updated copyright date.
* config/crx/crx.c: Updated copyright date.
* config/crx/crx.h: Updated copyright date.
* config/darwin.c: Updated copyright date.
* config/frv/frv.c: Updated copyright date.
* config/h8300/h8300.c: Updated copyright date.
* config/h8300/h8300.md: Updated copyright date.
* config/ia64/ia64.h: Updated copyright date.
* config/iq2000/iq2000.c: Updated copyright date.
* config/iq2000/iq2000.h: Updated copyright date.
* config/m32c/m32c.c: Updated copyright date.
* config/m68hc11/m68hc11.c: Updated copyright date.
* config/m68k/m68k.c: Updated copyright date.
* config/mips/mips.c: Updated copyright date.
* config/mips/mips.md: Updated copyright date.
* config/mmix/mmix.c: Updated copyright date.
* config/mn10300/mn10300.c: Updated copyright date.
* config/mt/mt.c: Updated copyright date.
(mt_print_operand_simple_address, mt_print_operand): Fixed formatting.
* config/mt/mt.h: Updated copyright date and fixed formatting.
* config/pa/pa.c: Updated copyright date.
* config/pa/pa.h: Updated copyright date.
* config/pdp11/pdp11.c: Updated copyright date.
* config/pdp11/pdp11.h: Updated copyright date.
* config/rs6000/predicates.md: Updated copyright date.
* config/s390/s390.c: Updated copyright date.
* config/score/score-mdaux.c: Updated copyright date.
* config/sh/sh.c: Updated copyright date.
* config/sh/sh.md: Updated copyright date.
* config/sparc/sparc.c: Updated copyright date.
* config/stormy16/stormy16.c: Updated copyright date.
* config/v850/v850.c: Updated copyright date.
* config/vax/vax.c: Updated copyright date.
* cselib.c: Updated copyright date.
(expand_loc): Fixed formatting.
* cselib.h: Updated copyright date.
* dbgcnt.c: Updated copyright date.
* dbgcnt.def: Updated copyright date.
* dbgcnt.h: Updated copyright date.
* dce.c: Updated copyright date.
(fast_dce): Fixed formatting.
* dce.h: Updated copyright date.
* ddg.c: Updated copyright date.
* ddg.h: Updated copyright date.
* df-core.c: Updated copyright date.
* df.h: Updated copyright date and fixed formatting.
* doc/cfg.texi: Updated copyright date.
* doc/rtl.texi: Updated copyright date.
* dominance.c: Updated copyright date.
* function.h: Updated copyright date.
* fwprop.c: Updated copyright date.
* global.c: Updated copyright date.
* integrate.c: Updated copyright date.
* local-alloc.c: Updated copyright date.
* loop-init.c: Updated copyright date.
* loop-invariant.c: Updated copyright date.
* loop-iv.c: Updated copyright date.
* optabs.h: Updated copyright date.
* output.h: Updated copyright date.
* postreload.c: Updated copyright date.
* postreload-gcse.c: Updated copyright date.
* recog.h: Updated copyright date.
* regmove.c: Updated copyright date.
* reg-notes.def: Updated copyright date.
* regrename.c: Updated copyright date.
* reg-stack.c: Updated copyright date.
* reload.c: Updated copyright date.
* reorg.c: Updated copyright date.
* resource.c: Updated copyright date.
* resource.h: Updated copyright date.
* rtl-factoring.c: Updated copyright date.
* sbitmap.c: Updated copyright date.
* sbitmap.h: Updated copyright date.
* sched-deps.c: Updated copyright date.
* sched-ebb.c: Updated copyright date.
* sched-int.h: Updated copyright date.
* sched-rgn.c: Updated copyright date.
* sched-vis.c: Updated copyright date.
* see.c: Updated copyright date.
(see_handle_relevant_uses): Fixed formatting.
* stack-ptr-mod.c: Updated copyright date.
* struct-equiv.c: Updated copyright date.
* tracer.c: Updated copyright date.
* web.c: Updated copyright date.
2007-05-30 Kenneth Zadeck <zadeck@naturalbridge.com>
* auto-inc-dec.c (mem_insn.mem_pat): Renamed mem_loc.
(attempt_change): Fixed comments and renamed new_addr_pat to new_addr.
(try_merge, attempt_change, find_address, find_mem): Renamed
mem_pat to mem_loc.
2007-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-core.c (df_hybrid_search_forward, df_hybrid_search_backward
df_iterative_dataflow): Removed.
* df.h (df_iterative_dataflow): Removed.
2007-05-27 Kenneth Zadeck <zadeck@naturalbridge.com>
* dse.c (replace_inc_dec, delete_dead_store_insn, scan_insn,
dse_record_singleton_alias_set, dse_confluence_0,
dse_confluence_n, step4, step5_nospill, step5_spill,
rest_of_handle_dse, pass_rtl_dse1, pass_rtl_dse2): Removed code
to allow dse to run on trunk in front of flow.c
(problem): Removed.
2007-05-26 Kaz Kojima <kkojima@gcc.gnu.org>
* bt-load.c: Include recog.h.
(move_btr_def): Use validate_replace_rtx instead of replace_rtx.
2007-05-25 Steven Bosscher <steven@gcc.gnu.org>
* emit-rtl.c (try_split): Remove unnecessary setting/resetting
of the USED flags of TRIAL.
2007-05-25 Kenneth Zadeck <zadeck@naturalbridge.com>
* dse.c (insn_info.stack_read, group_info.frame_related): New
variable.
(get_group_info): Initialize frame_related.
(scan_insn, scan_reads_nospill): Remove frame_related stores from
consideration for const functions.
(step1, step2_init, step3_exit_block_scan): Use frame_related field.
(step3_scan, step5_nospill): Change parameters to scan_reads_nospill.
2007-05-25 Ian Lance Taylor <iant@google.com>
* reload1.c (mark_home_live_1): New static function, broken out of
mark_home_live.
(mark_home_live): Call mark_home_live_1.
(scan_paradoxical_subregs): Call mark_home_live_1.
2007-05-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/spu/spu.md (smulsi3_highpart): Unshare the rtl chain.
(umulsi3_highpart): Likewise.
2007-05-24 Eric Christopher <echristo@gmail.com>
* config/mips/mips.c (mips_save_reg_p): Use df_regs_ever_live_p.
(mips_output_mi_thunk): Use SET_REGNO.
2007-05-23 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_expand_prologue): Fix typo.
2007-05-23 Paolo Bonzini <bonzini@gnu.org>
* emit-rtl.c [!HAVE_blockage]: Provide a gen_blockage routine here.
* rtl.h (gen_blockage): Add prototype.
* cse.c (last_bb_reg_used_in, reg_used_in_multiple_bb): Remove.
(mark_reg_use_bb): Remove.
(cse_main): Remove the initialization of reg_used_in_multiple_bb
and last_bb_reg_used_in, and the insn walk that calls mark_reg_use_bb.
(cse_ebb_live_in, cse_ebb_live_out): New.
(cse_extended_basic_block): Set them.
(make_regs_eqv): Use them.
2007-05-23 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_get_regular_block_artificial_uses): Set the
HARD_FRAME_POINTER not the FRAME_POINTER after reload. Set both
the HARD_FRAME_POINTER and the FRAME_POINTER before reload.
* dse.c (const_or_frame_p): Removed unnecessary test.
* config/s390/s390.c (s390_emit_prologue): Removed REG_MAYBE_DEAD
notes.
* config/spu/spu.c (frame_emit_add_imm, spu_expand_prologue): Ditto.
* config/i386/i386.c (ix86_expand_prologue): Ditto.
* config/sh/sh.c (sh_expand_prologue): Ditto.
* config/sh/sh.md (define_expand): Ditto.
* config/iq2000/iq2000.c (iq2000_expand_prologue): Ditto.
* config/mn10300/mn10300.c (expand_prologue): Ditto.
* config/ia64/ia64.c (spill_restore_mem, ia64_expand_prologue): Ditto.
* config/m68k/m68k.c (m68k_expand_prologue): Ditto.
* config/rs6000/rs6000.c (rs6000_maybe_dead): Removed.
(rs6000_emit_load_toc_table, rs6000_emit_prologue): Removed calls
to rs6000_maybe_dead.
* config/bfin/bfin.c (expand_interrupt_handler_prologue,
bfin_load_pic_reg): Removed REG_MAYBE_DEAD notes.
* reg-notes.def (MAYBE_DEAD): Removed.
* dce.c (deletable_insn_p): Removed test of RTX_FRAME_RELATED_P.
2007-05-21 Kenneth Zadeck <zadeck@naturalbridge.com>
* dbgcnt.def: Fixed comment.
* df-scan.c (df_get_regular_block_artificial_uses): Added frame
pointer after reload if frame_pointer_needed.
* df.h (df_simulate_defs, df_simulate_uses): Made public.
* df-problems.c (df_simulate_defs, df_simulate_uses): Made public.
* dce.c (deletable_insn_p): Only allow frame-related insns to be
deleted if there is a REG_MAYBE_DEAD note.
(dce_process_block): Now uses df_simulate_defs and
df_simulate_uses.
2007-05-20 Kenneth Zadeck <zadeck@naturalbridge.com>
* cfg.c (dump_bb_info): Fixed dump formatting problem.
* dse.c (const_or_frame_p): New function.
(canon_address): Fixed dump info and now callse const_or_frame_p
rather than rtx_varies_p. Also do simplification inside cselib.
(record_store): Fixed dump info.
* cselib.c (expand_loc): Fixed dump info.
(cselib_expand_value_rtx): Fixed dump info and now call
simplify_rtx on results of expansion.
2007-05-17 Kenneth Zadeck <zadeck@naturalbridge.com>
* ifcvt.c (dead_or_predictable): Replaced insn dfa with new df
routines.
* recog.c (peephole2_optimize): Replaced
df_lr_simulate_artificial_refs_at_end and df_lr_simulate_one_insn
with df_simulate_artificial_refs_at_end and
df_simulate_one_insn_backwards.
* rtl-factoring.c (collect_pattern_seqs, clear_regs_live_in_seq):
Ditto.
* df.h (df_lr_simulate_artificial_refs_at_end,
df_lr_simulate_one_insn): Removed.
(df_simulate_find_defs, df_simulate_artificial_refs_at_top,
df_simulate_one_insn_forwards, df_simulate_artificial_refs_at_end,
df_simulate_one_insn_backwards): Added.
* df-problems.c (df_lr_bb_local_compute): Removed unnecessary
tests.
(df_lr_simulate_artificial_refs_at_end, df_lr_simulate_one_insn):
Removed.
(df_simulate_find_defs, df_simulate_defs, df_simulate_uses,
df_simulate_fixup_sets, df_simulate_artificial_refs_at_top,
df_simulate_one_insn_forwards, df_simulate_artificial_refs_at_end,
df_simulate_one_insn_backwards): Added.
2007-05-16 Seongbae Park <seongbae.park@gmail.com>
* ifcvt.c (dead_or_predicable): Update test_live as well as test_set.
(if_convert): New parameter RECOMPUTE_DOMINANCE.
(rest_of_handle_if_conversion, rest_of_handle_if_after_combine,
rest_of_handle_if_after_reload): New parameter to if_convert.
2007-05-16 Kenneth Zadeck <zadeck@naturalbridge.com>
* regstat.c (regstat_init_n_sets_and_refs, regstat_compute_ri,
regstat_compute_calls_crossed): Added time variable TV_REG_STATS.
* timevar.def (TV_REG_STATS): Added.
(TV_DF_RI): Deleted.
* df-problems.c (df_print_bb_index): Added identifer for eh blocks.
* dce.c (deletable_insn_p): Added code to not delete
RTX_FRAME_RELATED_P insns.
(dce_process_block): Removed insns_deleted and added code to reset
live set before confluence function.
(rest_of_handle_fast_dce): Added code to turn off df's version of dce if
flag_dce is not set and added DF_NO_INSN_RESCAN to flags that are cleared.
2007-05-10 Roman Zippel <zippel@linux-m68k.org>
* config/m68k/m68k.c: include df.h.
(m68k_output_mi_thunk): use SET_REGNO.
2007-05-09 Kaz Kojima <kkojima@gcc.gnu.org>
* df-core.c (df_get_bb_dirty): Return false if df_live is null.
2007-05-09 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (r0_life_regions): New variable.
(find_r0_life_regions): New static function.
(sh_md_init_global): Call find_r0_life_regions when
reload_completed isn't set.
(R0_MAX_LIVE_LENGTH): Remove.
(high__pressure): Return 1 if r0_life_regions is over
the given threshold.
2007-05-08 Kenneth Zadeck <zadeck@naturalbridge.com>
* regrename.c (regrename_optimize): Renamed df_ri_add_problem to
df_note_add_problem.
* auto-inc-dec.c (rest_of_handle_auto_inc_dec): Ditto.
* sched_ebb.c (schedule_ebbs): Renamed df_ri_add_problem to
df_note_add_problem. Added call to regstat_compute_calls_crossed
and regstat_free_calls_crossed and deleted call to
allocate_reg_life_data.
* regstat.c (regstat_init_n_sets_and_refs,
regstat_free_n_sets_and_refs, regstat_bb_compute_ri,
regstat_compute_ri, regstat_free_ri,
regstat_bb_compute_calls_crossed, regstat_compute_calls_crossed,
regstat_free_calls_crossed): New functions.
* final.c (rest_of_handle_final): Removed call to free_reg_info.
* cfg.c (dump_reg_info): Many changes to accomodate new
implementation of REG_BASIC_BLOCK, REG_N_SETS, REG_N_DEATHS,
REG_N_CALLS_CROSSED.
* toplev.c (finalize): Removed call to free_reg_info.
* regs.h (REG_BASIC_BLOCK, REG_N_SETS, REG_N_REFS, REG_N_DEATHS,
REG_N_CALLS_CROSSED, REG_FREQ, REG_N_THROWING_CALLS_CROSSED,
REG_LIVE_LENGTH, REG_BASIC_BLOCK): Changed implementation.
(allocate_reg_life_data, allocate_reg_info, clear_reg_info_regno):
Removed.
* mode-switching.c (optimize_mode_switching): Removed call to
df_ri_add_problem.
* modulo-sched.c (sms_schedule): Renamed df_ri_add_problem to
df_note_add_problem. Added call to regstat_compute_calls_crossed
and regstat_free_calls_crossed
(rest_of_handle_sms): Deleted call to allocate_reg_info.
* global.c (compute_regsets): Moved all dataflow to local_alloc.
(rest_of_handle_global_alloc): Call regstat_free_n_sets_and_refs
and regstat_free_ri.
* ifcvt.c (dead_or_predicable, if_convert): Removed calls to
allocate_reg_info.
* timevar.def (TV_DF_NOTE): New timevar.
* regmove.c (copy_src_to_dest, regmove_optimize, fixup_match_1):
Changed calls to REG_N_SETS that changed the value to
INC_REG_N_SETS.
(regmove_optimize): Moved calls that compute df and register info
to after early out for flag_non_call_exceptions. Added calls to
regstat_init_n_sets_and_refs, regstat_compute_ri,
regstat_free_n_sets_and_refs and regstat_free_ri.
* local_alloc (local_alloc, equiv_init_movable_p): Added
NUM_FIXED_BLOCKS to tests for REG_BASIC_BLOCK.
(update_equiv_regs): Added code to update bitvectors when certain
local allocations are done. Changed REG_N_SETS to
DF_REG_DEF_COUNT. Added NUM_FIXED_BLOCKS to tests for
REG_BASIC_BLOCK.
(rest_of_handle_local_alloc): Moved computation of UREC from
global to here.
* function.c (regno_clobbered_at_setjmp): Added to test to see if
regno was valid. Moved function size test higher in call
heirarchy.
(setjmp_args_warning): Added tests to early out of check if
function is small or there are no setjmps.
* df.h (DF_RI, df_ri, DF_RI_LIFE, DF_RI_SETJMP, df_ri_add_problem,
df_ri_get_setjmp_crosses): Deleted.
(DF_NOTE, df_note, df_note_add_problem): Added.
* gcse (gcse_main): Removed computation of RI information and
removed calls to allocate_reg_info.
* init-regs.c (initialize_uninitialized_regs): Removed call to
allocate_reg_life_data.
* regclass.c (reg_info_data, reg_info_head, reg_pref_buffer,
allocate_reg_life_data, allocate_reg_info, clear_reg_info_regno):
Deleted.
(scan_one_insn): Changed some calls to REG_N_SETS and REG_N_REFS
to INC_REG_N_SETS and INC_REG_N_REFS.
(regclass): Allocate register information locally.
(free_reg_info): Changed the structures freed.
(reg_scan): Removed call to allocate_reg_info and changed call to
REG_N_SETS to DF_REG_DEF_COUNT.
* combine (try_combine, remove_death, distribute_notes): Removed
computation of REG_N_DEATHS. Changed some references to
REG_N_SETS to INC_REG_N_SETS.
(rest_of_handle_combine): Replaced call to df_ri_add_problem with
call to df_note_add_problem, and added call to
regstat_init_n_sets_and_refs and regstat_free_n_sets_and_refs.
* bb-reorder (rest_of_handle_partition_blocks): Removed call to
allocate_reg_life_data.
* df-problems.c (reg_n_info, df_ri_problem_p, df_ri_problem_data,
df_ri_alloc, df_ri_start_dump, df_ri_get_setjmp_crosses): Removed.
(print_note): Renamed df_print_note.
(df_kill_notes): Added parameters to save notes rather than just
let them die and remake them.
(df_set_note): New function.
(df_set_unused_notes_for_mw, df_set_dead_notes_for_mw,
df_create_unused_note, df_ri_bb_compute, df_ri_compute,
df_ri_free): Removed ri information computations.
(df_ri_bb_compute): Renamed to df_note_bb_compute.
(df_ri_compute): Renamed to df_note_compute.
(df_ri_free): Renamed to df_note_free.
(problem_RI): Renamed to problem_NOTE
(df_ri_add_problem): Renamed to df_note_add_problem.
* (reg-stack.c): Changed call to df_ri_add_problem to
df_note_add_problem.
* combine-stack-adj.c (rest_of_handle_stack_adjustments): Ditto.
* (Makefile.in): Added regstat.o.
* sched-rgn.c (schedule_insns): Changed call to df_ri_add_problem to
df_note_add_problem. Added calls to regstat_compute_calls_crossed
and regstat_free_calls_crossed.
* basic_block.h (REG_BLOCK_UNKNOWN, REG_BLOCK_GLOBAL,
REG_BASIC_BLOCK): Moved to regs.h.
* config/sparc/sparc.c (sparc_check_64): Changed REG_N_SETS to
DF_REG_DEF_COUNT.
* config/sh/sh.c (flow_dependent_p_1): Ditto.
(sh_md_init): Removed useless attempt to measure pressure on R0.
* config/m68k/m68k.c (m68k_output_mi_thunk): Removed call to
allocate_reg_info.
* reload1.c (delete_output_reload): Added NUM_FIXED_BLOCKS to
tests for REG_BASIC_BLOCK.
2007-05-07 Seongbae Park <seongbae.park@gmail.com>
* dse.c (add_wild_read): Do not remove read_info_t
that has non-zero alias_set.
(canon_address): Remove unused parameter for_read and bb_info.
Remove the unused code path, and update the dump message.
(record_store): Accomodate canon_address signature change.
(check_mem_read_rtx): Don't bail out early for wild_read.
(check_mem_read_rtx): Accomodate canon_address signature change.
(scan_insn): Move call insn handling after note_uses.
2007-05-05 Ramana Radhakrishnan <ramana.r@gmail.com>
Serge Belyshev <belyshev@depni.sinp.msu.ru>
Kenneth Zadeck <zadeck@naturalbridge.com>
* combine.c (recog_for_combine): Keep unused notes from being
generated for scratch registers.
* config/alpha/alpha.c: Add include for df.h.
2007-05-01 Kenneth Zadeck <zadeck@naturalbridge.com>
Do not delete regnotes when recreating them.
* df-problems.c (df_kill_notes): Store notes into new parameters
rather than killing them.
(df_set_note): New function.
(df_set_unused_notes_for_mw, df_set_dead_notes_for_mw,
df_create_unused_note, df_ri_bb_compute): Call df_set_note to
create new notes.
2007-04-30 Seongbae Park <seongbae.park@gmail.com>
* df-scan.c (df_reorganize_refs_by_reg_by_insn):
Scan artificial defs and uses as well.
* passes.c (init_optimization_passes):
Move pass_stack_ptr_mod from after pass_inc_dec.
2007-04-29 Steven Bosscher <steven@gcc.gnu.org>
Small cleanups without any semantics changes:
* df-scan.c (df_ref_record): Fix small style typo.
* df-core.c (df_hybrid_search_forward): Cleanup redundant loads.
(df_hybrid_search_backward): Likewise.
(df_worklist_dataflow): Check DIR against DF_NONE instead of 0.
Small speedups:
* haifa-sched.c (move_block_after_check): Mark df solutions dirty
here, instead of...
(move_succs): ...here.
* df-core.c (df_analyze): Only verify POSTORDER_INVERTED if
checking is enabled.
Fix Java bootstrap on ia64
* emit-rtl.c (try_split): Unshare RTL sequences produced by splitters.
2007-04-27 Kenneth Zadeck <zadeck@naturalbridge.com>
* timevar.def (TV_DF_UR): Removed.
* df-scan.c (df_scan_alloc): Change pool size.
* df-core.c (df_finish_pass, rest_of_handle_df_initialize,
df_get_bb_dirty, df_verify): Merged df_ur and df_live problems
into df_live.
* global.c (compute_regsets, rest_of_handle_global_alloc): Ditto.
* df.h (DF_UR, DF_UR_BB_INFO, DF_UR_IN, DF_UR_OUT, df_ur,
df_ur_get_bb_info): Removed.
(df_ur_bb_info): Merged df_ur and df_live problems
into df_live.
* init-regs.c (initialize_uninitialized_regs): Changed DF_UR_IN to
DF_LIVE_IN.
* df_problems.c (df_ur_problem_data): Renamed to
df_live_problem_data.
(df_ur_set_bb_info): Renamed to df_live_set_bb_info.
(df_ur_free_bb_info): Renamed to df_live_free_bb_info.
(df_ur_alloc): Renamed to df_live_alloc.
(df_ur_reset): Renamed to df_live_reset.
(df_ur_bb_local_compute): Renamed to df_live_bb_local_compute.
(df_ur_local_compute): Renamed to df_live_local_compute.
(df_ur_init): Renamed to df_live_init.
(df_ur_confluence_n): Renamed to df_live_confluence_n.
(df_ur_transfer_function): Renamed to df_live_transfer_function.
(df_ur_local_finalize): Removed.
(df_ur_free): Renamed to df_live_free.
(df_ur_top_dump): Renamed to df_live_top_dump.
(df_ur_bottom_dump): Renamed to df_live_bottom_dump.
(df_ur_verify_solution_start): Renamed to
df_live_verify_solution_start.
(df_ur_verify_solution_end): Renamed to
df_live_verify_solution_end.
(problem_UR): Renamed to problem_LIVE.
(df_ur_add_problem): Renamed to df_live_add_problem.
(df_ur_verify_transfer_functions): Renamed to
df_live_verify_transfer_functions.
(df_live_set_bb_info, df_live_free_bb_info, df_live_alloc,
df_live_free, df_live_top_dump, df_live_bottom_dump,
df_live_add_problem): Deleted.
(df_chain_fully_remove_problem): Changed pool alloc block size.
* dce.c (dce_marked_bitmap_obstack): Removed.
(marked_insn_p, mark_insn, init_dce, end_ud_dce, fini_dce,
fast_dce): Changed marked to be sbitmap rather than bitmap.
* alloc_pool.c (create_alloc_pool, pool_alloc, pool_free): Split
free_list into virgin_free_list and returned_free_list.
* alloc_pool.h (free_list): Split into virgin_free_list and
returned_free_list.
(virgin_elts_remaining): New variable.
2007-04-26 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-core.c (df_remove_problem): Allow df_ur and df_live
problems to be removed.
* global.c (compute_regsets): Remove df_ur and df_live when
adding df_urec.
(rest_of_handle_global_alloc): Add back df_ur and df_live when
removing df_urec.
* timevar.def (TV_DF_UD): Renamed to TV_DF_UR.
* function.c (thread_prologue_and_epilogue_insns): Removed
call to df_analyze.
* df-problems.c (problem_UR): Added remove function and renamed TV.
(problem_LIVE): Added remove function.
2007-04-26 Seongbae Park <seongbae.park@gmail.com>
* tree-pass.h: Declaration for new pass.
* passes.c (init_optimization_passes): New pass.
* dce.c (prescan_insns_for_dce): Pass new param "fast" through.
(mark_artificial_uses, mark_reg_dependencies): New functions
- resurrected from the old svn revision.
(end_ud_dce, rest_of_handle_ud_dce, gate_ud_dce): New function.
(pass_ud_rtl_dce): New pass.
(fast_dce): New parameter for prescan_insns_for_dce.
2007-04-24 Seongbae Park <seongbae.park@gmail.com>
* final.c (leaf_renumber_regs_insn): Use SET_REGNO().
* df-scan.c (df_insn_refs_collect): Handle non-local gotos.
* sparc.c: New include of df.h.
* dce.c (prescan_insns_for_dce): Call mark_libcall for all insns
with with REG_LIBCALL_ID.
2007-04-23 Steven Bosscher <steven@gcc.gnu.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (problem_SCAN): Add time variable.
(df_refs_add_to_chains): Delete the refs vectors before
allocating new ones.
* df-core.c (df_analyze_problem): Push and pop problem specific
time vectors.
* timevar.def (TV_DF_SCAN, TV_DF_RU, TV_DF_RD, TV_DF_LR, TV_DF_UD,
TV_DF_LIVE, TV_DF_UREC, TV_DF_CHAIN, TV_DF_RI): New problem
specific time vars.
* dse.c (positions_needed): Changed to be bitmask from sbitmap.
(store_info.rhs): New field.
(free_store_info, step6): Changed positions_needed to be bitmask
from sbitmap.
(read_info.begin, read_info.end): Changed to be int.
(deferred_change): New struct.
(deferred_change_pool): New variable.
(step0): Initialize deferred_change_pool.
(canon_address): Added parameter to cselib_expand_value_rtx and
improved debugging.
(clear_rhs_from_active_local_stores, replace_read): New function.
(record_store, check_mem_read_rtx): Added code to invalidate
store_info.rhs. Changed positions_needed to be bitmask from
sbitmap.
(step1): Added code to process deferred_change_list.
(rest_of_handle_dse): Added deferred rescanning.
* df.h (df_problem.tv_id): New timevar for each problem.
* cselib.c (expand_loc, cselib_expand_value_rtx): Added code to
limit the amount of recursion allowed when expanding addresses.
* cselib.h (cselib_expand_value_rtx): Added max recursion
parameter.
* rtl.h (rhs_regno): Renamed tree to x.
* df-problems.c (df_problem problem_RU, df_problem problem_RD,
problem_LR, problem_UR, problem_LIVE, problem_UREC, problem_CHAIN,
problem_RI) Added timevar.
(df_live_local_finalize): Only update solution if dirty.
* Makefile.in (dse.o): Added dependencies.
2007-04-23 Ian Lance Taylor <iant@google.com>
* lower-subreg.c (resolve_reg_notes): Discard REG_DEAD and
REG_UNUSED notes for split registers.
(decompose_multiword_subregs): Remove life_blocks.
2007-04-22 Steven Bosscher <steven@gcc.gnu.org>
* df.h (df_bitmap_obstack): Declare.
* df-scan.c (df_scan_problem_data): Add new bitmap obstacks for
regsets and insns/notes to be rescanned.
(df_scan_free_internal): Free the new bitmap obstacks.
(df_scan_alloc): Initialize the new bitmap obstacks, and use them.
(df_scan_free): Set df->blocks_to_analyze to NULL after freeing it.
(df_insn_rescan_all): Put temporary bitmaps on df_bitmap_obstack.
(df_process_deferred_rescans): Likewise.
(df_get_call_refs): Likewise.
(df_update_entry_block_defs): Likewise. Put entry_block_defs on
the regsets bitmap obstack.
(df_record_exit_block_uses): Changed like df_record_exit_block_uses.
(df_entry_block_bitmap_verify): Put temporary bitmaps on df_bitmap_obstack.
(df_exit_block_bitmap_verify): Likewise.
(df_scan_verify): Likewise.
* df-core.c (df_bitmap_obstack): Declare.
(rest_of_handle_df_initialize): Initialize it.
(rest_of_handle_df_finish): Release it.
(df_set_blocks, df_worklist_dataflow, df_analyze,
df_compact_blocks): Use it.
* df-problems.c (df_set_seen): Use df_bitmap_obstack for seen_in_block
and seen_in_insn.
(df_ri_compute): Likewise for bitmaps allocated for the RI problem.
For the RU and RD problems, introduce per-problem bitmap obstacks:
(df_r[ud]_problem_data): Add a per-problem bitmap
obstack.
(df_r[ud]_alloc): Initialize and use them per df problem.
(df_r[ud]_confluence_n, df_r[ud]_transfer_function): Use them.
(df_r[ud]_free): Release them.
* dce.c (dce_marked_bitmap_obstack, dce_blocks_bitmap_obstack,
dce_tmp_bitmap_obstack): New bitmap obstacks.
(init_dce): Initialize them. Use dce_marked_bitmap_obstack for
the bitmap of marked insns.
(end_fast_dce): Renamed to...
(fini_dce): ...this. Release the new bitmap obstacks.
(dce_process_block): Allocate local_live on dce_tmp_bitmap_obstack.
(fast_dce): Allocate basic block bitmaps on dce_blocks_bitmap_obstack.
(rest_of_handle_fast_dce): Call fini_dce, and clear df_in_progress.
(run_fast_df_dce): Likewise.
2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/spu/spu.c (fsmbi_const_p): Replace flow2_completed with
epilogue_completed.
2007-04-16 Steven Bosscher <steven@gcc.gnu.org>
* fwprop.c (forward_propagate_into): If multiple sets
return.
2007-04-16 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_ref_create, df_reg_chain_unlink,
df_install_refs): Use df->analyze_subset.
(df_reorganize_refs_by_reg_by_reg, df_reorganize_refs_by_reg_by_insn):
New functions.
(df_reorganize_refs_by_reg): Split into
df_reorganize_refs_by_reg_by_reg,
df_reorganize_refs_by_reg_by_insn.
(df_add_refs_to_table): Do not add hardware_regs if not asked for.
(df_reorganize_refs_by_insn): Move call to count_refs.
(df_maybe_reorganize_def_refs, df_maybe_reorganize_use_refs):
Remove code to modify df->total_size.
* df-core.c (df_set_blocks): Set df->analyze_subset.
(df_finish_pass): Clear df->analyze->subset.
(df_analyze): Use df->analyze_subset.
(df_dump_start): Remove total_size from dump.
* df.h (DF_RI_NO_UPDATE, DF_DEFS_TOTAL_SIZE, DF_USES_TOTAL_SIZE):
Removed.
(df.analyze_subset): New field. * df-problems.c (df_ri_alloc,
df_ri_compute): Removed DF_RI_NO_UPDATE.
2007-04-12 Steven Bosscher <steven@gcc.gnu.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* cse.c (cse_insn): Do not emit barriers.
* dse.c (store_info.address): Renamed to mem_addr.
(canon_address): Removed address_out parameter.
(record_store): Removed address var and compute mem and
mem_address differently.
(check_mem_read_rtx): Removed address and changed parameters to
canon_true_dependence.
* cselib.c (cselib_expand_value_rtx): Do not translate
FRAME_POINTER_REGNUM and HARD_FRAME_POINTER_REGNUM.
2007-04-11 Steven Bosscher <steven@gcc.gnu.org>
* gcse.c (hash_scan_set): Make sure that INSN has only one
SET in its PATTERN before making SRC anticipatable.
* cfglayout.c (fixup_reorder_chain): Fix merge error, don't
call compact_blocks here.
2007-04-09 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-core.c (add_problem): Keep the problem sorted in
problems_in_order.
* global.c (compute_regsets): Recompute register information.
2007-04-08 Kenneth Zadeck <zadeck@naturalbridge.com>
* optabs.h (maybe_encapsulate_block): Made public.
* optabs.c (maybe_encapsulate_block): Ditto.
(emit_no_conflict_block, emit_libcall_block): Remove
REG_LIBCALL_ID when deleteing REG_RETVAL and REG_LIBCALL
notes.
* reload1.c (reload): Ditto.
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address):
Use maybe_encapsulate_block to add libcall notes.
2007-04-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* dse.c (clear_alias_set_lookup): New function.
(store_info.is_set): New field.
(replace_inc_dec, delete_dead_store_insn): Added more ifdefs so
dse could be tested on mainline.
(canon_address): Moved lookup of alias_set info to subroutine and
added better logging. Added code to detect if address contains an
AND and if so, escape.
(record_store, check_mem_read_rtx): White space cleanup. Added
code to skip store_info's for clobbers when comparing with
previous insn stores. We also mark store_info's as to whether
they are set or clobber based.
(scan_insn): Only add insn to active_stores_list if it has exactly
one store.
(step1): Add code to remove a store to the frame that goes dead at
the end of a function if there is a non overlaping block mode read
from the stack. The global algorithm cannot do this because it
takes a more conservative view of block mode reads.
(dse_confluence_0, dse_confluence_n, dse_transfer_function,
step5_spill, pass_rtl_dse2): Add ifdefs so this can be tested on
mainline.
(step5_nospill): Ignore clobbers and only look at the set to
decide if an insn can be deleted.
* init_regs.c: Whitespace.
* cselib.c (cselib_expand_value_rtx): Fixed comment and changed to
use proper macro.
2007-04-06 Paolo Bonzini <bonzini@gnu.org>
* bitmap.c (bitmap_set_range): New.
(bitmap_clear_range): Small optimization.
* bitmap.h (bitmap_set_range): New.
* df-problems.c (df_ref_bitmap): Remove.
(struct df_rd_problem_data, df_ru_problem_data): Remove related
data structures.
(df_ru_alloc, df_rd_alloc): Don't allocate them.
(df_ru_free, df_rd_free): Don't free them.
(df_ru_bb_local_compute_process_def, df_ru_local_compute,
df_rd_bb_local_compute_process_def, df_rd_local_compute):
Use bitmap_set_range and bitmap_clear_range instead of df_ref_bitmap.
2007-04-05 Kenneth Zadeck <zadeck@naturalbridge.com>
* sbitmap.c (sbitmap_empty_p): New function.
* sbitmap.h (sbitmap_empty_p): New function.
* dbgcnt.def (dse): New counter and sorted the others.
* df-core.c (df_worklist_dataflow): Made init_fun optional.
* cse.c (cse_main): Do dce at start of pass.
* timevar.def (TV_DSE3): Deleted.
* dse.c: New pass.
* dse.h: New file for dse pass.
* gcse.c (gcse_main): Set up the register info.
* alias.c (clear_reg_alias_info): Removed dead function.
* rtl.h (clear_reg_alias_info): Removed dead function.
* cselib.c (cselib_discard_hook): Added cselib val parameter.
(discard_useless_values): Added hook call here.
(remove_useless_values): Removed hook call from here.
(expand_loc, cselib_expand_value_rtx): New function.
(cselib_finish): Clear hook.
* cselib.h (cselib_discard_hook): Added cselib val parameter.
(expand_loc, cselib_expand_value_rtx): New function.
* common.opt (flag_flow_dce, new-dce): Removed flag.
(flag_dce, flag_dse): New flags.
* Makefile.in (dse.o): New pass.
* passes.c (init_iptimization_passes): Removed dse after combine.
Renamed dse3 to dse2.
* dce.c (delete_unmarked_insns): Renamed new_dce to dce.
(end_dce, mark_artificial_uses, mark_reg_dependencies,
invariant_store_base_eq, invariant_store_base_hash, value_store_base_eq,
value_store_base_hash, store_base_del, rs_init, rs_confluence,
rs_transfer_function, init_invariant_store_group,
init_value_store_group, empty_store_group, end_store_group,
init_rs_dflow, end_rs_dflow, init_unmarked_stores,
end_unmarked_stores, init_dse, end_dse, dump_stores,
split_address, add_store_offset, record_store, record_stores,
store_offset_compare, store_base_local,
invariant_store_base_local, value_store_base_local,
value_store_base_useless, remove_useless_values,
store_base_global, finish_max_in_luid,
calculate_reaching_stores, frame_stores_escape_p,
store_base_prune_needed, mark_escaping_stores,
insn_might_read_mem_rtx, insn_might_read_mem_use,
insn_might_read_mem_p, mark_dependent_stores,
prescan_insns_for_dse, rest_of_handle_dse, gate_dse): Deleted functions
as part of new dse pass in separate file.
* reload1.c (alter_reg): Added calls to register spill slots
with dse.
2007-04-05 Peter Bergner <bergner@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_legitimate_address): Disallow
PRE_MODIFY for TDmode.
2007-04-04 Kenneth Zadeck <zadeck@naturalbridge.com>
* cfg.c (dump_reg_info): Added check to lower max if new regs
were added.
* init-regs.c (initialize_uninitialized_regs): Changed code to
insert move right before uninitized insn.
2007-04-03 Paolo Bonzini <bonzini@gnu.org>
* df-problems.c (df_chain_create_bb): Plug leak.
* df-problems.c (df_chain_alloc): Fix typo.
2007-04-03 Paolo Bonzini <bonzini@gnu.org>
* dce.c (dce_process_block): Copy into DF_LR_IN.
* df-problems.c (df_lr_free_bb_info): Support bb_info->in
being the same bitmap as bb_info->top.
(df_lr_alloc): The adef and ause fields must be either
both NULL or both non-NULL. Initialize bb_info->top
to bb_info->in.
(df_lr_bb_local_compute): Allocate adef, ause, top together.
(df_lr_transfer_function): Simplify according to above
assumptions.
(df_lr_free): Zero out bb_info->top instead of freeing it
if it is the same as bb_info->in.
2007-04-01 Kenneth Zadeck <zadeck@naturalbridge.com>
* config/ia64/ia64.c (emit_predicate_relation_info): Changed
DF_LIVE_IN to df_get_live_in.
2007-03-29 Paolo Bonzini <bonzini@gnu.org>
* bitmap.c (bitmap_elt_copy, bitmap_elt_ior): New.
(bitmap_ior, bitmap_ior_into): Use them.
(bitmap_and_compl): Use them, return whether DST changed.
(bitmap_ior_and_compl): Rewrite.
* bitmap.h (bitmap_and_compl): Return a bool.
* Makefile.in (alias.o): Fix dependencies.
* alias.c (find_base_value, init_alias_analysis): Use
DF_REG_DEF_COUNT. Include df.h.
* cfg.c (dump_reg_info): Don't fail if reg_info not initialized.
* cse.c (cse_main): Assume dataflow initialized. Call reg_scan.
* gcse.c (gcse_main): Call df_analyze, remove call to reg_scan.
* local-alloc.c (rest_of_handle_local_alloc): Call allocate_reg_info
earlier.
* passes.c (init_optimization_passes): Initialize dataflow before CSE.
* global.c (n_reg_sets): Remove.
(reg_sets): Change to a VEC.
(mark_reg_store): Push onto reg_sets.
(global_conflicts): Assert reg_sets is empty, pop values out of it.
Don't allocate it nor free it here.
(global_alloc): Allocate reg_sets if necessary.
* see.c (rest_of_handle_see): Don't call reg_scan.
* tracer.c (rest_of_handle_tracer): Likewise.
* cfgcleanup.c (rest_of_handle_jump2): Likewise.
* bb-reorder.c (fix_edges_for_rarely_executed_code): Likewise.
* loop-init.c (rtl_loop_done): Likewise.
* ifcvt.c (rest_of_handle_if_conversion): Likewise.
* mode-switching.c (optimize_mode_switching): Remove useless
allocate_reg_info.
* lower-subreg.c (decompose_register): Don't call clear_reg_info_regno.
(decompose_multiword_subregs): Don't call reg_scan_update.
* web.c (rest_of_handle_web): Delete.
(pass_web): Use web_main as pass routine.
* regclass.c (max_parallel, max_set_parallel): Remove.
(reg_scan): Don't set them.
(reg_scan_update): Delete.
(reg_scan_mark_refs): Remove last parameter.
* rtl.h (max_parallel): Remove.
2007-03-29 Paolo Bonzini <bonzini@gnu.org>
* df-core.c (pass_df_finish): Restore.
(pass_df_finish_opt, pass_df_finish_no_opt): Remove.
* tree-pass.h (pass_df_finish): Restore.
(pass_df_finish_opt, pass_df_finish_no_opt): Remove.
* passes.c (init_optimizations_passes): Remove pass_df_finish_no_opt.
Rename pass_df_finish_opt to pass_df_finish.
* reg-stack.c: Mostly evert previous commit.
2007-03-28 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (pass_df_initialize, pass_df_finish): Deleted.
(pass_df_initialize_opt, pass_df_initialize_no_opt,
pass_stack_regs_run, pass_df_finish_opt, pass_df_finish_no_opt):
Added.
* df-core.c (df_finish_pass): Made ur and live problems condition
on optimization.
(pass_df_initialize): Renamed to pass_df_initialize_opt.
(pass_df_initialize_no_opt): New pass.
(gate_opt, gate_no_opt): New functions.
(pass_df_finish): Renamed to pass_df_finish_opt.
(pass_df_finish_no_opt): New pass.
* mode-switching.c (optimize_mode_switching): Changed references
of DF_LIVE_IN to df_get_live_in.
* global.c (compute_regsets): Only add urec problem when
optimizing.
* function.c (regno_clobbered_at_setjmp): Changed references
of DF_LIVE_OUT to df_get_live_out.
* regclass.c (regclass_init): Only call df_compute_regs_ever_live
if optimizing.
* stack-ptr-mod.c (notice_stack_pointer_modification): Only call
df_update_exit_block_uses if optimizing.
* df-problems.c (df_get_live_in, df_get_live_out): Return df_live
sets if they are there.
* reg-stack.c (rest_of_handle_stack_regs_run):
Added new pass that just runs subpasses.
* passes.c (init_optimization_passes): Added passes to turn on df
at only some parts of the compilation for -O0. Moved
pass_split_before_regstack and pass_stack_regs into a subpass of
the stack regs pass.
2007-03-28 Paolo Bonzini <bonzini@gnu.org>
* df.h (df_ru_get_bb_info, df_rd_get_bb_info, df_lr_get_bb_info,
df_ur_get_bb_info, df_live_get_bb_info, df_urec_get_bb_info):
New inlines.
* df-scan.c (df_scan_get_bb_info, df_get_artificial_uses,
df_get_artificial_defs): Delete.
* df-problems.c (df_ru_get_bb_info, df_rd_get_bb_info,
df_lr_get_bb_info, df_ur_get_bb_info, df_live_get_bb_info,
df_urec_get_bb_info): Delete.
2007-03-20 Seongbae Park <seongbae.park@gmail.com>
* combine.c (setup_incoming_promotions): Fix a bad merge
- use the argument FIRST instead of recomputing it.
2007-03-16 Paolo Bonzini <bonzini@gnu.org>
* tracer.c (tracer): Work around pr19340.c failure by cleaning up
CFG outside cfglayout mode. Proper fix will be brought in by
next mainline merge.
2007-03-16 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/31025
* df.h (df_get_live_out): New prototype.
* df-problems.c (df_get_live_out): New.
(df_ri_bb_compute): Use it.
2007-03-13 Seongbae Park <seongbae.park@gmail.com>
* tree-pass.h (pass_subregs_of_mode_finish): New pass declaration.
* regclass.c (record_subregs_of_mode): Made static, and
moved before init_subregs_of_mode to compile.
(cannot_change_mode_set_regs, invalid_mode_change_p): Added assertion.
(finish_subregs_of_mode): New function.
(pass_subregs_of_mode_finish): New pass.
* rtl.h (record_subregs_of_mode): Removed.
* combine.c (gen_lowpart_for_combine): Removed calls to
record_subregs_of_mode.
* passes.c (init_optimization_passes): Moved pass_subregs_of_mode_init
just before local_alloc. New pass pass_subregs_of_mode_finish
after global_alloc.
2007-03-09 Richard Earnshaw <rearnsha@arm.com>
* arm.c: Include df.h.
2007-03-06 Steven Bosscher <steven@gcc.gnu.org>
* fwprop.c (try_fwprop_subst): Remove redundant df_notes_rescan.
* see.c (rest_of_handle_see): Run a fast dce. Don't run cleanup_cfg.
* tracer.c (tracer): Clean up the cfg when still in cfglayout mode.
* postreload-gcse.c (rest_of_handle_gcse2): Don't run
delete_trivially_dead_insns, this pass cleans up after itself already.
* df-scan.c (df_insn_rescan): Fix typo.
* cse.c (rest_of_handle_cse): Don't use CLEANUP_EXPENSIVE.
(rest_of_handle_cse2): Likewise. Don't call delete_dead_jumptables.
* web.c (rest_of_handle_web): Don't run delete_trivially_dead_insns.
Also don't clean up the CFG, this pass does not transform the CFG.
* loop-init.c (rtl_loop_done): Don't run delete_trivially_dead_insns.
Don't use CLEANUP_EXPENSIVE.
* ifcvt.c (rest_of_handle_if_conversion): Don't use CLEANUP_EXPENSIVE.
* gcse.c (rest_of_handle_jump_bypass): Only remove unreachable basic
blocks before the pass. No need for a reg_scan. Rebuild jump labels
after delete_trivially_dead_insns. Don't use CLEANUP_EXPENSIVE.
(rest_of_handle_gcse): Rebuild jump labels after
delete_trivially_dead_insns. Don't call delete_dead_jumptables.
Don't use CLEANUP_EXPENSIVE.
* cfgcleanup.c (cleanup_cfg): Move delete_dead_jumptables call out of
the loop.
* combine.c (rest_of_handle_combine): Account cleanup_cfg to TV_JUMP.
Don't use CLEANUP_EXPENSIVE. Don't run delete_trivially_dead_insns.
* bb-reorder.c (rest_of_handle_reorder_blocks): Don't use
CLEANUP_EXPENSIVE. Resurrect CLEANUP_CROSSJUMP here.
2007-03-06 Paolo Bonzini <bonzini@gnu.org>
* cse.c (validate_canon_reg): Don't do anything if *XLOC is NULL.
Assert it is only called with insn != 0 and it never resets
something non-NULL to NULL. Always use validate_change.
(cse_insn): Always call canon_reg with an INSN except when it
is used on a REG. When processing notes, first canonicalize,
then fold, and call df_notes_rescan.
(cse_process_notes): Rename to cse_process_notes_1, add CHANGED
parameter.
(cse_process_notes_1): Wrapper around cse_process_notes to set
the CHANGED parameter.
(cse_extended_basic_block): Adjust call to cse_process_notes
and use result to call df_notes_rescan.
(cse_main): Set deferred insn rescanning flag, don't rescan on exit.
(pass_cse2): Add TODO_df_finish.
* gcse.c (pass_gcse): Likewise.
2007-03-04 Roman Zippel <zippel@linux-m68k.org>
* regclass.c (scan_one_insn): Call df_insn_rescan after breaking
out constant parameter.
2007-03-04 Roman Zippel <zippel@linux-m68k.org>
* df-scan.c (df_grow_ref_info): Also add bitmap_addend to size.
2007-02-25 Ulrich Weigand <uweigand@de.ibm.com>
Backport from mainline:
* reload.c (find_reloads_address_1): Handle PLUS expressions resulting
from register elimination as PRE_MODIFY / POST_MODIFY increments.
Do not attempt to handle MEM inside auto-inc expressions.
* reload1.c (eliminate_regs_1): Do not attempt to handle elimination
of a register modified by an auto-inc expression. However, do handle
elimination of a register used as PRE_MODIFY / POST_MODIFY increment.
(elimination_effects): Prohibit elimination of a register modified
by an auto-inc expression. Disable register elimination rules whose
target register is modified by an auto-inc expression with variable
increment.
2007-02-25 Ulrich Weigand <uweigand@de.ibm.com>
Revert:
2006-07-01 Daniel Berlin <dberlin@dberlin.org>
David Edelsohn <edelsohn@gnu.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
reload1.c (eliminate_regs_1, elimination_effects): Added cases for
PRE/POST_MODIFY.
2007-02-22 Seongbae Park <seongbae.park@gmail.com>
* global.c (reg_becomes_live): Mark registers not live
after CLOBBER.
2007-02-22 Paolo Bonzini <bonzini@gnu.org>
* combine.c (set_nonzero_bits_and_sign_copies, reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine, get_last_value): Look at DF_LR to
check if a register is uninitialized.
2007-02-21 Paolo Bonzini <bonzini@gnu.org>
* combine.c (uid_cuid, max_uid_cuid): Remove.
(INSN_CUID): Replace throughout with DF_INSN_LUID.
(last_call_cuid): Rename to last_call_luid.
(subst_low_cuid): Rename to subst_low_luid.
(last_insn_cost): Rename to max_uid_known.
(uid_log_links): New.
(INSN_COST, LOG_LINKS): New.
(combine_validate_cost): Use INSN_COST instead of accessing
uid_insn_cost.
(create_log_links, clear_log_links): Move before combine_instructions.
(combine_instructions): Don't compute cuids. Allocate uid_log_links.
Call create_log_links and clear_log_links here. Only initialize
data structures for insns within a basic block. Use INSN_COST
instead of accessing uid_insn_cost. Reset last_call_luid and
mem_last_set once for every basic block. Update label_tick on every
basic block, reset label_tick_ebb_start on every label.
(can_combine_p, try_combine, reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine, record_value_for_reg,
record_dead_and_set_regs_1, record_dead_and_set_regs,
get_last_value_validate, get_last_value, use_crosses_set_p,
move_deaths, distribute_notes, distribute_links): Rename stuff
as indicated above. In tests for LUIDs, check that we refer to
the same label_tick too. In tests for label ticks, check that
they are > label_tick_ebb_start.
(rest_of_handle_combine): Don't create/clear loglinks here.
* gengtype.c (adjust_field_rtx_def): Adjust index of JUMP_LABEL.
* caller-save.c (init_caller_save): Adjust creation of INSNs.
* rtl.def (CODE_LABEL): Adjust comment.
(INSN, JUMP_INSN, CALL_INSN, BARRIER): Remove penultimate field.
* emit-rtl.c (unshare_all_rtl_again, verify_rtl_sharing,
unshare_all_rtl_in_chain, make_insn_raw, make_jump_insn_raw,
make_call_insn_raw): Remove references to LOG_LINKS.
* rtl.h (LOG_LINKS): Remove.
(REG_NOTES, CALL_INSN_FUNCTION_USAGE, JUMP_LABEL): Shift index
down by one.
* regs.h (struct reg_info_def): Remove first_uid and last_uid.
(REGNO_FIRST_UID, REGNO_LAST_UID): Remove.
* cse.c (cse_basic_block_start, cse_basic_block_end, uid_cuid,
max_uid, INSN_CUID): Remove.
(struct cse_basic_block_data): Remove low_cuid and high_cuid.
(reg_used_in_multiple_bb, reg_used_in_bb): New.
(make_regs_eqv): Test reg_used_in_multiple_bb instead of cuids.
(cse_prescan_path): Remove low_cuid and high_cuid.
(mark_reg_use_bb): New.
(cse_main): Replace computation of cuids with initialization of
reg_used_in_multiple_bb. Remove references to deleted variables.
* regmove.c (copy_src_to_dest): Don't update REGNO_FIRST_UID and
REGNO_LAST_UID.
* regclass.c (reg_scan_mark_refs): Remove penultimate argument.
Don't track REGNO_FIRST_UID and REGNO_LAST_UID.
(reg_scan, reg_scan_update): Remove penultimate argument to
reg_scan_mark_refs.
2007-02-20 Seongbae Park <seongbae.park@gmail.com>
* sched-ebb.c (schedule_ebbs): Clear DF_LR_RUN_DCE flag
after df_analyze.
2007-02-20 Kenneth Zadeck <zadeck@naturalbridge.com>
* fwprop.c (forward_propagate_into): Removed call to
df_recompute_luids.
* see.c (see_free_data_structures): Ditto.
* loop-iv.c (iv_analysis_loop_init): Ditto.
* dce.c (prescan_insns_for_dse): Ditto.
* auto-inc-dec.c (merge_in_block): Moved call to
df_recompute_luids so that it only happens on subsequent passes of
block.
* df-scan.c (df_grow_insn_info): Made public.
* df.h (df_grow_insn_info): Made public.
* df-core.c: Fixed comments.
* df-problems.c (df_ur_bb_local_compute): Reversed order of
processing insns. Removed usage of seen_in_block and
seen_in_insn. Update luid.
(df_ur_local_compute, df_ur_verify_transfer_functions): Added call
to df_grow_insn_info and deleted calls to df_set_seen, df_unset_seen.
2007-02-16 Paolo Bonzini <bonzini@gnu.org>
* combine.c (INSN_CUID): Always look up uid_cuid.
(insn_cuid): Delete.
* sched-deps.c (sched_analyze): Don't free LOG_LINKS here.
* sched-int.h (struct dep_list): Don't mention LOG_LINKS in comment.
2007-02-15 Paolo Bonzini <bonzini@gnu.org>
* config/sh/sh.c (sh_reorg): Don't look at LOG_LINKS.
2007-02-15 Paolo Bonzini <bonzini@gnu.org>
* combine.c (find_single_use): Don't check for reload flags.
2007-02-15 Paolo Bonzini <bonzini@gnu.org>
Merge from mainline.
2007-02-15 Paolo Bonzini <bonzini@gnu.org>
* caller-save.c (save_call_clobbered_regs): Do not process sibcalls.
2007-02-13 Seongbae Park <seongbae.park@gmail.com>
Merge from mainline.
2007-02-13 Seongbae Park <seongbae.park@gmail.com>
* bitmap.c (bitmap_and, bitmap_and_compl, bitmap_xor):
Ensure dst->current is valid.
2007-02-13 Kenneth Zadeck <zadeck@naturalbridge.com>
* lower-subregs.c (resolve_reg_notes): Added code to call
df_notes_rescan when REG_EQUAL notes are changed.
2007-02-12 Kenneth Zadeck <zadeck@naturalbridge.com>
* global.c (compute_regsets): Removed first two parameters.
Converted asm_clobbered to regs_asm_clobbered.
(global_alloc): Removed bad merged call to make_accurate_live_analysis.
(global_alloc, rest_of_handle_global_alloc): Removed first two
parameters from compute_regsets.
2007-02-06 Kenneth Zadeck <zadeck@naturalbridge.com>
* ifcvt.c (noce_process_if_block): Removed unnecessary insn deletes.
(dead_or_predictable): Removed incorrect bit vector operation.
* lower-subregs (simple_move_operand, resolve_clobber): Change from mainline.
(resolve_clobber): Added df_insn_rescan of clobber.
(decompose_multiword_subregs): Added df setup and removed debugging.
(pass_lower_subreg2): Added df cleanup.
* Makefile.in (lower-subregs.o): Added df.h dependence.
2007-02-03 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_expand_prologue): Remove unneeded brackets.
(sh_expand_epilogue): Add blockage insn when not
frame_pointer_needed.
(sh_output_mi_thunk): Don't use flow analysis here.
* config/sh/sh.md (UNSPEC_EH_RETURN): Remove.
(UNSPECV_EH_RETURN): New macro.
(sibcall_valuei): New.
(sibcall_valuei_pcrel, sibcall_value_pcrel): Likewise.
(sibcall_value_compact, sibcall_value_media): Likewise.
(sibcall_value): Use new sibcall_value* patterns.
(eh_set_ra_si): Use unspec_volatile and UNSPECV_EH_RETURN.
(eh_set_ra_di, eh_set_ra_di+1): Likewise.
2007-02-03 Kaz Kojima <kkojima@gcc.gnu.org>
* mode-switching.c (create_pre_exit): Skip CLOBBER of pseudo
register for the result when not optimizing.
(optimize_mode_switching): Move df_ri_add_problem and df_analyze
calls after create_pre_exit call.
2007-02-03 Kaz Kojima <kkojima@gcc.gnu.org>
* modulo-sched.c (sms_schedule): Call df_ri_add_problem
with DF_RI_LIFE.
2007-02-03 Kaz Kojima <kkojima@gcc.gnu.org>
* df-scan.c (df_get_entry_block_def_set): Use struct_value_rtx
hook instead of TARGET_STRUCT_VALUE_RTX.
2007-02-03 Kaz Kojima <kkojima@gcc.gnu.org>
* passes.c (init_optimization_passes): Move df_finish after
delay_slots.
2007-01-02 Kenneth Zadeck <zadeck@naturalbridge.com>
* optabs.c (emit_no_conflict_block): Removed redundant code to
number libcalls.
* tree-pass.h (pass_initialize_subregs): Renamed to
pass_initialize_regs.
* passes.c (init_optimization_passes): Ditto.
* builtins.c (expand_builtin_setjmp_receiver): Changed
gen_rtx_ASM_INPUT to gen_blockage.
* function.c (expand_function_end): Ditto.
* stmt.c (gen_non_local_got_receiver): Ditto.
* config/i386.md (blockage): Don't take an operand.
(prologue_use): New.
* config/i386.c (ix86_expand_prologue): Don't build a blockage
insn with an operand. If the PIC reg is used, use a prologue_use
insn to protect it from being removed.
* df-scan.c (df_get_entry_block_def_set): Generate ref for
INCOMING_RETURN_ADDR_RTX after reload_completed.
* df-core.c (df_ref_debug): Fixed formatting.
* init-regs.c: Renamed from subregs_init.c and changed to
initialize all fully uninitialized registers.
* bt-load.c (compute_defs_uses_and_gen): Changed check for
ASM_INPUT to UNSPEC_VOLATILE.
* df-problems.c (df_set_unused_notes_for_mw,
df_set_dead_notes_for_mw, df_ri_bb_compute): Cleaned up reg_notes
debugging info.
(df_set_dead_notes_for_mw): Added do_not_gen to test of all notes
dead.
* Makefile.in (subregs-init.*): Renamed to init-regs.*.
* config/arm/arm.c (arm_expand_prologue, thumb_expand_prologue):
Removed code to generate explicit uses of LR_REGNUM from prologue.
* config/arm/arm.h (EPILOGUE_USES): Made LR_REGNUM unconditionally
added.
* dce.c (deletable_insn_p): Made clobbers always live for use-def
based dce.
(prescan_insns_for_dce, prescan_insns_for_dse): Added fast
parameter to deletable_insn_p.
(run_fast_df_dce): Temporarily turn off DF_DEFER_INSN_RESCAN
during this subphase.
2007-02-01 Seongbae Park <seongbae.park@gmail.com>
* df-scan.c (df_sort_and_compress_refs):
Style fix.
(df_sort_and_compress_mws):
Style fix. Fix missing & in parameters for df_mw_compare call.
2007-02-01 Seongbae Park <seongbae.park@gmail.com>
* df-scan.c (df_swap_refs): New function.
(df_sort_and_compress_refs, df_sort_and_compress_mws):
Avoid qsort call overhead if the array has only 2 elements
or if it's already sorted.
2007-01-17 Eric Christopher <echristo@apple.com>
* config/mips/mips.c (mips_output_function_epilogue): Use SET_REGNO
instead of REGNO.
(mips_output_mi_thunk): Ditto.
2007-01-17 Eric Christopher <echristo@apple.com>
* reorg.c (fill_simple_delay_slots): Fix prototype.
2007-01-15 Andreas Krebbel <krebbel1@de.ibm.com>
* regmove.c: (fixup_match_1): Call df_notes_rescan after
changing insn notes.
2007-01-15 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.c: Include df.h.
(s390_emit_prologue): Call df_insn_rescan when annotating constant
pool references.
2007-01-15 Andreas Krebbel <krebbel1@de.ibm.com>
* rtl.h (split_all_insns_noflow): Add prototype.
* recog.c (split_all_insns_noflow): Remove static.
2007-01-14 Kenneth Zadeck <zadeck@naturalbridge.com>
* fwprop.c (update_df): Only rescan if insn has really changed.
(try_fwprop_subst): Removed call to df_set_bb_dirty.
(fwprop_init): Added new parameter to df_maybe_reorganize_use_refs.
* df-scan.c (df_scan_alloc): Removed calls to df_grow_ref_info.
(df_scan_blocks, df_ref_create, df_reg_chain_unlink,
df_maybe_reorganize_use_refs, df_maybe_reorganize_def_refs,
df_install_ref, df_install_refs, df_refs_add_to_chains): Changed
to support new modes adding refs to the df.ref_info.refs.
(df_reg_chain_unlink, df_install_ref, df_ref_create_structure,
df_hard_reg_used_p): Changed DF_REGS_EVER_LIVE to
DF_HARD_REG_LIVE.
(df_ref_remove, df_ref_create): Added call to dirty the block when
a ref is changed manually.
(df_insn_rescan, df_notes_rescan): Added bb param to
df_refs_add_to_chains.
(df_reorganize_refs): Renamed to df_reorganize_refs_by_reg.
(df_count_refs, df_add_refs_to_table,
df_reorganize_refs_by_insn_bb, df_reorganize_refs_by_insn,
df_hard_reg_used_count): New functions.
(df_drop_organized_tables): Removed.
* df_core.c (df_set_blocks, df_finish_pass): Changed
to support new modes adding refs to the df.ref_info.refs.
* df.h (df_ref_flags.DF_REGS_EVER_LIVE): Renamed to
DF_HARD_REG_LIVE.
(df_ref_order): New Enum.
(df_ref_info.{refs_organized_alone, refs_organized_with_eq_uses,
add_refs_inline}): Replaced with df_ref_info.ref_order.
(DF_REG_EVER_LIVE_P): Removed macro.
* df-problems.c (df_ru_local_compute): Added parm to
df_maybe_reorganize_use_refs.
(df_rd_local_compute): Added parm to
df_maybe_reorganize_def_refs.
2007-01-12 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_collection_rec): New structure.
(df_chains): Deleted structure.
(DEBUG_DF_RESCAN): Removed conditional compilation of rescanning.
(df_scan_start_block): Added ifdefed out code that prints the
scanning of insns.
(df_ref_create, df_get_artificial_defs, df_get_artificial_uses,
df_reg_chain_unlink, df_ref_remove, df_ref_chain_delete_du_chain,
df_ref_chain_delete, df_mw_hardreg_chain_delete, df_insn_rescan,
df_ref_chain_change_bb, df_insn_change_bb,
df_ref_change_reg_with_loc_1, df_mw_hardreg_chain_delete_eq_uses,
df_notes_rescan, df_refs_add_to_chains, df_ref_create_structure,
df_ref_record, df_def_record_1, df_defs_record, df_uses_record,
df_get_conditional_uses, df_insn_refs_collect, df_recompute_luids,
df_bb_refs_collect, df_entry_block_defs_collect,
df_update_entry_block_defs, df_exit_block_uses_collect,
df_record_exit_block_uses, df_update_exit_block_uses,
df_compute_regs_ever_live, df_reg_chain_mark,
df_reg_chain_verify_unmarked, df_insn_refs_verify, df_bb_verify,
df_scan_verify): Changed to use vector rep for refs.
(df_get_call_refs) Ditto plus fixed bug where clobber ref was
generated for same ref as result of call.
(df_reg_chain_create, df_ref_unlink, df_ref_chain_find_ref,
df_ref_chain_find_ref_by_regno, df_ref_chain_append,
df_ref_find_chains, df_ref_add_to_chains, df_insn_refs_record,
df_ref_chain_verify_and_unmark, df_ref_chain_free, df_ref_verify,
df_mw_hardreg_find_hardreg): Deleted function.
(df_ref_compress_rec, df_free_collection_rec, df_ref_compare,
df_sort_and_compress_refs, df_mw_compare, df_sort_and_compress_mws
df_canonize_collection_rec, df_install_ref, df_install_refs,
df_refs_verify, df_mws_verify): New function.
(df_ref_is_equal): Renamed to df_ref_equal_p and changed to use
vector rep for refs.
(df_mw_is_equal): Renamed to df_mw_equal_p and changed to use
vector rep for refs.
* df.h (df_ref_flags.(DF_REF_MW_HARDREG_GROUP, DF_REF_REF_MARKER):
Removed.
(df_ref_flags.(DF_REF_REG_MARKER, DF_REGS_EVER_LIVE)): Renumbered.
(df_mw_hardreg.(loc, start_regno, end_regno, mw_order)): New
fields.
(df_insn_info.(defs, uses, eq_uses, mw_hardregs): Made into arrays
of pointers.
(df_scan_bb_info.(artificial_defs, artificial_uses): Ditto.
(df_ref.ref_order): New field.
(df_ref.next): Removed.
(df.ref_order): New field.
(DF_REF_REF_MARK, DF_REF_REF_UNMARK, DF_REF_IS_REF_MARKED,
DF_REF_NEXT_REF): Removed macro.
(DF_REF_ORDER): New macro.
* df-core.c (df_bb_regno_last_use_find, df_bb_regno_last_use_find,
df_bb_regno_first_def_find, df_bb_regno_last_def_find,
df_insn_regno_def_p, df_find_def, df_find_use, df_refs_chain_dump,
df_mws_dump, df_insn_uid_debug, df_insn_debug): Ditto.
* fwprop.c (update_df): Do not call df_insn_rescan unless insn has
changed.
(local_ref_killed_between_p, all_uses_available_at,
find_occurrence, update_df): Changed to use
vector rep for refs.
* see.c (see_handle_relevant_refs, see_update_relevancy,
see_propagate_extensions_to_uses): Ditto.
* auto-inc-dec.c (find_inc, merge_in_block): Ditto.
* web.c (union_defs, web_main): Ditto.
* global.c (compute_regs_asm_clobbered): Ditto.
* ifcvt.c (dead_or_predicable): Ditto.
* loop-invariant.c (find_defs, check_dependency,
find_invariant_insn): Ditto.
* combine.c (create_log_links): Ditto.
* df-problems.c (df_ru_alloc, df_ru_bb_local_compute_process_def,
df_ru_bb_local_compute_process_use, df_rd_alloc,
df_rd_bb_local_compute_process_def, df_lr_bb_local_compute,
df_lr_simulate_artificial_refs_at_end, df_lr_simulate_one_insn,
df_ur_bb_local_compute, df_urec_bb_local_compute,
df_urec_bb_local_compute, df_chain_remove_problem,
df_chain_remove_problem, df_chain_reset,
df_chain_create_bb_process_use, df_chain_create_bb,
df_chain_top_dump, df_chain_top_dump, df_chain_bottom_dump,
df_set_unused_notes_for_mw, df_set_dead_notes_for_mw,
df_ri_bb_compute): Ditto.
* dce.c (delete_corresponding_reg_eq_notes, mark_artificial_uses,
mark_reg_dependencies, dce_process_block): Ditto.
2007-01-10 Seongbae Park <seongbae.park@gmail.com>
* df-core.c (df_worklist_propagate_backward,
df_worklist_dataflow)): More comments.
(df_iterative_dataflow): Whitespace fixup.
* cfganal.c (inverted_post_order_compute):
More comments and rename a local variable DEST to PRED.
(df_find_deadend): More comments. Use gcc_unreachable().
2007-01-09 Seongbae Park <seongbae.park@gmail.com>
* df-core.c (rest_of_handle_df_initialize): Allocate and free new
fields struct dataflow::{postorder_inverted,n_blocks_inverted}.
(df_hybrid_search_forward, df_hybrid_search_backward): Pass visited,
pending, considered as parameters instead of fields of struct df.
(df_worklist_propagate_forward, df_worklist_propagate_backward,
df_worklist_dataflow): New functions.
(df_iterative_dataflow): Remove visited, pending, considered
fields from struct dataflow.
(df_analyze): Allocate and free new fields
df::{postorder_inverted,n_blocks_inverted}.
(df_get_n_blocks, df_get_postorder): Make them return
different values depending on the direction of the dataflow problem.
(df_simple_dataflow): Renamed from df_simple_iterative_dataflow.
Call df_worklist_dataflow instead of df_iterative_dataflow.
* cfganal.c (dfs_find_deadend, inverted_post_order_compute):
New functions.
* df.h (struct dataflow): Remove fields visited, pending, considered.
Add new fields postorder_inverted, n_blocks_inverted.
(df_get_nblocks, df_get_postorder): Prototype change.
(df_simple_dataflow): Renamed from df_simple_iterative_dataflow.
(df_worklist_dataflow): New function prototype.
* df-problems.c: Use df_worklist_dataflow instead of
df_iterative_dataflow for solver.
* basic-block.h (inverted_post_order_compute): New function prototype.
* dce.c (dce_process_block): Pass extra parameter to df_get_n_blocks
and df_get_postorder.
(calculate_reaching_stores): Call df_simple_dataflow,
renamed from df_simple_iterative_dataflow.
2007-01-05 Kenneth Zadeck <zadeck@naturalbridge.com>
* see.c (see_update_defs_relevancy): Type fixed.
* df-scan.c (df_reg_chain_unlink, df_ref_verify): Made tolerant of
refs table not being there.
(df_drop_organized_tables): New function.
* df-core.c (df_finish_pass): Drop refs tables after each pass.
* web.c (web_main): Reorganized access to not use ref tables and
go in order of insns.
* df.h (df_drop_organized_tables): New function.
* df-problems.c (df_chain_start_dump): Deleted function.
(df_chain_top_dump, df_chain_bottom_dump): New functions.
2007-01-03 Kenneth Zadeck <zadeck@naturalbridge.com>
* see.c (see_initialize_data_structures): Does not use
DF_USES_TABLE_SIZE or DF_DEFS_TABLE_SIZE.
(see_handle_relevant_defs, see_handle_relevant_uses): Removed
outer loop. Now a subrouting of see_handle_relevant_refs.
(see_handle_relevant_refs, see_update_relevancy): New functions
that now loops over insns.
(see_update_uses_relevancy, see_update_defs_relevancy): Removed
outer loop. Now a subroutine of see_update_relevancy.
(see_analyze_one_def): Removed unnecessary tests.
(see_propagate_extensions_to_uses): Now iterates over insns and
calls see_handle_relevant_refs and see_update_relevancy.
* df-scan.c (df_reg_chain_unlink, df_insn_delete): Added code to
skip the chain field of refs if the chain problem is not active.
(df_scan_verify): Moved verification of the
out_of_date_transfer_functions fields into the problem verifiers.
* df-core.c (df_set_blocks): More logging.
(df_finish_pass): Moved around when recanning is done.
(rest_of_handle_df_initialize): Moved creation of
handles out_of_date_transfer_functions to the problems.
(df_set_bb_dirty, df_clear_bb_dirty, df_compact_blocks): Now
handles out_of_date_transfer_functions in any problem.
* df.h: Added comments.
* df-problems.c (df_lr_add_problem, df_ur_add_problem,
df_chain_add_problem): Allocates out_of_date_transfer_functions.
(df_lr_verify_transfer_functions,
df_ur_verify_transfer_functions): Now verifies
out_of_date_transfer_functions.
(df_chain_remove_problem): Tears down problem by looping over
insns.
(df_chain_fully_remove_problem, df_chain_free): Frees
out_of_date_transfer_functions.
(df_chain_create_bb): Sets out_of_date_transfer_functions.
2007-01-02 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_reg_chain_create, df_reg_chain_unlink,
df_ref_create_structure, df_hard_reg_used_p): Added code to
process df->hard_regs_live_count.
(df_ref_is_record_live, df_reg_chain_find_ref): Deleted.
(df_refs_add_to_chains): Removed ifdefed code.
(df_compute_regs_ever_live): Fixed "&" vs "&&" problem.
* df-core (rest_of_handle_df_initialize,
rest_of_handle_df_finish): Added code to
process df->hard_regs_live_count.
* global.c (global_alloc): Repositioned use of urec problem.
(build_insn_chain): Changed use of DF_RA_LIVE_TOP to df_get_live_top.
(rest_of_handle_global_alloc): Removed call to df_analyze for no
optimize case.
* local-alloc.c (update_equiv_regs): Added calls to
df_notes_rescan where eq notes are hacked.
(block_alloc): Changed DF_RA_LIVE_TOP to DF_LR_TOP.
(rest_of_handle_local_alloc): Removed addition of urec problem.
* function.c (regno_clobbered_at_setjmp): Changed df_get_live_out
to DF_LIVE_OUT.
* (df_ref_flags.DF_REGS_EVER_LIVE): New flag.
(df.hard_regs_live_count): New bitmap.
(DF_LR_TOP, DF_REG_EVER_LIVE_P): New macro.
(df_get_live_out): Removed.
(df_get_live_top): Added.
* df-problems.c (df_get_live_in): Does not look at DF_LIVE.
(df_get_live_out): Deleted.
(df_get_live_top): Added.
* config/sh/sh.c (calc_live_regs): Changed regs_ever_live to
df_regs_ever_live_p.
* config/mn10300/mn10300.c (fp_regs_to_save): Ditto.
* reload1.c (reload): Corrected the set of bitmaps to modify after
reloading.
2007-01-01 Eric Christopher <echristo@apple.com>
* config/darwin.c: Include df.h.
(machopic_legitimize_pic_address): Use
df_set_regs_ever_live.
2006-12-28 Kenneth Zadeck <zadeck@naturalbridge.com>
* regs.h: (regs_ever_live, regs_asm_clobbered): Removed.
* final.c (regs_ever_live, regs_asm_clobbered): Removed.
(only_leaf_regs_used, leaf_renumber_regs_insn): Encapsulated
references to regs_ever_live.
* global.c (insn_contains_asm_1, insn_contains_asm,
compute_regs_asm_clobbered): New functions.
(global_alloc): Added call to compute_regs_asm_clobbered and
encapsulated references to regs_ever_live.
(dump_global_regs): Encapsulated references to regs_ever_live.
(rest_of_handle_global_alloc): Changed call to df_scan_alloc.
* regrename.c (regrename_optimize, regrename_optimize): Encapsulated
references to regs_ever_live.
* recog.c (peep2_find_free_register): Ditto.
* rtl-factoring (recompute_gain_for_pattern_seq,
abstract_best_seq): Ditto.
* bt-load.c (move_btr_def, migrate_btr_defs): Ditto.
* reg_stack.c (reg_to_stack): Ditto.
* config/alpha/alpha.c (alpha_ra_ever_killed, alpha_sa_mask,
alpha_sa_size): Ditto.
* config/frv/frv.c (frv_stack_info, frv_function_prologue): Ditto.
* config/s390/390.c (legitimize_pic_address,
legitimize_tls_address, find_unused_clobbered_reg,
s390_regs_ever_clobbered, s390_register_info,
s390_init_frame_layout, s390_update_frame_layout,
s390_emit_prologue): Ditto.
* config/m32c/m32.c (need_to_save): Ditto.
* config/spu/spu.c (spu_split_immediate): Ditto.
* config/sparc/sparc.c (sparc_compute_frame_size,
sparc_output_scratch_registers, save_or_restore_regs,
order_regs_for_local_alloc): Ditto.
* config/m32r/m32r.c (MUST_SAVE_FRAME_POINTER,
MUST_SAVE_RETURN_ADDR, m32r_hard_regno_rename_ok): Ditto.
* config/i386/i386.h (ix86_current_function_calls_tls_descriptor):
Ditto.
* config/i386/i386.c (ix86_select_alt_pic_regnum, ix86_save_reg,
ix86_expand_prologue, legitimize_pic_address,
legitimize_tls_address): Ditto.
* config/sh/sh.c (calc_live_regs, sh_media_register_for_return,
sh_expand_prologue, sh_hard_regno_rename_ok): Ditto.
* config/pdp11/pdp11.c (pdp11_output_function_prologue,
pdp11_output_function_epilogue): Ditto.
* config/pdp11/pdp11.h (may_call_alloca): Ditto.
* config/avr/avr.c (avr_regs_to_save, sequent_regs_live,
avr_peep2_scratch_safe): Ditto.
* config/crx/crx.h (HARD_REGNO_RENAME_OK): Ditto.
* config/crx/crx.c (crx_compute_save_regs): Ditto.
* config/c4x/c4x.c (c4x_isr_reg_used_p, c4x_expand_prologue,
c4x_null_epilogue_p): Ditto.
* config/c4x/c4x.h (reg_class): Ditto.
* config/stormy16/stormy16.c (REG_NEEDS_SAVE): Ditto.
* config/fr30/fr30.c (MUST_SAVE_FRAME_POINTER,
MUST_SAVE_RETURN_POINTER): Ditto.
* config/m68hc11/m68hc11.c (m68hc11_initial_elimination_offset,
m68hc11_total_frame_size, expand_prologue): Ditto.
* config/cris/cris.c (cris_reg_saved_in_regsave_area,
cris_return_addr_rtx): Ditto.
* config/iq2000/iq2000.h (MUST_SAVE_REGISTER): Ditto.
* config/iq2000/iq2000.c (iq2000_can_use_return_insn): Ditto.
* config/mt/mt.c (mt_compute_frame_size): Ditto.
* config/mt/mt.h (save_direction): Ditto.
* config/mn10300/mn10300.c (REG_SAVE_BYTES, can_use_return_insn,
mn10300_get_live_callee_saved_regs, expand_prologue,
initial_offset): Ditto.
* config/ia64/ia64.c (find_gr_spill, ia64_compute_frame_size):
Ditto.
* config/m68k/m68k.c (m68k_save_reg, m68k_hard_regno_rename_ok):
Ditto.
* config/rs6000/rs6000.c (rs6000_got_register, first_reg_to_save,
first_fp_reg_to_save, first_altivec_reg_to_save,
compute_vrsave_mask, rs6000_stack_info, create_TOC_reference,
rs6000_emit_prologue): Ditto.
* config/rs6000/rs6000.h (HARD_REGNO_RENAME_OK): Ditto.
* config/arc/arc.c (MUST_SAVE_REGISTER, MUST_SAVE_RETURN_ADDR):
Ditto.
* config/mcore/mcore.c (calc_live_regs): Ditto.
* config/score/score-mdaux.c (score_save_reg_p): Ditto.
* config/arm/arm.c (use_return_insn, thumb_find_work_register,
arm_compute_save_reg0_reg12_mask, arm_compute_save_reg_mask,
arm_get_vfp_saved_size, arm_output_epilogue, thumb_force_lr_save,
arm_get_frame_offsets, arm_expand_prologue, thumb_far_jump_used_p,
thumb_unexpanded_epilogue, thumb_expand_epilogue): Ditto.
* config/arm/arm.h (HARD_REGNO_RENAME_OK): Ditto.
* config/pa/pa.c (compute_frame_size, pa_output_function_prologue,
hppa_expand_prologue, hppa_expand_epilogue,
hppa_can_use_return_insn_p, output_lbranch): Ditto.
* config/pa/pa.h (HARD_REGNO_RENAME_OK): Ditto.
* config/mips/mips.c (mips_global_pointer, mips_save_reg_p,
mips_can_use_return_insn, build_mips16_call_stub): Ditto.
* config/vax/vax.c (vax_output_function_prologue): Ditto.
* config/v850/v850.c (substitute_ep_register,
compute_register_save_size): Ditto.
* config/h8300/h8300.c (byte_reg, h8300_hard_regno_rename_ok):
Ditto.
* config/mmix/mmix.c (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS,
mmix_initial_elimination_offset, mmix_reorg,
mmix_use_simple_return, mmix_expand_prologue,
mmix_expand_epilogue): Ditto.
* config/bfin/bfin.c (n_dregs_to_save, n_pregs_to_save,
n_regs_saved_by_prologue, expand_interrupt_handler_prologue,
expand_interrupt_handler_epilogue, bfin_hard_regno_rename_ok):
Ditto.
* reload1.c (reload, mark_home_live, spill_hard_reg,
finish_spills): Ditto.
* df-scan.c (regs_ever_live): Added as local var.
(df_scan_free_internal): Delete bitmap.
(df_scan_free_bb_info): Inlined code from removed df_bb_delete.
(df_scan_alloc): Removed blocks_to_rescan param and reference to
out_of_date_transfer_functions and added insns_to_notes_rescan.
(df_scan_free): Removed reference to
out_of_date_transfer_functions.
(df_scan_start_dump, df_scan_start_block): Added ";;" in front of
debugging lines.
(problem_SCAN): Added extra null fields.
(df_scan_blocks): Added code to set entry and exit blocks as
dirty.
(df_insn_delete): Added basic block parameter and support for
insns_to_notes_rescan.
(df_bb_delete): Removed.
(df_insn_rescan, df_insn_rescan_all, df_process_deferred_rescans,
df_notes_rescan): Added support for insns_to_notes_rescan.
(df_insn_rescan, df_insn_rescan_all, df_process_deferred_rescans):
Added extra parameter to df_insn_delete.
(df_process_deferred_rescans): Added support to fixup entry and
exit blocks if regs_ever_live changes.
(df_insn_change_bb): Added debugging.
(df_ref_change_reg_with_loc_1): Added code to dirty the block.
(df_insn_contains_asm_1, df_insn_contains_asm): Function moved to
global.c.
(df_insn_refs_record): Removed code to set insn_contains_asm.
(df_bb_refs_record): Now sets itself dirty.
(df_get_entry_block_def_set, df_get_exit_block_use_set):
Encapsulated references to regs_ever_live.
(df_update_entry_block_defs, df_update_exit_block_uses): Added
finer grained control on dirtying the block.
(df_regs_ever_live_p, df_set_regs_ever_live): New functions.
(df_compute_regs_ever_live): New reset parameter.
(df_verify_blocks): Renamed to df_scan_verify and added more
checking code.
* df-core.c (df_add_problem): Initialized solutions_dirty.
(df_finish_pass): Added calls to verify transfer functions.
(rest_of_handle_df_initialize): Added more initialization for
persistent structures.
* (df_hybrid_search_forward, df_hybrid_search_backward,
df_iterative_dataflow, df_analyze_problem): Removed single_pass parameter.
(df_analyze_problem): Added checking for results of dataflow.
(df_analyze): Added more debugging and removed changing
out_of_date_transfer functions.
(df_get_bb_dirty, df_set_bb_dirty, df_compact_blocks): Supports
each problem having it own incremental
status bits.
(df_clear_bb_dirty, df_verify, df_compute_cfg_image,
df_check_cfg_clean, df_set_clean_cfg): New function.
(df_compact_blocks, df_bb_replace): More debugging.
*df.h (df_alloc_function, df_local_compute_function): Removed
blocks_to_scan parameter.
(df_dataflow_function): Removed single_pass parameter.
(df_verify_solution_start, df_verify_solution_end): New function
types.
(dataflow.out_of_date_transfer_functions,
dataflow.solutions_dirty): Moved from df structure so each problem
could have its own copy.
(df_insn_info.contains_asm, DF_INSN_CONTAINS_ASM): Functionality
moved into global.c.
(df.solutions.dirty, out_of_date_transfer_functions): Moved to
struct dataflow.
(df.redo_entry_and_exit, df.insns_to_notes_rescan): New fields.
(DF_DEBUG_CFG): Flag to control code to check if cfg modifications
are being reported to df.
* df-problems.c (df_print_bb_index, df_lr_top_dump,
df_lr_bottom_dump, df_ur_top_dump, df_ur_bottom_dump): Cleanup
more dump info.
(df_ru_alloc, df_ru_local_compute, df_rd_alloc,
df_rd_local_compute, df_lr_alloc, df_lr_local_compute,
df_ur_alloc, df_ur_local_compute, df_live_alloc, df_urec_alloc,
df_urec_local_compute, df_chain_alloc, df_ri_alloc,
df_ri_compute): Removed blocks_to_rescan parameter.
(problem_RU, problem_RD, problem_LR, problem_UR, problem_LIVE,
problem_UREC, problem_RI): Added two new fields.
(df_lr_problem_data, df_ur_problem_data): New data structure to
support checking of dataflow solutions.
(df_lr_alloc, df_lr_local_compute, df_ur_alloc,
df_ur_local_compute, df_ur_free): Now processes only out of date blocks.
(df_lr_reset, df_lr_verify_solution_start,
df_lr_verify_solution_end, df_lr_verify_transfer_functions,
df_ur_reset, df_ur_local_finalize, df_ur_verify_solution_start,
df_ur_verify_solution_end, df_ur_verify_transfer_functions): New function.
(df_lr_bb_local_compute, df_lr_local_compute): Moved asm scanning to global.c.
(df_lr_local_finalize, df_lr_free, df_live_local_finalize): Added
code to support incremental checking of dataflow solution.
* passes.c (pass_free_cfg): Moved to before machine_reorg.
* cfgrtl.c (rtl_delete_block, rtl_merge_blocks,
cfg_layout_merge_blocks): Changed df_delete_basic_blocks to
df_bb_delete.
(update_bb_for_insn): Changed df_insn_rescan to df_insn_change_bb.
(force_nonfallthru_and_redirect): Added call to
df_mark_solutions_dirty.
* dce.c (dce_process_block): Added more checking code and made the
code closer to the functionality in df_lr.
(fast_dce): Now skips entry and exit blocks. Deleted last parm to
df_analyze_problem and removed changed bitmap.
* fwprop.c (update_df, try_fwprop_subst): Added calls to df_set_bb_dirty.
* cfg.c (connect_src, connect_dest, disconnect_src,
disconnect_dest): Added calls to df_mark_solutions_dirty.
* haifa-sched.c (move_succs): Ditto.
* ifcvt.c (find_cond_trap): Moved calls to df_set_bb_dirty to
before deletion of basic block.
* emit-rtl.c (set_insn_deleted, remove_insn): Added basic block
parm.
* regclass.c (regclass_init): Added reset parm to df_compute_res_ever_live.
2006-12-28 Kenneth Zadeck <zadeck@naturalbridge.com>
* local_alloc.c (rest_of_handle_local_alloc): changed
extra_warnings to warn_clobbered.
2006-12-25 Kenneth Zadeck <zadeck@naturalbridge.com>
* dce.c (delete_corresponding_reg_eq_notes): Added comment.
(delete_unmarked_insns): Added code to delete noop moves
inside of libcalls. Changed to used delete_insn_and_edges.
2006-12-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/spu/spu.c (immediate_load_p): Change usage of
flow2_completed over to epilogue_completed.
2006-12-22 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-problems.c (df_ru_start_dump, df_ru_top_dump,
df_ru_bottom_dump, df_rd_start_dump, df_rd_top_dump,
df_rd_bottom_dump, df_lr_top_dump, df_lr_bottom_dump,
df_ur_top_dump, df_ur_bottom_dump, df_live_top_dump,
df_urec_top_dump, df_urec_bottom_dump, df_chain_start_dump,
df_ri_start_dump): Added ";; " to the beginning of dataflow
information put in dump files.
* dce.c (marked_libcalls, delete_unmarked_insns): Removed.
(prescan_insns_for_dce, mark_libcall, dce_process_block,
prescan_insns_for_dse): Replaced libcall marking mechanism.
(init_dce, end_dce, end_fast_dce, run_fast_df_dce): Removed
marked_libcalls.
2006-12-16 Kenneth Zadeck <zadeck@naturalbridge.com>
* regrename.c (mrege_overlapping_regs): Removed df parameter
and changed calls to df_ routines to support new incremental
scanning.
* sched_ebb (schedule_ebbs): Removed return value and changed
calls to df_ routines to support new incremental scanning.
* fwprop.c (local_ref_killed_between_p, use_killed_between,
all_uses_available_at, update_df, try_fwprop_subst, fwprop,
fwprop_addr): Removed df parameter and changed calls to df_
routines to support new incremental scanning.
(gate_fwprop, gate_fwprop_addr): Reenabled pass.
* doc/cfg.texi: Updated liveness info documentation.
* doc/rtl.texi: Updated liveness info documentation.
* see.c (see_initialize_data_structures, see_emit_use_extension,
see_commit_changes, see_analyze_merged_def_local_prop,
see_analyze_use_local_prop, see_set_prop_merged_def,
see_set_prop_unmerged_use, see_store_reference_and_extension,
see_handle_relevant_defs, see_handle_relevant_uses,
see_update_uses_relevancy, see_propagate_extensions_to_uses,
pass_see): Removed df parameter and changed calls to df_ routines
to support new incremental scanning.
* postreload.c (reload_cse_simplify_operands): Changed REGNO to
SET_REGNO.
(reload_combine): Removed df parameter and changed calls to df_
routines to support new incremental scanning.
* tree.h (generate_setjmp_warnings): Removed df parameter.
* reload.c (push_reload, find_dummy_reload): Removed df parameter
and changed calls to df_ routines to support new incremental
scanning.
* tree-pass.h (pass_df_initialize, pass_df_finish): New passes.
* rtlanal.c (remove_note): Call df_notes_rescan if the
REG_EQUAL/EQUIV notes change.
* ddg.c (add_deps_for_def, add_deps_for_use,
add_inter_loop_mem_dep): Removed df parameter and changed calls to
df_ routines to support new incremental scanning.
* ddg.h (struct df) Removed.
* final.c (cleanup_subreg_operands): Added call df_insn_rescan if
insn changes.
(walk_alter_subreg): Added changed parameter to track changes.
(output_address): Added changed parameter to walk_alter_subreg.
* cfg.c (compact_blocks, dump_bb_info): Removed df parameter to df_
calls.
* auto_inc_dec.c (attempt_changed): Moved call to
df_recompute_luids so that it is only called when moves are added.
(find_inc, merge_in_block, rest_of_handle_auto_inc_dec): Removed
df parameter and changed calls to df_ routines to support new
incremental scanning.
(merge_in_block): Added call to df_recompute_luids.
* reorg.c (delete_from_delay_slot, relax_delay_slots): Added basic
block parm to add_insn_after.
(fill_simple_delay_slots, fill_slots_from_thread,
fill_eager_delay_slots, make_return_insns, dbr_schedule): Removed
df parameter and changed calls to df_ routines to support new
incremental scanning.
* df-scan.c (struct df_reg_chains): Removed.
(df_scan_free_internal, df_scan_free_internal,
df_scan_free_bb_info, df_scan_alloc, df_scan_free,
df_scan_start_dump, df_scan_add_problem, df_grow_reg_info,
df_check_and_grow_ref_info, df_grow_insn_info, df_scan_blocks,
df_ref_create, df_scan_alloc, df_scan_start_block,
df_scan_add_problem, df_grow_reg_info, df_check_and_grow_ref_info,
df_grow_insn_info, df_scan_blocks, df_ref_create,
df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink,
df_ref_remove, df_insn_create_insn_record,
df_ref_chain_delete_du_chain, df_ref_chain_delete, df_insn_delete,
df_bb_delete, df_insn_rescan, df_reorganize_refs,
df_insn_change_bb, df_maybe_reorganize_use_refs,
df_maybe_reorganize_def_refs, df_reg_chain_find_ref,
df_ref_find_chains, df_ref_add_to_chains, df_refs_add_to_chains,
df_ref_create_structure, df_ref_record, df_def_record_1,
df_defs_record, df_uses_record, df_get_conditional_uses,
df_get_call_refs, df_get_call_refs, df_insn_refs_collect,
df_insn_refs_record, df_recompute_luids, df_bb_refs_collect,
df_bb_refs_record, df_bb_refs_record, df_mark_reg,
df_get_entry_block_def_set, df_entry_block_defs_collect,
df_record_entry_block_defs, df_update_entry_block_defs,
df_exit_block_uses_collect, df_record_exit_block_uses,
df_update_exit_block_uses, df_compute_regs_ever_live,
df_reg_chain_unmark, df_ref_chain_free, df_ref_verify,
df_ref_verify, df_insn_refs_verify, df_bb_verify,
df_exit_block_bitmap_verify, df_entry_block_bitmap_verify,
df_verify_blocks): Removed df and dflow parameters and changed
calls to df_ routines to support new incremental scanning.
(df_ref_chain_unmark): Renamed to df_ref_chain_verify_and_unmark.
(df_scan_get_bb_info, df_scan_set_bb_info): Made tolerant of
missing basic block info.
(df_insn_rescan_all, df_process_deferred_rescans,
df_ref_chain_find_ref_by_regno, df_ref_change_reg_with_loc_1,
df_ref_change_reg_with_loc,
df_mw_hardreg_chain_delete_eq_uses, df_notes_rescan,
df_update_entry_exit_and_calls, df_hard_reg_used_p,
df_mw_hardreg_find_hardreg): New function.
(df_ref_is_pointer_equal, df_bb_refs_verify): Deleted function.
* haifa_sched.c (move_insn): Removed df parameter and changed calls to
df_ routines to support new incremental scanning.
* df-core.c (df_init): Deleted function.
(df): New static instance of dataflow.
(df_add_problem, df_remove_problem, df_set_flags, df_clear_flags,
df_set_blocks, df_delete_basic_block, df_hybrid_search_forward,
df_hybrid_search_backward, df_iterative_dataflow,
df_analyze_problem, df_analyze, df_get_n_blocks, df_get_postorder,
df_mark_solutions_dirty, df_get_bb_dirty, df_set_bb_dirty,
df_compact_blocks, df_bb_replace, df_bb_regno_last_use_find,
df_bb_regno_first_def_find, df_bb_regno_last_def_find,
df_insn_regno_def_p, df_find_def, df_reg_defined, df_find_use,
df_reg_used, df_dump, df_dump_start, df_dump_top, df_dump_bottom,
df_regs_chain_dump, df_insn_uid_debug, df_insn_debug,
df_insn_debug_regno, df_regno_debug, debug_df_insn, debug_df_reg,
debug_df_defno, debug_df_useno): Removed df parameter and
changed calls to df_ routines to support new incremental scanning.
(df_finish1): Deleted function.
(df_remove_problem, df_finish_pass, rest_of_handle_df_initialize,
rest_of_handle_df_finish): New function.
(pass_df_finish, pass_df_initialize): New passes.
* mode-switching.c (optimize_mode_switching): Removed df parameter and
changed calls to df_ routines to support new incremental scanning.
* modulo-sched.c (sms_schedule): Removed df parameter and
changed calls to df_ routines to support new incremental scanning.
(add_insn_before): Added extra parameter to add_insn_before.
* caller-save.c (init_caller_save): Changed REGNO to SET_REGNO.
* cse.c (cse_main): Disabled incremental df update during this
pass.
* web.c (union_defs, replace_ref, web_main, pass_web): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* loop-init.c (rtl_unroll_and_peel_loops,
pass_rtl_move_loop_invariants): Removed df parameter and changed
calls to df_ routines to support new incremental scanning.
* global.c (global_alloc, global_conflicts, retry_global_alloc,
mark_elimination, build_insn_chain, rest_of_handle_global_alloc):
Removed df parameter and changed calls to df_ routines to support
new incremental scanning.
* ifcvt.c (, find_if_header, find_if_case_1, find_if_case_2,
dead_or_predicable, if_convert, pass_rtl_ifcvt,
pass_if_after_combine, pass_if_after_reload): Removed df parameter
and changed calls to df_ routines to support new incremental
scanning.
* expr.c (init_expr_once): Changed REGNO to SET_REGNO.
* recog.c (peephole2_optimize, pass_split_all_insn): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* regmove.c (mark_flags_life_zones, optimize_reg_copy_2,
regmove_optimize, rest_of_handle_stack_adjustments): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* local-alloc.c (block_alloc, rest_of_handle_local_alloc): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* function.c (regno_clobbered_at_setjmp, setjmp_vars_warning,
setjmp_args_warning, generate_setjmp_warnings,
keep_stack_depressed, thread_prologue_and_epilogue_insns,
epilogue_done, rest_of_handle_thread_prologue_and_epilogue): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* function.h (df): Deleted variable.
* df.h (DF_RU, DF_RD, DF_LR, DF_UR, DF_LIVE): Renumbered to put
permanent problems before optional problems.
(DF_FIRST_OPTIONAL_PROBLEM): New symbol.
(df_ref_flags.DF_REF_REF_MARKER, df_ref_flags.DF_REF_REG_MARKER): New flag.
(df_ref_flags.DF_REF_ARTIFICIAL, df_ref_flags.DF_REF_MARKER):
Deleted flag.
(df_alloc_function, df_reset_function, df_free_bb_function,
df_local_compute_function, df_init_function, df_dataflow_function,
df_confluence_function_0, df_confluence_function_n,
df_transfer_function, df_finalizer_function, df_free_function,
df_remove_problem_function, df_dump_problem_function,
df_dump_bb_problem_function, DF_SCAN_BB_INFO, DF_RU_BB_INFO,
DF_RD_BB_INFO, DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_BB_INFO,
DF_LIVE_IN, DF_LIVE_OUT, DF_RA_LIVE_IN, DF_RA_LIVE_OUT,
DF_RA_LIVE_TOP, DF_LR_IN, DF_LR_OUT, DF_UR_IN, DF_UR_OUT,
DF_DEFS_GET, DF_DEFS_SET, DF_DEFS_COUNT, DF_DEFS_BEGIN,
DF_USES_GET, DF_USES_SET, DF_USES_COUNT, DF_USES_BEGIN,
DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_CHAIN, DF_REG_DEF_COUNT,
DF_REG_USE_GET, DF_REG_USE_CHAIN, DF_REG_USE_COUNT,
DF_REG_EQ_USE_GET, DF_REG_EQ_USE_CHAIN, DF_REG_EQ_USE_COUNT,
DF_REGNO_FIRST_DEF, DF_REGNO_LAST_USE, DF_REGNO_FIRST_DEF,
DF_REGNO_LAST_USE, DF_INSN_SIZE, DF_INSN_GET, DF_INSN_SET,
DF_INSN_CONTAINS_ASM, DF_INSN_LUID, DF_INSN_DEFS, DF_INSN_USES,
DF_INSN_EQ_USES, DF_INSN_UID_GET, DF_INSN_UID_SAFE_GET,
DF_INSN_UID_LUID, DF_INSN_UID_DEFS, DF_INSN_UID_USES,
DF_INSN_UID_EQ_USES, DF_INSN_UID_MWS): Removed df or dflow
parameter and changed calls to df_ routines to support new
incremental scanning.
(DF_DEFS_SIZE, DF_USES_SIZE): Renamed to DF_DEFS_TABLE_SIZE and
DF_USES_TABLE_SIZE.
(DF_DEFS_TOTAL_SIZE, DF_USES_TOTAL_SIZE, df_scan, df_ru, df_rd,
df_lr, df_ur, df_live, df_urec, df_chain, df_ri,
DF_DEFS_TOTAL_SIZE, DF_USES_TOTAL_SIZE): New macros.
(dataflow.df): Removed field.
(df_ref_info.bitmap_size): Split into df_ref_info.table_size and
df_ref_info.total_size.
(dataflow.local_flags, df_insn_info.insn,
df_changeable_flags.DF_DEFER_INSN_RESCAN, df_ref_info.count,
df.insns_to_rescan, df.insns_to_delete): New field.
(df_permanent_flags): Split into df_chain_flags and df_ri_flags.
* gcse (try_replace_reg, adjust_libcall_notes,
update_ld_motion_stores): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
(insert_insn_end_basic_block, insert_insn_start_basic_block):
Added bb parameter to emit_insn_before_noloc.
* rtl-factoring.c (match_seqs, collect_pattern_seqs,
collect_pattern_seqs, clear_regs_live_in_seq,
recompute_gain_for_pattern_seq,, recompute_gain,
split_blocks_after_seqs, split_pattern_seq, erase_matching_seqs,
abstract_best_seq, rtl_seqabstr): Removed df parameter and changed
calls to df_ routines to support new incremental scanning.
* expmed.c (init_expmed): Changed REGNO to SET_REGNO.
* bt-load.c (, compute_defs_uses_and_gen, build_btr_def_use_webs,
migrate_btr_defs, branch_target_load_optimize,
pass_branch_target_load_optimize1,
pass_branch_target_load_optimize1): Removed df parameter and changed
calls to df_ routines to support new incremental scanning.
* emit-rtl.c (add_insn_after, add_insn_before,
emit_insn_before_noloc, emit_insn_after_1,
emit_insn_after_noloc): Added basic block parameter and threaded
it to subcalls.
(emit_jump_insn_before_noloc,
emit_call_insn_before_noloc, emit_barrier_before,
emit_label_before, emit_note_before, emit_call_insn_after_noloc,
emit_jump_insn_after_noloc, emit_label_after, emit_note_after,
emit_insn_after_setloc, emit_insn_before_setloc): Add NULL basic
block parameter to certain subcalls.
(set_unique_reg_note): Now calls df_notes_rescan if REG_EQUAL or
REG_EQUIV notes change.
* loop-invariant.c (check_invariant_table_size,
hash_invariant_expr_1, invariant_expr_equal_p, find_defs,
check_dependencies, record_uses, find_invariants_to_move,
move_invariant_reg, fail, free_inv_motion_data,
move_loop_invariants): Removed df parameter and changed
calls to df_ routines to support new incremental scanning.
* subregs_init (initialize_uninitialized_subregs): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* loop-iv.c (iv_current_loop_df): Deleted function.
(check_iv_ref_table_size, clear_iv_info, iv_analysis_loop_init,
latch_dominating_def, iv_get_reaching_def, iv_get_reaching_def,
iv_analyze, iv_analyze_result, biv_p, iv_analysis_done): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* regclass.c (regclass_init): Insert call to recalculate the
effects of changing regs_ever_live.
(init_reg_autoinc): Changed REGNO to SET_REGNO.
* rtl.h (REGNO): Changed so that it cannot appear on lhs.
(SET_REGNO): New macro.
(rhs_regno): New function.
(basic_block): New forward declaration.
* integrate.c (allocate_initial_values): Changed REGNO to
SET_REGNO and removed df parameter and changed calls to df_
routines to support new incremental scanning.
* combine.c (set_nonzero_bits_and_sign_copies, subst,
reg_nonzero_bits_for_combine, reg_num_sign_bit_copies_for_combine,
get_last_value_validate, get_last_value, reg_dead_at_p,
create_log_links, create_log_links, rest_of_handle_combine,
pass_combine): Removed df parameter and changed calls to df_
routines to support new incremental scanning.
* stack-ptr-mod.c (notice_stack_pointer_modification): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* resource.c (mark_target_live_regs): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* resource.h (mark_target_live_regs): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* cfgloop.h (iv_current_loop_df): Removed.
* df-problems.c (df_get_live_in, df_get_live_out,
df_ru_get_bb_info, df_ru_set_bb_info, df_ru_free_bb_info,
df_ru_alloc, df_ru_bb_local_compute_process_def,
df_ru_bb_local_compute_process_use, df_ru_bb_local_compute,
df_ru_local_compute, df_ru_init_solution, df_ru_confluence_n,
df_ru_transfer_function, df_ru_free, df_ru_start_dump,
df_ru_top_dump, df_ru_bottom_dump, df_ru_add_problem,
df_rd_get_bb_info, df_rd_set_bb_info, df_rd_free_bb_info,
df_rd_alloc, df_rd_bb_local_compute_process_def,
df_rd_bb_local_compute, df_rd_local_compute, df_rd_init_solution,
df_rd_confluence_n, df_rd_transfer_function, df_rd_free,
df_rd_start_dump, df_rd_top_dump, df_rd_bottom_dump,
df_rd_add_problem, df_lr_get_bb_info, df_lr_set_bb_info,
df_lr_free_bb_info, df_lr_alloc, df_lr_bb_local_compute,
df_lr_local_compute, df_lr_init, df_lr_confluence_0,
df_lr_confluence_n, df_lr_transfer_function, df_lr_local_finalize,
df_lr_free, df_lr_simulate_artificial_refs_at_end,
df_lr_simulate_one_insn, df_lr_top_dump, df_lr_bottom_dump,
df_lr_add_problem, df_ur_get_bb_info, df_ur_set_bb_info,
df_ur_free_bb_info, df_ur_alloc, df_ur_bb_local_compute,
df_ur_local_compute, df_ur_init, df_ur_confluence_n,
df_ur_transfer_function, df_ur_free, df_ur_top_dump,
df_ur_bottom_dump, df_ur_add_problem, df_live_get_bb_info,
df_live_set_bb_info, df_live_free_bb_info, df_live_alloc,
df_live_local_finalize, df_live_free, df_live_top_dump,
df_live_add_problem, df_urec_get_bb_info, df_urec_set_bb_info,
df_urec_free_bb_info, df_urec_alloc, df_urec_bb_local_compute,
df_urec_local_compute, df_urec_init, df_urec_local_finalize,
df_urec_confluence_n, df_urec_transfer_function, df_urec_free,
df_urec_top_dump, df_urec_bottom_dump, df_urec_add_problem,
df_chain_create, df_chain_unlink, df_chain_copy,
df_chain_remove_problem, df_chain_alloc, df_chain_reset,
df_chain_create_bb_process_use, df_chain_create_bb,
df_chain_finalize, df_chain_free, df_chain_start_dump,
df_chain_add_problem, df_ri_alloc, df_kill_notes,
df_set_dead_notes_for_mw, df_set_unused_notes_for_mw,
df_create_unused_note, df_ri_bb_compute, df_ri_compute,
df_ri_free, df_ri_start_dump, df_ri_add_problem,
df_ri_get_setjmp_crosses): Removed df and dflow parameters and
changed calls to df_ routines to support new incremental scanning.
(df_chain_unlink_1, df_chain_fully_remove_problem): New function.
* reg-stack.c (reg_to_stack): Removed df parameter and changed
calls to df_ routines to support new incremental scanning.
* Makefile.in (rtlanal.o, expr.o, expmed.o, cse.o, gcse.o,
regclass.o, caller-save.o, stack-ptr-mod.o, final.o): Added df.h.
(reorg.o): Deleted df.h.
* sched-rgn.c (check_live_1, update_live_1, schedule_insns):
Removed df parameter and changed calls to df_ routines to support
new incremental scanning.
* basic-block.h (forward for basic_block): Moved to rtl.h.
* passes.c (pass_df_initialize, pass_df_finish): New passes.
(execute_todo): Changed TODO_df_finish.
* struct-equiv.c (insns_match_p, struct_equiv_init): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
* config/frv/frv.c (frv_function_prologue, frv_int_to_acc):
Changed REGNO to SET_REGNO.
(frv_reorder_packet): Added null basic block parm to
add_insn_before.
* config/i386/i386.c (ix86_eax_live_at_start_p): Removed df
parameter and changed calls to df_ routines to support new
incremental scanning.
(ix86_expand_prologue, ix86_output_function_epilogue):
Changed REGNO to SET_REGNO.
* config/ia64/ia64.c (emit_predicate_relation_info, ia64_reorg):
Removed df parameter and changed calls to df_ routines to support
new incremental scanning.
* config/mips/mips.c (mips_expand_prologue): Changed REGNO to
SET_REGNO.
* cfgrtl.c (commit_one_edge_insertion, rtl_dump_bb,
print_rtl_with_bb, cfg_layout_merge_blocks,
insert_insn_end_bb_new): Added bb parameter to insn insert calls.
* dce.c (prescan_insns_for_dce): Removed fast parameter.
(init_dce, end_dce, mark_artificial_uses, mark_reg_dependencies,
end_fast_dce, dce_process_block, fast_dce, run_fast_df_dce,
rs_init, rs_confluence, rs_transfer_function, dump_stores,
record_store, mark_dependent_stores, prescan_insns_for_dse,
rest_of_handle_dse): Removed df parameter and changed calls to df_
routines to support new incremental scanning.
(rest_of_handle_dce, gate_dce, run_dce, pass_rtl_dce): Deleted.
(delete_corresponding_reg_equal_notes): Renamed to
delete_corresponding_reg_eq_notes and made to process both kinds
of notes.
(delete_unmarked_insns): Changed call to
delete_corresponding_reg_eq_notes.
* dce.h (run_fast_df_dce): Removed df parameter.
* reload1.c (compute_use_by_pseudos, reload): Removed df parameter
and changed calls to df_ routines to support new incremental
scanning.
(alter_reg): Changed REGNO to SET_REGNO.
2006-12-07 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/predicates.md (lwa_operand): Allow PRE_MODIFY
indexed address.
* config/rs6000/rs6000-protos.h (legitimate_indexed_address_p):
Declare.
* config/rs6000/rs6000.c (legitimate_indexed_address_p): Remove
static.
2006-12-07 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/predicates.md (lwa_operand): Exclude PRE_MODIFY
addresses.
2006-12-01 Seongbae Park <seongbae.park@gmail.com>
* dbgcnt.def: New counters
* postreload-gcse.c (delete_redundant_insns_1): New
debug counter point.
* postreload.c (reload_cse_move2add, gate_handle_postreload):
New debug counter point.
* auto-inc-dec.c (move_notes): Removed.
(move_dead_notes): New function.
(attempt_change): Call move_dead_notes(). Add missing dependency check.
* haifa-sched.c (schedule_block): New debug counter point.
* cse.c (delete_trivially_dead_insns): New debug counter point.
* gcse.c (pre_delete): New debug counter point.
* Makefile.in: Adding dependency on DBGCNT_H.
* sched-rgn.c (schedule_region): New debug counter point.
* dce.c (delete_corresponding_reg_equal_notes): New function
(delete_unmarked_insns): Call delete_corresponding_reg_equal_notes.
2006-11-28 Seongbae Park <seongbae.park@gmail.com>
* dbgcnt.def: Updated comments. Added new counters.
* auto-inc-dec.c (try_merge): Debug counter.
* global.c (global_conflicts): Use DF_RA_LIVE_TOP() instead of
df_urec_get_live_at_top().
* dbgcnt.c (count, limit): Use dbgcnt.def.
(dbg_cnt_is_enabled): New function.
(dbg_cnt): Use dbg_cnt_is_enabled().
* local-alloc.c (block_alloc): Use DF_RA_LIVE_TOP instead of LIVE_IN.
Add a debug counter.
* df.h (DF_RA_LIVE_TOP): New Macro. Remove df_urec_get_live_at_top.
(struct df_rd_bb_info): Added new fields ADEF, AUSE and TOP.
(struct df_urec_bb_info): Added new field TOP.
* loop-iv.c (iv_analyze_def): Added REG_P check.
* df-problems.c (df_lr_free_bb_info): Free new fields AUSE, ADEF and
TOP.
(df_lr_alloc): Allocate new fields TOP, ADEF, AUSE.
(df_lr_bb_local_compute): Compute ADEF and AUSE.
(df_lr_transfer_function): Compute TOP, and then IN based on TOP, ADEF
and AUSE.
(df_lr_free): Free new fields AUSE, ADEF and TOP.
(df_ur_bb_local_compute): Partial/conditional defs don't hide
earlier defs.
(df_urec_alloc): Allocate new field TOP.
(df_urec_local_finalize): Calculate TOP as well as IN.
(df_urec_free): Free new field TOP.
(df_urec_get_live_at_top): Removed.
* Makefile.in (auto-inc-dec.o, local-alloc.o, sched-rgn.o,
sched-ebb.o, recog.o): Added dependency on DBGCNT_H.
* sched-rgn.c (schedule_insns, gate_handle_sched, gate_handle_sched2):
Added debug counter.
* config/ia64/ia64.c (enum ia64_frame_regs): New enum.
(struct ia64_frame_info): Changed register fields to use an array
index by enum.
(emitted_frame_related_regs): New static variable.
(reg_emitted, get_reg, is_emitted): New function.
(ia64_reload_gp): Use new enum.
(find_gr_spill): Added a new param. Use emitted_frame_related_regs.
(ia64_computea_frame_size, ia64_hard_regno_rename_ok,
ia64_epilogue_uses):
Use emitted_frame_related_regs.
(ia64_expand_prologue): Extra deubg output. Use new enum.
(ia64_expand_epilogue, ia64_direct_return, ia64_split_return_addr_rtx,
ia64_output_function_prologue, ia64_output_function_epilogue,
process_set):
Use new enum.
(ia64_init_expanders): New function.
(ia64_reorg): New debug counter.
* config/ia64/ia64.h (INIT_EXPANDERS): New call to
ia64_init_expanders.
2006-11-18 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (print_current_pass, debug_pass): New functions.
* passes.c (print_current_pass, debug_pass): New functions.
(exec_todo): Changed call to df_verify_blocks.
(current_pass): New variable.
* auto-inc-dec.c (attempt_change): Removed redundant call to
df_insn_rescan and added debugging.
(find_inc): Added debugging and fixed post-inc/dec bug.
(merge_in_block): Fixed post-inc/dec bug.
* dbgcnt.c: Fixed comments.
* dbgcnt.c: Fixed comments.
* loop-init.c (rtl_unroll_and_peel_loops): Added debugging.
* loop-invariant.c (find_defs): Added debugging.
* loop-iv.c (iv_analysis_loop_init): Added debugging.
* df-scan.c (df_ref): Added parameter to control the deletion of
chains.
(df_reg_chain_unlink): Take care not to delete non existent refs.
(df_ref_remove): Changed call to df_reg_chain_unlink.
(df_ref_chain_delete_du_chain, df_ref_chain_delete,
df_mw_hardreg_chain_delete): New function
(df_insn_delete): Now calls df_ref_chain_delete_du_chain,
df_ref_chain_delete, df_mw_hardreg_chain_delete.
(df_bb_delete): Now calls df_ref_chain_delete_du_chain,
df_ref_chain_delete.
(df_insn_rescan): Now supports DF_NO_INSN_RESCAN and added
debugging.
(df_ref_verify): Added code to ignore refs from notes in the table
of refs.
(df_bb_verify, df_exit_block_bitmap_verify,
df_entry_block_bitmap_verify, df_verify_blocks): Made it possible
to abort closer to source of problem.
(df_verify_blocks): Removed dflow parameter. * df-core.c
(df_insn_uid_debug, df_ref_debug): Fixed debugging. *
df-problems.c (df_ru_bb_info, df_rd_bb_info, df_lr_bb_info,
df_ur_bb_info, df_live_bb_info, df_urec_bb_info): Made tolerant of
newly added basic blocks.
(df_chain_alloc): Tolerant of missing refs in structure.
(df_chain_insn_reset, df_chain_bb_reset, df_chain_remove_problem):
Deleted function.
(df_chain_alloc): New function.
(df_chain_reset): Now just calls df_chain_remove_problem.
* df.h: (DF_NO_REGS_EVER_LIVE): New flag.
2006-11-17 Kenneth Zadeck <zadeck@naturalbridge.com>
* fwprop.c Removed bad version.
* tree-ssa-pre.c (init_pre): Added parameter to post_order_compute.
2006-11-15 Seongbae Park <seongbae.park@gmail.com>
* df-scan.c (df_insn_refs_collect): Code cleanup
for COND_EXEC handling.
(df_need_static_chain_reg): New function.
(df_get_entry_block_def_set): Check and add the static chain register.
* ifcvt.c (if_convert): Don't ignore the return value
of find_if_header.
2006-11-14 Seongbae Park <seongbae.park@gmail.com>
* function.c (thread_prologue_and_epilogue_insns):
Update regs_ever_live during df scanning.
2006-11-14 Seongbae Park <seongbae.park@gmail.com>
* dbgcnt.c, dbgcnt.h: Added missing copyright notice. Now uses
dbgcnt.def for the list of counters.
* Makefile.in: Add missing dbgcnt.h header file dependencies.
* dbgcnt.def: New file.
2006-11-14 Seongbae Park <seongbae.park@gmail.com>
* tree-tailcall.c (execute_tail_recursion): Added dbg_cnt().
* df-scan.c (df_mw_hardreg_find_hardreg, df_get_conditional_uses,
df_get_call_refs):
New function.
(df_refs_add_to_chains): Don't add duplicate mw_hardreg.
(df_ins_refs_collect): Refactored to use df_get_conditional_uses
and df_get_call_refs.
(df_insn_refs_verify): Find the matching mw_hardreg.
* dbgcnt.c (dbg_cnt_process_opt): Fix a bug handling multiple
counters. Add a new debug counter tail_call.
* dbgcnt.h (enum debug_counter): Added a new counter tail_call.
* calls.c (expand_call): Check dbg_cnt(tail_call).
* df_problems.c (df_create_unused_note, df_ri_bb_compute):
Handle NULL LOC case.
* dce.c (init_dce): Add a debug dump.
2006-11-14 Paolo Bonzini <bonzini@gnu.org>
Merge from mainline:
2006-11-14 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/29798
* fwprop.c (use_killed_between): Check that DEF_INSN dominates
TARGET_INSN before any other check.
(fwprop_init): Always calculate dominators.
(fwprop_done): Always free them.
2006-11-13 Seongbae Park <seongbae.park@gmail.com>
Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (TODO_df_verify_scan): New flag.
* auto-inc-def.c (find_inc): Added code to check for case where
output of inc is not overwritten by mem to be combined.
* df-scan.c (df_scan_set_bb_info): Now increases the size of the
array if necessary.
(df_scan_blocks): Added flag to avoid recomputing regs_ever_live.
(df_insn_rescan): Fixed missing case for rescanning.
(df_insn_refs_collect): Special case for sibling calls. Changed
to not set up loc field with address of regno_reg_rtx element.
(df_entry_block_defs_collect, df_exit_block_uses_collect,
df_bb_refs_collect): Changed to not set up loc field with address
of regno_reg_rtx element.
(df_bb_refs_record): Removed dflow parameter and added scan_insn
parameter. Changed call to df_bb_refs_record.
(df_compute_regs_ever_live): New function.
(df_reg_chain_unmark): Made to accept NULL blocks parameter.
(df_ref_chain_unmark): New function.
(df_ref_verify): Added abort_if_fail parameter.
(df_insn_refs_verify): Added abort_if_fail and return_refs
parameter and changed function to return bool. Added code to
unmark chains.
(df_bb_refs_verify): Added abort_if_fail parameter and now returns
nothing.
(df_bb_verify): Changed to expect subroutines to abort.
(df_verify_blocks): Now accepts NULL blocks parameter.
* ifcvt.c (if_convert): Added more to dump_files.
* (pass_rtl_ifcvt, pass_if_after_combine, pass_if_after_reload):
added TODO_df_verify_scan.
* opts.c (command_handle_option): New flag OPT_fdbg_cnt_
* recog.c (confirm_change_group): Fixed updating of df scanning.
* function.c (thread_prologue_and_epilogue_insns):
Pass DF_NO_REGS_EVER_LIVE in df_init, and
call df_compute_regs_ever_live after prologue is generated.
* df.h (enum df_ref_flags): Added DF_REF_ARTIFICIAL.
(enum df_changeable_flags): Added DF_NO_REGS_EVER_LIVE.
(DF_REF_IS_ARTIFICIAL): Added checking for the flag DF_REF_ARTIFICIAL.
* cfgcleanup.c: Fixed typo in comment.
* common.opt: New flag -fdbg-cnt=
* combine.c (try_combine): Added calls to keep df_scanning up to
date.
(pass_combine): Added TODO_df_verify_scan.
* Makefile.in: New gcc object file dbgcnt.o
* passes.c (execute_todo): Added support for TODO_df_verify_scan.
* config/ia64/ia64.c (ia64_split_return_addr_rtx): Finalize
the frame layout early.
(ia64_expand_prologue): Pass DF_NO_REGS_EVER_LIVE to df_init().
* cfgrtl.c (rtl_delete_block, rtl_merge_blocks,
cfg_layout_merge_blocks): Added debugging.
* dbgcnt.c, dbgcnt.h: New files
* dce.c (delete_unmarked_insns): Use dbg_cnt.
(delete_insn_p): Do not delete unspecs.
2006-11-10 Seongbae Park <seongbae.park@gmail.com>
* fwprop.c (forward_propagate_into): Use DF_REF_IS_ARTIFICIAL()
instead of DF_REF_ARTIFICIAL flag.
* df-scan.c (df_ref_record, df_def_record_1): Remove record_live
(df_get_exit_block_use_set, df_get_entry_block_def_set):
Renamed from df_get_{exit_block_uses,entry_block_defs}.
(df_compute_regs_ever_live, df_ref_chain_change_bb,
df_ref_is_record_live, df_reg_chain_unmark, df_ref_chain_free):
New functions.
(df_reg_chains): New structure
(df_ref_add_to_chains):
(df_scan_blocks): Add call to df_compute_regs_ever_live().
(df_ref_create): Remove record_live, and replace DF_REF_ARTIFICIAL
flag use with DF_REF_IS_ARTIFICIAL () macro.
(df_insn_rescan): Avoid marking blocks dirty if nothing changed.
(df_insn_change_bb): Refactored to use df_ref_change_bb.
(df_ref_is_equal): Now ignores DF_REF_MARKER flag.
(df_ref_chain_find_ref, df_reg_chain_find_reg): Fix the order of
parameters to the evaluation function.
(df_ref_find_chains): Avoid early evaluation of certain fields.
(df_ref_add_to_chains): Remove update to regs_ever_live.
(df_refs_add_to_chains): Use DF_REF_NEXT_REF macro.
(df_ref_record): Remove DF_REF_RECORD_LIVE.
(df_insn_refs_record): Now takes the reference list to be added as
an argument.
(df_bb_refs_record): Handles entry and exit block cases.
(df_bb_refs_collect): Removed DF_REF_ARTIFICIAL.
(df_refs_record): Scan entry and exit blocks first.
(df_ref_verify): Takes reg_chain cache as an argument,
verifies hardreg chain.
(df_exit_block_bitmap_verify): Renamed from df_exit_block_verify
(df_entry-block_bitmap_verify): Renamed from df_entry_block_verify
(df_verify_blocks): Implement regchain cache. Assert immediately
when verification fails in any subfunctions.
* df.h (enum df_ref_flags): Remove DF_REF_ARTIFICIAL and renumber the
enum.
(DF_REF_IS_ARTIFICIAL, DF_REF_MARK, DF_REF_UNMARK, DF_REF_IS_MARKED,
DF_INSN_UID_SAFE_GET): New macros:
2006-11-08 Kenneth Zadeck <zadeck@naturalbridge.com>
* auto-inc-dec.c (attempt_change): Added code to properly maintain
reg_next_inc_use when inc insns are deleted.
(merge_in_block): Added debugging and changed to skip deleted
instructions.
(scan_dflow): Removed variable.
* df-scan.c (df_scan_alloc): Always processes entire function.
(df_scan_free): Removed df->blocks_to_scan.
(df_scan_blocks): Removed blocks_parameter. Now scan entire
function.
(df_insn_rescan, df_insn_change_bb): Renamed df_mark_bb_dirty to
df_set_bb_dirty.
* df.h (blocks_to_scan): Removed variable.
* df-core.c (df_analyze): Add call to df_scan_alloc. Removed
df->blocks_to_scan.
(df_get_bb_dirty): New function.
(df_mark_bb_dirty): Renamed to df_set_bb_dirty.
(df_compact_blocks): Removed df->blocks_to_scan.
(df_bb_replace): Added check to make sure there was no block at
old_index and fixed updating bugs.
* ifcvt.c (cond_exec_process_if_block,
noce_process_if_block, cond_move_process_if_block,
process_if_block, merge_if_block, find_if_header,
find_cond_trap, find_if_case_1, find_if_case_2, if_convert):
Removed modified variable.
(find_if_header, find_cond_trap, find_if_case_1, find_if_case_2,
if_convert): Replaced BB_DIRTY with df_set_bb_dirty and
df_get_bb_dirty.
* recog.c (confirm_change_group): Ditto.
* emit_rtl (remove_insn,, reorder_insns, emit_insn_after_1): Ditto.
* cfgcleanup.c (try_forward_edges, try_crossjump_to_edge,
merge_blocks_move_predecessor_nojumps, try_crossjump_bb): Ditto.
* modulo-sched.c (sms_schedule): Ditto.
* cfgrtl.c (rtl_split_block, rtl_redirect_edge_and_branch,
rtl_redirect_edge_and_branch_force, purge_dead_edges,
cfg_layout_redirect_edge_and_branch): Ditto.
* basic_block.h (BB_DIRTY): Removed.
2006-11-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* cfg.c (compact_blocks): Make df aware when blocks are moved around.
* auto-inc-dec.c (attempt_change): Removed explicit df updating.
* ifcvt.c (cond_exec_process_if_block,
noce_mem_write_may_trap_or_fault_p, noce_process_if_block,
cond_move_process_if_block, process_if_block, find_if_header):
Removed unused df parameter.
(merge_if_block, find_cond_trap, find_if_case_1, find_if_case_2):
Removed explicit df updating.
(if_convert): Rearranged calls to df.
(struct tree_opt_pass pass_rtl_ifcvt, pass_if_after_combine,
pass_if_after_reload): Added TODO_verify_flow.
* recog.c (delete_insn_chain_and_flow): Deleted function.
(peephole2_optimize): Removed unused dataflow problem and variable
and delete explicit df updating calls.
(pass_split_before_sched2): Added TODO_verify_flow.
* emit_rtl (add_insn_after, add_insn_before, remove_insn,
reorder_insns, emit_insn_after_1): Added explicit updating of df.
(set_insn_deleted): New function.
* loop_invariant.c (invariant_table_size, invariant_table): New
variables.
(check_invariant_table_size): New function.
(invariant_for_use, find_defs, check_dependency,
find_invariant_insn, free_inv_motion_data, move_loop_invariants):
Replaced DF_REF_DATA with invariant_table.
* loop-iv.c (clean_slate, iv_ref_table_size, iv_ref_table): New
variables.
(check_iv_ref_table_size): New function.
(clear_iv_info, iv_analysis_loop_init, record_iv, iv_analyze_def,
iv_analysis_done): Replaced DF_REF_DATA with iv_ref_table.
* cfglayout.c (fixup_reorder_chain): Now uses compact_blocks.
* rtl.h (SET_INSN_DELETED): now calls set_insn_deleted.
* Makefile.in: (emit-rtl.o): Now dependent on df.h.
* sched-rgn.c (pass_sched, pass_sched2): Added TODO_verify_flow.
* cfgrtl.c (rtl_delete_block, update_bb_for_insn,
rtl_merge_blocks, try_redirect_by_replacing_jump,
cfg_layout_merge_blocks): Added explicit updating of df.
* dce.c (delete_unmarked_insns): Removed df_delete parameter and
explicit updating of df info.
(rest_of_handle_dce, rest_of_handle_dse): Added call to
df_remove_problem.
(fast_dce, fast_dce, rest_of_handle_fast_dce, run_fast_df_dce):
Removed df_delete parameter.
* df-scan.c (df_scan_free_bb_info): Changed call.
(df_scan_alloc, df_scan_free): Added setting of out_of_date_transfer_functions.
(df_problem problem_SCAN): Added problem removal function.
(df_scan_blocks): Added calls to df_refs_delete and df_bb_delete.
(df_insn_create_insn_record): Added call to df_grow_insn_info.
(df_insn_refs_delete): Renamed to df_insn_delete and removed dflow
parameter.
(df_bb_refs_delete): Renamed to df_bb_delete and removed dflow
parameter.
(df_refs_delete): Deleted.
(df_insn_rescan, df_insn_change_bb): New function.
(df_ref_create_structure): Removed DF_REF_DATA.
* df-core.c (df_add_problem): Changed to use new form of problem
dependency.
(df_remove_problem): New function.
(df_set_blocks): Does a better job of updating the proper blocks.
(df_delete_basic_block): Removed df parameter and checks to see if
block already had infomation.
(df_get_bb_info): Returns NULL if no info was there.
(df_set_bb_info): Checks to make sure problem block information.
(df_mark_solutions_dirty, df_mark_bb_dirty, df_compact_blocks,
df_bb_replace): New functions.
* df.h (df_remove_problem_function): New typedef.
(df_dependent_problem_function): Deleted typedef.
(df_problem): Added remove_problem_fun and dependent_problem and
deleted dependent_problem_fun.
(df_ref.data): Removed.
(df.out_of_date_transfer_functions, df.solutions_dirty): New
variables.
(DF_REF_DATA): Deleted macro.
* df-problems.c (problem_RU, problem_RD, problem_LR, problem_UR,
problem_LIVE, problem_UREC, problem_CHAIN, problem_RI): Added
problem removal function and changed dependent_function.
2006-11-04 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_scan_start_dump): Changed print routine to print
hard register names.
* df-core.c (df_print_regset): New function.
* global.c (global_alloc): Do not recompute register infomation
when recomputing dataflow.
* df.h (DF_RI_NO_UPDATE): New flag.
* df-problems.c (df_lr_top_dump, df_lr_bottom_dump,
df_ur_top_dump, df_ur_bottom_dump, df_live_top_dump,
df_live_bottom_dump, df_urec_top_dump, df_urec_bottom_dump):
Changed to use df_print_regset.
(df_ri_alloc, df_ri_compute): Changed to not update if
DF_RI_NO_UPDATE flag.
* cfgrtl.c (print_rtl_with_bb): Changed to print preds and
successor blocks in dump file.
2006-11-03 Seongbae Park <seongbae.park@gmail.com>
* global.c (global_conflicts): Use df_urec_get_live_at_top ()
instead of DF_RA_LIVE_IN ().
* function.h: Add a declaration for current_function_assembler_name().
* function.c (current_function_assembler_name): New function.
(thread_prologue_and_epilogue_insns): Insert rtx_USE when profiling.
* df.h (DF_REF_FLAGS_CLEAR): New macro.
(df_urec_get_live_at_top): New function declaration.
* df-problems.c (df_urec_get_live_at_top): New function.
2006-10-28 Seongbae Park <seongbae.park@gmail.com>
* df.h (df_rescan_blocks): Renamed to df_scan_blocks.
* df-core.c (df_analyze): Use df_scan_blocks() instead.
* ifcvt.c (if_convert): Use df_scan_blocks() instead.
* df-scan.c
(df_ref_record, df_def_record_1, df_defs_record, df_uses_record):
They are made side-effect free.
(df_ref_find_chains, df_ref_add_to_chains, df_refs_add_to_chains,
df_ref_is_equal, df_ref_chain_find_ref, df_reg_chain_find_ref,
df_scan_start_block, df_check_and_grow_ref_info,
df_insn_refs_collect, df_bb_refs_collect,
df_get_entry_block_defs, df_get_exit_block_uses,
df_ref_verify, df_refs_verified, df_ref_chain_verify,
df_reg_chain_clear_verified, df_bb_refs_verify,
df_exit_block_verify, df_entry_block_verify, df_verify_blocks):
New functions.
(df_ref_create_structure): Initializes the fields
of df_ref and does not connect it to various chains.
(df_insn_refs_record, df_bb_refs_record, df_record_entry_block_defs,
df_record_exit_block_uses, df_refs_record):
Separate side-effects (adding chains and updating regs_ever_live)
from traversing and finding the refs in the insn/basic block.
(df_ref_create): Separate calls for creating the ref and add it
to the chains.
2006-10-24 Paolo Bonzini <bonzinI@gnu.rg>
* ddg.c (add_deps_for_def, add_deps_for_use): Use accessor macros.
* df.h (DF_REF_STRIPPED, DF_SUBREGS): Remove.
* df-core.c: Don't document scanning flags.
* df-scan.c (df_ref_record): Always behave as if DF_SUBREGS was set.
* df-problems.c (df_lr_bb_local_compute): Strip SUBREGs with
DF_REF_REAL_REG.
(df_chain_start_dump): Don't dump DF_REF_STRIPPED.
(df_create_unused_note, df_ri_bb_compute): Don't "inline"
DF_REF_REAL_LOC.
* fwprop.c (fwprop_init): Do not pass DF_SUBREGS.
* loop-invariant.c (record_use): Don't strip SUBREGs.
(record_uses): Do it here with DF_REF_REAL_LOC.
* loop-iv.c (iv_analyze_def): Only allow REGs. Replace previous
way to check for SUBREGs with an assertion.
2006-10-19 Kenneth Zadeck <zadeck@naturalbridge.com>
* sched-ebb.c (schedule_ebbs): Changed flags to df_init.
* fwprop.c (use_killed_between): Changed to use proper macros.
(All_uses_available_at, try_fwprop_subst): Added support for
separated reg_equiv/equal df_refs.
(fwprop_init): Changed flags to df_init.
(fwprop, fwprop_addr): Changed call to df_reorganize_refs to
df_maybe_reorganize_use_refs.
* see.c (see_initialize_data_structures): Changed flags to
df_init.
* ddg.c (build_inter_loop_deps): Now skips refs with
reg_equal/equiv notes.
* modulo-sched.c (sms_schedule): Changed flags to df_init.
* web.c (union_defs): Added support for separated reg_equiv/equal
df_refs.
(web_main): Changed flags to df_init and changed call to
df_reorganize_refs to df_maybe_reorganize_(use|def)_refs.
* loop_invariant.c (check_dependency): New function split out from
check_dependencies.
(record_uses): Added support for separated reg_equiv/equal
df_refs.
(move_loop_invariants): Changed flags to df_init.
* loop-iv.c (iv_analysis_loop_init): Changed flags to df_init.
(latch_dominating_def): Changed to use proper macros.
* combine.c (create_log_links): Ditto.
* sched-rgn.c (schedule_insns): Changed flags to df_init.
* dce.c (dce_process_block): Changed to use proper macros.
* df.h (df_insn_info.eq_uses): New field.
(DF_EQUIV_NOTES): Deleted permanent_flag.
(DF_EQ_NOTES): New changeable_flag.
(df_ref_info.regs_size, df_ref_info.regs_inited): Moved to df
structure.
(df.def_regs, df.use_regs, df.eq_use_regs): New fields.
(df_ref_info.begin): Moved from df_reg_info.
(DF_DEFS_COUNT, DF_DEFS_BEGIN, DF_DEFS_COUNT, DF_DEFS_BEGIN,
DF_REG_EQ_USE_GET, DF_REG_EQ_USE_CHAIN, DF_REG_EQ_USE_COUNT): New
macros.
(DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_CHAIN, DF_REG_DEF_COUNT,
DF_REG_USE_GET, DF_REG_USE_CHAIN, DF_REG_USE_COUNT): Redefined.
(df_reorganize_refs): Split into df_maybe_reorganize_use_refs and
df_maybe_reorganize_def_refs.
(df_ref_info.refs_organized): Split into refs_organized_alone and
refs_organized_with_eq_uses.
* df-problems.c (df_ru_bb_local_compute_process_def,
df_ru_local_compute, df_ru_confluence_n, df_ru_transfer_function,
df_ru_start_dump, df_rd_bb_local_compute_process_def,
df_rd_local_compute, df_rd_confluence_n, df_rd_transfer_function,
df_rd_start_dump, df_chain_alloc, df_chain_insn_reset,
df_chain_create_bb_process_use, df_chain_create_bb,
df_chain_start_dump): Changed to use proper macros.
(df_ru_bb_local_compute, df_chain_insn_reset, df_chain_create_bb):
Added support for separated reg_equiv/equal df_refs.
(df_ru_local_compute, df_rd_local_compute, df_chain_alloc): Split
into df_maybe_reorganize_use_refs and
df_maybe_reorganize_def_refs.
* df-scan.c (df_grow_reg_info, df_rescan_blocks, df_ref_create):
Changed to process all data structures dependent on number of
registers at once.
(df_scan_free_internal, df_scan_alloc): Changed to process new
data structures properly.
(df_rescan_blocks): Split into refs_organized_alone and
refs_organized_with_eq_uses.
(df_reg_chain_unlink): Remove decrement of bitmap_size fields.
(df_reg_chain_unlink, df_insn_refs_delete,
df_ref_create_structure): Changed to use proper macros.
(df_reg_chain_unlink, df_ref_remove, df_insn_refs_delete,
df_reorganize_refs, df_ref_create_structure, df_insn_refs_record):
Added support for separated reg_equiv/equal df_refs.
(df_maybe_reorganize_use_refs, df_maybe_reorganize_def_refs): New
functions.
* df-core.c (df_bb_regno_last_use_find,
df_bb_regno_first_def_find, df_bb_regno_last_def_find,
df_insn_regno_def_p, df_find_def, df_find_use, df_dump_start,
df_regno_debug): Changed to use proper macros.
(df_find_use, df_insn_uid_debug, df_insn_uid_debug,
df_insn_debug_regno, df_insn_debug_regno): Added support for
separated reg_equiv/equal df_refs.
2006-10-18 Paolo Bonzini <bonzini@gnu.org>
* stack-ptr-mod.c (pass_stack_ptr_mod): Don't set pass name.
* final.c (pass_no_new_pseudos): Don't set pass name.
* fwprop.c (all_uses_available_at): Use DF_REF_REG.
(forward_propagate_into): Discard artificial defs/uses.
(pass_rtl_fwprop_addr): Add TODO_df_finish.
2006-10-03 Richard Sandiford <richard@codesourcery.com>
* cselib.h (cselib_discard_hook): Declare.
* cselib.c (cselib_discard_hook): New variable.
(remove_useless_values): Call it before freeing useless values.
* dce.c (base_address): New union.
(store_base_info): Change the type of the base field from "rtx"
to "union base_address".
(local_invariant_stores, local_value_stores): New variables.
(store_base_eq): Split into...
(invariant_store_base_eq, value_store_base_eq): ...these new functions.
(store_base_hash): Split into...
(invariant_store_base_hash, value_store_base_hash): ...these
new functions.
(store_base_del): Fix formatting.
(init_store_group): Split into...
(init_invariant_store_group, init_value_store_group): ...these
new functions.
(init_dse): Use init_invariant_store_group instead of init_store_group.
(get_canonical_address): Delete.
(add_store_offset): Change the type of BASE from "rtx" to "union
base_address *".
(record_store): Remove the GROUP parameter. Don't call
get_canonical_address. Store the base in a "union base_address" and
add stores to either local_invariant_stores or local_value_stores.
(record_stores): Remove the GROUP parameter and adjust the calls
to record_store.
(store_base_local): Add a parameter that indicates whether stores
are invariant or cselib_vals.
(invariant_store_base_local): New function.
(value_store_base_local): Likewise.
(value_store_base_useless): Likewise.
(remove_useless_values): Likewise.
(store_base_prune_needed): Adjust for store_base_info changes.
(prescan_insns_for_dse): Remove the local group variable and use
local_invariant_stores and local_value_stores instead. Adjust the
call to record_stores. Use remove_useless_values as the
cselib_discard_hook while processing a basic block.
2006-10-03 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
* sched-ebb.c (ebb_head, ebb_tail, ebb_head_or_leaf_p): Removed.
(begin_schedule_ready, schedule_ebb, ebb_head_or_leaf_p): Remove
unnecessary argument, update all callers.
(ebb_sched_info): Update initializer.
(df): New static variable to keep dataflow info.
(compute_jump_reg_dependencies): Use it instead of glat.
* haifa-sched.c (glat_start, glat_end, glat_size, init_glat,
init_glat1, free_glat): Removed.
(generate_recovery_code, begin_speculative_block,
add_to_speculative_block, init_before_recovery,
create_recovery_block, create_check_block_twin,
schedule_block, sched_init, add_block): Remove
unnecessary argument, update all callers.
* modulo-sched.c (sms_sched_info): Update initializer.
(sms_schedule): Update call to sched_init ().
* sched-int.h (struct sched_info): Remove unnecessary argument and
update all callers of field 'begin_schedule_ready'. Remove field
'region_head_or_leaf_p'.
(glat_start, glat_end): Remove prototypes.
(enum SCHED_FLAGS): Remove USE_GLAT, DETACH_LIFE_INFO. Use NEW_BBS
instead.
(schedule_block, sched_init, add_block, schedule_region): Update
prototypes.
* sched-rgn.c (df, not_in_df): New static variables.
(check_live_1, update_live_1, add_block1): Use them instead of glat.
(begin_schedule_read, schedule_region): Remove unnecessary argument,
update all callers.
(region_head_or_leaf_p): Remove.
(region_sched_info): Update initializer.
* config/ia64/ia64.c (set_sched_flags): Use NEW_BBS instead of
DETACH_LIFE_INFO.
2006-10-01 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_ref_record, df_insn_refs_record,
df_bb_refs_record, df_refs_record, df_record_entry_block_defs):
Removed DF_HARD_REGS flag.
* df-core.c (comments): Ditto.
* df.h (permanent_flags.DF_HARD_REFS): Removed.
(changeable_flags.DF_NO_HARD_REGS): Added.
* df-problems.c (df_rd_bb_local_compute_process_def,
df_rd_bb_local_compute, df_chain_create_bb_process_use,
df_chain_create_bb): Added support for DF_NO_HARD_REGS flag.
* dce.c (init_dce): Removed DF_HARD_REFS flag.
* reg_stack.c (reg_to_stack): Ditto.
* sched_rgn.c (sched_insns): Ditto.
* regrename.c (regrename_optimize): Ditto.
* sched_ebb.c (schedule_ebbs): Ditto.
* fwprop.c (fwprop_init): Ditto.
* see.c (see_initialize_data_structures): Ditto.
* auto_inc_dec.c (rest_of_handle_auto_inc_dec): Ditto.
* mode-switching.c (optimize_mode_switching): Ditto.
* modulo-sched.c (sms_schedule): Ditto.
* ifcvt.c (if_convert): Ditto.
* recog.c (peephole2_optimize): Ditto.
* regmove.c (regmove_optimize, rest_of_handle_stack_adjustments):
Ditto.
* local_alloc.c (rest_of_handle_local_alloc): Ditto.
* function.c (thread_prologue_and_epilogue_insns): Ditto.
* rtl_factoring.c (rtl_sequabstr): Ditto.
* bt_load.c (branch_target_load_optimize): Ditto.
* loop_invariant.c (move_loop_invariants): Ditto.
* subregs-init.c (initialize_uninitialized_subregs): Ditto.
* loop-iv.c (iv_analysis_loop_init): Ditto.
* combine.c (rest_of_handle_combine): Ditto.
* web.c (web_main): Added DF_NO_HARD_REGS flag and changed loops
to skip over hard regs.
* reorg.c (dbr_schedule): Removed extra flags from
df_*_add_problems calls.
2006-09-30 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (problem_SCAN): Removed flags.
(df_scan_add_problem): Ditto.
(df_ref_record, df_insn_refs_record, df_bb_refs_record,
df_refs_record, df_record_entry_block_defs,
df_record_exit_block_uses ): Moved flags to df structure.
* df-core.c (df_init): Added permanent_flags and changeable_flags.
(df_add_problem): Removed flags parameter.
(df_set_flags, df_clear_flags): Changed processing of flags. *
df.h (df_dependent_problem_function, struct df_problem): Removed
flags.
(DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS, DF_DU_CHAIN,
DF_UD_CHAIN, DF_RI_LIFE, DF_RI_SETJMP): Changed to be fields in
df_permanent_flags.
(DF_LR_RUN_DCE): Changed to be fields in df_changeable_flags.
(df_init, df_add_problem, df_set_flags, df_clear_flags,
df_ru_add_problem, df_rd_add_problem, df_lr_add_problem,
df_ur_add_problem, df_live_add_problem, df_urec_add_problem,
df_chain_add_problem, df_ri_add_problem, df_scan_add_problem):
Changed flag parameters.
* df-problems.c (problem_RU, problem_RD, problem_LR, problem_UR,
problem_LIVE, problem_UREC, problem_CHAIN, problem_RI): Removed
changeable flags field.
(df_ru_add_problem, df_rd_add_problem, df_lr_add_problem,
df_ur_add_problem, df_live_add_problem, df_urec_add_problem,
df_chain_add_problem, df_ri_add_problem): Removed flags parameter.
(df_lr_local_finalize, df_chain_alloc, df_chain_insn_reset,
df_chain_bb_reset, df_chain_create_bb_process_use,
df_chain_start_dump, df_ri_alloc, df_ri_bb_compute, df_ri_compute,
df_ri_free): Changed location of flags.
* dce.c (init_dce): Moved flags from df_*_add_problem to df_init.
(fast_dce): Changed parameters to df_set_flags and df_clear_flags.
* reg_stack.c (reg_to_stack): Moved flags from df_*_add_problem to df_init.
* sched_rgn.c (sched_insns): Ditto.
* regrename.c (regrename_optimize): Ditto.
* sched_ebb.c (schedule_ebbs): Ditto.
* fwprop.c (fwprop_init): Ditto.
* see.c (see_initialize_data_structures): Ditto.
* auto_inc_dec.c (rest_of_handle_auto_inc_dec): Ditto.
* mode-switching.c (optimize_mode_switching): Ditto.
* modulo-sched.c (sms_schedule): Ditto.
* web.c (web_main): Ditto.
* ifcvt.c (if_convert): Ditto.
* recog.c (peephole2_optimize): Ditto.
* regmove.c (regmove_optimize, rest_of_handle_stack_adjustments):
Ditto.
* local_alloc.c (rest_of_handle_local_alloc): Ditto.
* function.c (thread_prologue_and_epilogue_insns): Ditto.
* rtl_factoring.c (rtl_sequabstr): Ditto.
* bt_load.c (branch_target_load_optimize): Ditto.
* loop_invariant.c (move_loop_invariants): Ditto.
* subregs-init.c (initialize_uninitialized_subregs): Ditto.
* loop-iv.c (iv_analysis_loop_init): Ditto.
* combine.c (rest_of_handle_combine): Ditto.
2006-08-04 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (pass_rtl_dse): Split into pass_rtl_dse1,
pass_rtl_dse2, pass_rtl_dse3.
* passes.c (init_optimization_passes): Ditto.
* timevar.def (TV_DSE): Split into TV_DSE1, TV_DSE2, and TV_DSE3.
(TV_THREAD_PROLOGUE_AND_EPILOGUE): Made text shorter to improve
readability.
* df.core.c (df_init, df_finish1, df_analyze_problem, df_analyze):
Made postorder and instance variable of df.
(df_finish1): Made tolerant of being passed NULL instance.
(df_get_n_blocks, df_get_postorder): New functions.
* cfganal (post_order_compute): Added delete_unreachable
parameter and code to delete unreachable blocks.
* local_alloc (rest_of_handle_local_alloc): Removed unnecessary
call to delete_unreachable_blocks.
* df.h (postorder, n_blocks): New instance variables.
(df_get_n_blocks, df_get_postorder): New functions.
* sched-rgn.c (extend_rgns): Added extra parameter to
post_order_compute.
* basic-block.h (post_order_compute): Ditto.
* dce.c (fast_dce, init_rs_dflow): Now uses postorder and n_blocks from df.
(pass_rtl_dse): Split into pass_rtl_dse1,
pass_rtl_dse2, pass_rtl_dse3.
* sched-ebb.c (schedule-ebbs): Added return value.
* haifa-sched.c (add_block): Made df parameter unused and fixed
incorrect assert.
2006-08-01 Kenneth Zadeck <zadeck@naturalbridge.com>
* sched-ebb.c (sched_ebbs): Now returns the df instance created.
* rtl.h (sched_ebbs): Ditto.
* recog.c (split_all_insns): Made public again so it can be called
from ia64.c
* rtl.h (split_all_insns): Ditto.
* df-problems.c (df_ri_compute): Removed call to non existent
function.
* config/ia64/ia64.c (emit_predicate_relation_info): Added df
parameter and removed rotten ref to global instance.
(ia64_reorg): Added local instance of df and removed calls to non
existent flow.c.
2006-07-26 Kenneth Zadeck <zadeck@naturalbridge.com>
* regrename.c (regrename_optimize): Renamed df_clrur to df_live
and removed df_finish call.
(pass_regrename): Added TODO_df_finish flag.
* sched-ebb.c (schedule_ebbs): Renamed df_clrur to df_live
and removed df_finish call.
* fwprop.c (fwprop_done): Removed df_finish call.
(pass_rtl_fwprop): Added TODO_df_finish flag.
* see.c (see_commit_changes): Removed unnecessary set to df.
* postreload.c (rest_of_handle_postreload): Removed df_finish call.
(pass_postreload_cse): Added TODO_df_finish flag.
* tree-pass.h (TODO_df_finish): Added.
* cfg.c (dump_bb_info): Added flow info to dumps
(dump_reg_info): New function.
(dump_flow_info): Moved reg info printing to dump_reg_info.
* auto-inc-dec.c (rest_of_handle_auto_inc_dec): Renamed df_clrur to df_live
and removed df_finish call.
(pass_inc_dec): Added TODO_df_finish flag.
* reorg.c (dbr_schedule): Renamed df_clrur to df_live
and removed df_finish call.
(pass_delay_slots): Added TODO_df_finish flag.
* df-scan.c (df_scan_alloc): Added set to dflow->computed.
(df_scan_dump): Renamed to df_scan_start_dump.
(problem_SCAN): Updated for new dumpers.
* haifa-sched.c (sched_finish): Removed df parameter and deleted
call to df_finish.
* df-core.c (ddf): Renamed to df_current_instance and made public.
(df_init): Ditto and added check to make sure only one instance of
df is alive at any point.
(df_add_problem): Initialized dflow->computed.
(df_analyze_problem): Set dflow->computed.
(df_dump): Now calls new dumpers.
(df_dump_start, df_dump_top, df_dump_bottom): New functions.
(debug_df_insn, debug_df_reg, debug_df_regno, debug_df_defno,
debug_df_useno): Renamed ddf to df_current_instance.
* mode_switching (optimize_mode_switching): Renamed df_clrur to df_live
and removed df_finish call.
(pass_mode_switching): Added TODO_df_finish flag.
* modulo-sched.c (sms_schedule): Removed calls to df_dump and df
parameter from sched_finish.
(pass_sms): Added TODO_df_finish flag.
* web.c (web_main): Removed call to df_dump and df_finish.
(pass_web): Added TODO_df_finish flag.
* loop-init.c (pass_rtl_move_loop_init): Added TODO_df_finish
flag.
* global.c (global_alloc): Removed call to df_dump and debugging
code.
* ifcvt.c (if_convert): Renamed df_clrur to df_live
and removed df_finish call.
(pass_rtl_ifcvt, pass_if_after_combine, pass_if_after_reload):
Added TODO_df_finish flag.
* recog.c (peephole2_optimize): Renamed df_clrur to df_live and
removed df_finish call.
(pass_peephole2): Added TODO_df_finish flag.
* regmove.c (regmove_optimize, rest_of_handle_stack_adjustments):
Renamed df_clrur to df_live and removed df_finish call.
(pass_regmove, pass_stack_adjustments): Added TODO_df_finish flag.
* function.c (epilogue_done): Removed df_finish call.
(pass_thread_prologue): Added TODO_df_finish flag.
* df.h (DF_CLRUR): Renamed to DF_LIVE.
(df_dump_bb_problem_function): New function type.
(df_problem.dump_fun): Deleted.
(df_problem.dump_fun_start, df_problem.dump_fun_top,
df_problem.dump_fun_bottom, problem_data.computed,
df_current_instance): New fields.
(DF_CLRUR_BB_INFO): Renamed to DF_LIVE_BB_INFO.
(df_clrur_bb_info): Renamed to df_live_bb_info.
(df_dump_start, df_dump_top, df_dump_bottom): New functions.
* rtl-factoring (rtl_seqabstr): Renamed df_clrur to df_live
and removed df_finish call.
(pass_rtl_seqabstr): Added TODO_df_finish flag.
* bt-load (branch_target_load_optimize): Renamed df_clrur to df_live
and removed df_finish call.
(pass_branch_target_load_optimize1,
pass_branch_target_load_optimize2): Added TODO_df_finish flag.
* loop-invariant.c (move_loop_invariants): Removed call to
df_finish.
* subregs-init.c (initialize_uninitialized_subregs): Renamed
df_clrur to df_live and changed call to dg_get_live_in to
DF_LIVE_IN.
* rtl.h (dump_reg_info): New function.
* sched-int.h (sched_finish): Removed df parameter.
* combine.c (rest_of_handle_combine): Renamed df_clrur to df_live
and removed df_finish call.
(pass_combine): Added TODO_df_finish flag.
* df-problems.c (df_get_live_in, df_get_live_out): Renamed
DF_CLRUR to DF_LIVE.
(df_ru_dump, df_rd_dump, df_lr_dump, df_ur_dump, df_clrur_dump,
df_urec_dump, df_ri_dump): Deleted function.
(df_ru_start_dump, df_ru_top_dump, df_ru_bottom_dump,
df_rd_start_dump, df_rd_top_dump, df_rd_bottom_dump,
df_lr_start_dump, df_lr_top_dump, df_lr_bottom_dump,
df_ur_start_dump, df_ur_top_dump, df_ur_bottom_dump,
df_live_top_dump, df_live_bottom_dump, df_ri_start_dump,
df_urec_top_dump, df_urec_bottom_dump): New function.
(problem_RU, problem_RD, problem_LR, problem_UR, problem_UREC,
problem_CHAIN, problem_RI): Replaced dump functions.
(df_clrur_get_bb_info): Renamed to df_live_get_bb_info.
(df_clrur_set_bb_info): Renamed to df_live_set_bb_info.
(df_clrur_free_bb_info): Renamed to df_live_free_bb_info.
(df_clrur_alloc): Renamed to df_live_alloc.
(df_clrur_local_finalize): Renamed to df_live_local_finalize.
(df_clrur_free): Renamed to df_clrur_free.
(problem_CLRUR): Renamed to problem_LIVE and dump functions
changed.
(df_clrur_add_problem): Renamed to df_live_add_problem.
(df_chains_dump): Renamed to df_chain_start_dump.
(df_chain_add_problem, df_ri_alloc, df_ri_compute): Removed
problem_data->computed.
* Makefile.in (passes.o): Added DF_H.
* sched-rgn.c (schedule_insns): Renamed df_clrur to df_live
and removed df_finish call.
(pass_sched, pass_sched2): Added TODO_df_finish flag.
* passes.c (execute_todo): Added call to df_finish for
TODO_df_finish flag.
* cfgrtl.c (dump_regset_in, dump_regset_out): Deleted.
(rtl_dump_bb, print_rtl_with_bb): Fixed to find and print df info.
* dce.c (init_dce): Removed call to df_dump.
(end_dce, end_fast_dce): Removed call df_finish and null out local
df instance variable.
(pass_rtl_dce, pass_fast_rtl_dce, pass_rtl_dse): Added
TODO_df_finish flag.
2006-07-23 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (pass_regclass_init, pass_no_new_pseudos,
pass_split_before_sched2): Added.
(pass_life, pass_remove_death_notes): Deleted.
* rtlanal.c: Documentation.
* stack-ptr-mod.c: Ditto.
* output.h: Ditto.
* function.c: Ditto.
* caller-save.c: Ditto.
* sched-deps.c: Ditto.
* jump.c: Ditto.
* alias.c: Ditto.
* calls.c: Ditto.
* cfgloop.c: Ditto.
(establish_preds, flow_loops_find): Removed ref to cfun->max_loop_depth.
* final.c: (rest_of_no_new_pseudos, pass_no_new_pseudos): Added.
* cfg.c (dump_regset, debug_regset): Moved from flow.c.
* regs.h (regs_may_share): Deleted.
(allocate_reg_life_data): Added.
* flow.c: Deleted.
* global.c (reg_may_share): Deleted.
(global_alloc): Removed support for regs_may_share.
* ifcvt.c (rest_or_handel_if_conversion): Removed ref to
clear_reg_deaths.
* timevar.def (TV_FLOW): Removed.
* recog.c (find_single_use, find_single_use_1): Moved to combine
and made static.
(split_all_insns, split_all_insns_noflow): Made static.
(pass_split_before_regclass): Fixed tv_id.
(gate_handle_split_before_sched2,
rest_of_handle_split_before_sched2, pass_split_before_sched2): New.
(pass_split_for_shorten_branches): Renamed and fixed tv_id.
* recog.h (find_single_use): Removed.
* regmove.c (find_use_as_address): Moved from flow and made
static.
* function.h (max_loop_depth): Removed.
* cfgcleanup.c (delete_dead_jumptables): Moved from flow.c.
* subregs-init.c (initialize_uninitialized_subregs): Added call to
allocate_reg_life_data if new regs were added.
* regclass.c (max_regno, reg_set_to_hard_reg_set,
allocate_reg_life_data): Moved from flow.c.
(regclass_init): Now static and returns unsigned int.
(pass_regclass_init, find_subregs_of_mode): New.
(init_subregs_of_mode): Now fills the hash table.
* rtl.h (find_use_as_address, split_all_insns,
split_all_insns_noflow, regclass_init): Deleted.
* combine.c (find_single_use_1, find_single_use): Moved from recog
and made static.
(delete_noop_moves): Moved from flow.c and made static.
(rest_of_handle_combine): Now runs dce as part of df_init.
* df-problems.c (reg_n_info): Moved from flow.c.
(df_ri_problem_data.computed): Added field.
(print_note, df_set_unused_notes_for_mw, df_set_dead_notes_for_mw,
df_create_unused_note, df_ri_bb_compute, df_ri_compute): Changed
note printing to go to dump_file.
(df_ri_alloc, df_ri_compute, df_ri_free, df_ri_dump): Added
support for computed flag.
* Makefile.in: (flow.c flow.o): Removed.
* sched-rgn.c (check_dead_notes1, deaths_in_region): Removed.
(init_regions, add_block1): Removed last of note counting code.
(rest_of_handle_sched2): Moved call to split_all_insns to separate
pass.
* basic_block.h (first_insn_after_basic_block_note,
update_life_extent, PROP_* flags, life_analysis, update_life_info
update_life_info_in_dirty_blocks, count_or_remove_death_notes,
propagate_block, clear_reg_deaths, propagate_block_info,
propagate_one_insn, init_propagate_block_info,
free_propagate_block_info): Removed.
(CLEANUP_*): Renumbered.
sched_vis.c: (print_exp): Added proper printing for PRE and
POST_MODIFY.
* passes.c (init_optimization_passes): Added pass_regclass_init,
pass_no_new_pseudos, and pass_split_before_sched2. Deleted
pass_life.
* struct-equiv.c (struct_equiv_init): Removed dead conditional.
* config/rs6000/rs6000.c (print_operand): More fixes for
PRE_MODIFY.
* config/rs6000/rs6000.md ("*movdf_hardfloat32",
"*movdf_softfloat32"): Ditto.
* cfgrtl (first_insn_after_basic_block_note): Moved from flow.c
and made static.
2006-07-16 Zdenek Dvorak <dvorakz@suse.cz>
Kenneth Zadeck <zadeck@naturalbridge.com>
* regrename.c: Fixed comments.
* see.c (rest_of_handle_see): Removed call to
update_life_info_in_dirty_blocks.
* tree-pass.h: (pass_clear_df, pass_reset_df): Removed.
* passes.c (init_optimization_passes): Ditto.
* cfghooks.c (split_block): Remove call to split_block_end.
(merge_blocks): Removed call to merge_blocks_end.
(duplicate_block): Removed call to duplicate_block_end.
* cfghooks.h (split_block_end, merge_blocks_end,
duplicate_block_end): Removed.
* cfgrtl.c (rtl_split_block_end, rtl_merge_blocks_end): Removed.
(rtl_create_basic_block, force_nonfallthru_and_redirect,
rtl_split_edge, cfg_layout_merge_blocks, cfg_layout_split_edge):
Removed old calls to incremental dataflow.
(dump_regset_in, dump_regset_out): Removed call to dump_regset.
(rtl_dump_bb, print_rtl_with_bb): Rearranged dataflow printing.
* cfg.c (compact_blocks): Removed code to keep dataflow up to
date.
* flow.c (clear_log_links): Deleted
(life_analysis, init_propagate_block_info): Removed PROP_LOG_LINKS.
(update_life_info): Removed call to clear_log_links.
(mark_set_1): Removed code to build log links.
(clear_log_links): Deleted.
* df-scan.c (df_uses_record): Added code to set
DF_REF_PRE_POST_MODIFY.
(df_insn_refs_record): Added code to set DF_REF_CALL_STACK_FRAME.
* df-core.c (df_analyze_simple_change_some_blocks,
df_analyze_simple_change_one_block, df_compact_blocks,
df_bb_replace, reset_df, pass_reset_df, clear_df, pass_clear_df):
Deleted.
* recog.c (peephole2_optimize): Deleted some rotted code.
* df.h (DF_REF_PRE_POST_MODIFY, DF_REF_CALL_STACK_USAGE): New
Flags.
(df_analyze_simple_change_some_blocks,
df_analyze_simple_change_one_block, df_compact_blocks,
df_bb_replace): Deleted.
* bt-load (branch_target_load_optimize): Removed call to
update_life_info.
* cfgcleanup.c (thread_jump, try_forward_edges): Deleted mode
parameter to thread_jump.
(try_optimize_cfg, cleanup_cfg): Removed CLEANUP_UPDATE_LIFE.
* cfglayout.c (cfg_layout_duplicate_bb_end): Deleted.
* combine.c (combine_instructions): Removed call to
update_life_info.
(set_nonzero_bits_and_sign_copies, reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine, get_last_value_validate,
get_last_value, reg_dead_at_p): Changed to use local df instance.
(create_log_links, clear_log_links): New function.
(rest_of_handle_combine): Added new version of df, create and
destroy log links locally.
* bb-reorder.c (rest_of_handle_partition_blocks): Removed call to
update_life_info.
* basic-block.h (PROP_LOG_LINKS): Removed and renumbered other
PROP_*.
(CLEANUP_UPDATE_LIFE, CLEANUP_LOG_LINKS): Removed and renumbered
other CLEANUP_*.
* tree-cfg.c (tree_cfg_hooks): Removed fields.
* struct-equiv.c (struct_equiv_init): Removed call to
update_life_in_dirty_blocks.
* dce.c (init_dce, end_dce, end_fast_dce): Removed code to service
rtl_df.
2006-07-12 Kenneth Zadeck <zadeck@naturalbridge.com>
* auto-inc-dec.c (parse_add_or_inc): Moved test to merge_in_block.
(find_inc): Now returns success flag if transformation was made.
(find_mem): Ditto.
(merge_in_block): Restructed to loop if any merges were made.
Added max_reg parameter. Added test from parse_add_or_inc.
2006-07-11 Kenneth Zadeck <zadeck@naturalbridge.com>
* regrename.c (regrename_optimize): Changed df problem
initialization.
* sched-ebb.c (schedule_ebbs): Ditto.
* reorg.c (dbr_schedule): Ditto.
* mode-switching.c (optimize_mode_switching): Ditto.
* ifcvt.c (if_convert): Ditto.
* reorg.c (peephole2_optimize): Ditto.
* regmove.c (regmove_optimize, rest_of_handle_stack_adjustments):
Ditto.
* sched-rgn.c (schedule_insns): Ditto.
* rtl-factoring.c (rtl_seqabstr): Ditto.
* bt-load.c (branch_target_load_optimize): Ditto.
* subregs-init.c (initialize_uninitialized_subregs): Ditto.
* df-core.c (reset_df): Ditto.
* flow.c (update_life_info, propagate_one_insn): Renamed UPWARD_LIVE
to LR.
(rest_of_handle_life): Changed df problem
initialization.
* function.c (keep_stack_depressed): Renamed UPWARD_LIVE to LR.
* combine.c (set_nonzero_bits_and_sign_copies): Changed DF_LIVE_IN
to DF_UR_IN or DF_LR_IN.
(reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine, get_last_value): Changed
DF_LIVE_IN to DF_UR_IN.
* reg-stack.c (reg_to_stack): Changed df problem
initialization. Changed DF_LIVE_IN to DF_LR_IN. str
* struct-equiv.c (struct_equiv_init): Renamed UPWARD_LIVE
to LR.
* dce.c (dce_process_block): Changed DF_UPWARD_LIVE_* to DF_LR_*.
* df.h: (DF_CLRUR) Added symbol and renamed others in block.
(DF_CLRUR_BB_INFO): New macro.
(DF_LIVE_IN, DF_LIVE_OUT): Changed to use output of clrur problem.
(DF_UPWARD_LIVE_IN): Renamed to DF_LR_IN.
(DF_UPWARD_LIVE_OUT): Renamed to DF_LR_OUT.
(df_clrur_bb_info): New structure.
(df_clrur_add_problem, df_clrur_get_bb_info): New functions.
* df-problems: (df_get_live_in, df_get_live_out,
df_lr_simulate_artificial_refs_at_end): Reworked to
to be consistent with new dataflow problems and naming.
(df_ur_local_finalize): Deleted function.
(df_problem problem_UR): Removed ref to df_ur_local_finalize.
(df_clrur_get_bb_info, df_clrur_set_bb_info,
df_clrur_free_bb_info, df_clrur_alloc, df_clrur_free,
df_clrur_dump, df_clrur_add_problem): New functions.
(df_problem problem_CLRUR): New datastructure.
* auto-inc-dec.c (reg_next_inc_use): New Array.
(attempt_change): Added inc_reg parm and boolean result. Move
some tests to try_merge. Added processing for reg_next_inc_use.
(try_merge): Added boolean result and some test moved from
attempt_change and parse_add_or_inc.
(parse_add_or_inc): Move test to try_merge. Improved debugging,
and added code to support reg_next_inc_use. Added more
correctness tests.
(rest_of_handle_auto_inc_dec): Changed df problem initialization
and added code to support reg_next_inc_use.
2006-07-05 Richard Sandiford <richard@codesourcery.com>
* passes.c (init_optimization_passes): Move the final RTL DSE pass
after thread_prologue_and_epilogue.
2006-07-01 Daniel Berlin <dberlin@dberlin.org>
David Edelsohn <edelsohn@gnu.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
tree-pass.h (pass_inc_dec): New pass variable.
auto-inc-dec.c: New file that contains pass to find auto-inc/dec
instruction combinations.
flow.c: Removed unused includes for execinfo.h and stdio.h.
(init_propagate_block_info): Fixed missing comma typo.
(attempt_auto_inc, try_pre_increment): Added code to abort if any
auto-inc/dec insns are found by this pass.
df-scan.c (df_defs_record): Added flags parameter.
(df_insn_refs_record): Added code to check for conditional def.
(df_recompute_luids): New function.
df-core.c: Fixed comment.
global.c (global_alloc): Moved misplaced debugging code.
(global_conflicts): Added patch to fix the way auto-incs are
accounted for in conflicts graph.
timevar.def (TV_AUTO_INC_DEC): New variable.
recog.c: Fixed comment.
function.c: Fixed comment.
df.h (DF_REF_CONDITIONAL): New flag.
(df_recompute_luids): New function.
gcse.c (extract_mentioned_regs_helper): Added PRE/POST_MODIFY
cases.
common.opt (fauto-inc-dec): New flag.
rtl.h (AUTO_INC_DEC): Made this symbol dependent on
HAVE_(PRE/POST)_MODIFY_(REG/DISP). Made other symbols dependent
on AUTO_INC_DEC rather than components that defined AUTO_INC_DEC.
df-problems.c (df_ru_bb_local_compute_process_def,
df_lr_bb_local_compute, df_lr_simulate_artificial_refs_at_end,
df_lr_simulate_one_insn, df_chain_create_bb,
df_create_unused_note): Added DF_REF_CONDITIONAL to keep
conditional defs from being added to kill sets.
dce.c (dce_process_block): Ditto.
Makefile.in (auto-inc-dec.c): New file.
basic-block.h: Preparation to get rid of PROP_AUTO_INC flag.
passes.c (init_optimization_passes): Added pass_inc_dec.
config/rs6000/rs6000.c (rs6000_legitimate_address): Added code for
PRE_MODIFY.
(rs6000_mode_dependent_address, print_operand): Added case for pre_modify.
config/rs6000/rs6000.h (HAVE_PRE_MODIFY_DISP,
HAVE_PRE_MODIFY_REG): Added flags.
reload1 (eliminate_regs_1, elimination_effects): Added cases for
PRE/POST_MODIFY.
2006-05-27 Steven Bosscher <steven@gcc.gnu.org>
* reorg.c (dbr_schedule): Fix df_ur_add_problem calls.
2006-05-24 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_scan_free_internal, df_grow_reg_info,
df_reg_chain_unlink, df_ref_remove,
df_insn_create_insn_record, df_insn_refs_delete,
df_ref_create_structure, df_ref_record, df_mark_reg,
df_record_entry_block_defs, df_record_exit_block_uses):
Formatting fixes.
(df_get_artificial_defs): Spelling fixes.
(df_ref_record, df_def_record_1, df_uses_record):
Fix the way that subregs are processed.
(df_defs_record, df_def_record_1, df_insn_refs_record):
Split DF_REF_CLOBBER into two cases.
* df-core.c (df_analyze): Added comments
(df_simple_iterative_dataflow): New function.
(df_dump): Formatting fixes.
* df.h (DF_REF_CLOBBER): Deleted.
(DF_REF_MUST_CLOBBER, DF_REF_MAY_CLOBBER): New enums.
(df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info,
df_urec_bb_info): Added comments.
(df_simple_iterative_dataflow): New function.
* df-problems.c (df_print_bb_index, df_set_dead_notes_for_mw):
Added comments.
(df_ru_alloc, df_ru_local_compute, df_ru_confluence_n,
df_ru_free, df_ru_dump, df_rd_alloc,
df_rd_bb_local_compute_process_def, df_rd_bb_local_compute,
df_rd_local_compute, df_rd_confluence_n, df_rd_free,
df_rd_dump, df_lr_bb_local_compute, df_lr_bb_local_compute,
df_lr_local_compute, df_ur_alloc, df_ur_dump, df_urec_alloc,
df_urec_bb_local_compute, df_urec_local_compute,
df_urec_local_finalize, df_urec_dump, df_chain_create_bb,
df_create_unused_note, df_ri_bb_compute): Formatting fixes.
(df_ru_bb_local_compute_process_def): Do not clear gen set.
(df_ru_bb_local_compute): Reorder processing insn.
(df_ru_transfer_function): Fixed incorrect use of bitmaps.
(df_ru_dump, df_rd_dump, df_chains_dump): Added debugging code.
(df_lr_bb_local_compute, df_lr_simulate_one_insn,
df_ur_bb_local_compute, df_chain_create_bb,
df_create_unused_note, df_ri_bb_compute): Split
DF_REF_CLOBBER into two cases.
* ddg.c (add_deps_for_def): Changed to use ru info.
* modulo-sched.c (sms_schedule): Added debugging.
* dce.c (rs_dflow, df_problem reaching_stores_problem): Deleted.
(init_rs_dflow, calculate_reaching_stores): Move dataflow to new
df function.
2006-05-23 Kenneth Zadeck <zadeck@naturalbridge.com>
* fwprop.c (local_ref_killed_between_p): Rearranged definition.
2006-05-23 Steven Bosscher <stevenb.gcc@gmail.com>
* rtlanal.c (find_occurrence): Move to fwprop.c.
* rtl.h (find_occurrence): Remove prototype.
* fwprop.c (can_simplify_addr): Fix check for frame based addresses.
(should_replace_address): Update comment before this function.
(local_ref_killed_between_p): Don't choque on NOTEs.
(use_killed_between): Handle the exceptional case that a DEF does
not dominate one of its uses.
(varying_mem_p): Simplify return type.
(all_uses_available_at): Clean up unnecessary single_set calls.
(find_occurrence_callback, find_occurrence): New.
(subst): Rename to try_fwprop_subst.
(forward_propagate_subreg): Update caller.
(forward_propagate_and_simplify): Likewise.
(fwprop_init): Find loops before computing data flow info.
(fwprop_done): Call cleanup_cfg without CLEANUP_PRE_LOOP. Free
loop tree before cleanup_cfg.
2006-05-14 Kenneth Zadeck <zadeck@naturalbridge.com>
* regclass.c (init_subregs_of_mode): Created dummy version
when CANNOT_CHANGE_MODE_CLASS is undefined.
2006-05-13 Steven Bosscher <stevenb.gcc@gmail.com>
* df-core.c (df_bb_regno_last_use_find): Do not look for dataflow
information attached to non-INSNs such as NOTEs.
(df_bb_regno_first_def_find, df_bb_regno_last_def_find): Likewise.
2006-05-05 Kenneth Zadeck <zadeck@naturalbridge.com>
* haifa-sched.c (glat_size): New variable.
(sched-init, extend_bb): Properly initialized glat_start and
glat_end.
(free_glat): Fixed double free of bitmaps.
* df-scan.c (df_scan_get_bb_info, df_scan_set_bb_info): Added
assertions.
* df-problems.c (df_ru_get_bb_info, df_ru_set_bb_info,
df_rd_get_bb_info, df_rd_set_bb_info, df_lr_get_bb_info,
df_lr_set_bb_info, df_ur_get_bb_info, df_ur_set_bb_info,
df_urec_get_bb_info, df_urec_set_bb_info): Ditto.
2006-04-25 Kenneth Zadeck <zadeck@naturalbridge.com>
* flow.c (rest_of_handle_life): Removed unnecessary code.
* df-scan.c (df_scan_free_internal, df_scan_free): Fixed
storage leak.
* df-core.c (df_delete_basic_block): Removed dangling pointer.
* mode-switching.c (optimize_move_switching): Moved creation of df
instance to avoid storage leak.
* ifcvt.c (if_convert): Fixed storage leak.
* dce.c (mark_insn,
rest_of_handle_dce): Removed old way of processing libcalls.
(libcall_matches_p, mark_libcall_insns): Removed.
(mark_libcall): New function.
(mark_reg_dependencies, dce_process_block): New code to check for
libcalls.
(fast_dce): Fixed storage leak.
2006-04-24 Kenneth Zadeck <zadeck@naturalbridge.com>
* sched-ebb.c (schedule_ebbs): Updated register lifetime info.
* modulo-sched.c (sms_schedule): Ditto.
* sched-reg.c (schedule_insns): Ditto.
* regmove.c (regmove-optimize): Ditto.
* tree.h (setjmp_vars_warning, setjmp_args_warning): Removed.
(generate_setjmp_warning): Added.
* tree-pass.h (pass_subregs_of_mode_init): Added.
* flow.c (life_analysis): Moved parts to other passes.
(regno_clobbered_at_setjmp):Moved setjmp warning to local-alloc.
(rest_of_handle_life): Ditto.
* df-scan.c (df_ref_record): Reformatted comment.
* ifcvt.c (rest_of_handle_if_conversion): Removed last bit of
rtl_df scafolding.
* local-alloc.c (local_alloc, no_equiv, block_alloc): Changed to
use same instance of df as global_alloc,
(rest_of_handle_local_alloc): Now also produces setjmp warnings.
* function.c (regno_clobbered_at_setjmp): Moved from flow.
(setjmp_vars_warning, setjmp_args_warning): Added parms to use
passed in df instance.
(generate_setjmp_warnings): New function.
* df.h (DF_RI_SETJMP): New constant.
(df_ri_get_setjmp_crosses): New function.
* df-problems.c (df_ri_problem_data, setjmp_crosses): New
variables.
(df_ri_alloc, df_ri_bb_compute, df_ri_bb_compute, df_ri_compute):
Changed variables live across setjmp computation.
(df_ri_get_setjmp_crosses): New function.
* regclass.c (init_subregs_of_mode): Changed return.
(gate_subregs_of_mode_init, pass_subregs_of_mode_init): New.
* rtl.h (init_subregs_of_mode): Removed.
* integrate.c (allocate_initial_values): Removed incorrect parm
attribute and changed instance of df used.
* output.h (regno_clobbered_at_setjmp): Removed.
* stack-ptr-mod.c: Fixed comment.
* Makefile.in (regclass.o): Added tree-pass.h.
* basic-block.h (safe_insert_insn_on_edge): Deleted.
* passes.c (init_optimization_passes): Added
pass_subregs_of_mode_init.
* cfgrtl.c (mark_killed_regs, safe_insert_insn_on_edge): Deleted.
* rtl-profile.c: Removed.
2006-04-21 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (pass_stack_ptr_mod, pass_initialize_subregs,
pass_reset_df): New.
* flow.c (notice_stack_pointer_modification_1,
notice_stack_pointer_modification, find_regno_partial_param,
find_regno_partial, initialize_uninitialized_subregs): Moved to
separate passes in separate files.
(life_analysis): Removed call to notice_stack_pointer_modification.
(rest_of_handle_life): Removed call to initialize_uninitialized_subargs.
* df-core.c (reset_df, pass_reset_df): New.
* Makefile.in (stack-ptr-mod.o, subregs-init.o): New.
* passes.c (pass_stack_ptr_mod, pass_initialize_subregs,
pass_reset_df): New passes.
* subregs-init.c: New file that contains separate pass for
initialize_uninitialized_subargs.
* stack-pointer-mod.c: New file that contains separate pass for
notice_stack_pointer_modification.
2006-04-19 Kenneth Zadeck <zadeck@naturalbridge.com>
* ifcvt.c (rest_of_handle_if_after_combine): Removed flow
scaffolding.
* passes.c (init_optimization_passes): Moved clear_df to after
combine and changed two expensive dce passes into a dse and fast
dce pass.
2006-04-18 Kenneth Zadeck <zadeck@naturalbridge.com>
* mode-switching.c (optimize_mode_switching): Created local
instance of df and removed references to flow.
* regmove.c (mark_flags_life_zones, regmove_optimize): Ditto.
* global.c (global_alloc, rest_of_handle_global_alloc): Reused
instance of df created in local alloc.
* local-alloc.c (rest_of_handle_local_alloc): Create instance of
ra_df used by all register allocation.
* bb-reorder.c (fix_crossing_conditional_branches): Removed code
to keep dataflow up to date.
* Makefile.in (bb-reorder.o): Removed ref to DF_H.
* passes.c (init_optimization_passes): Meved clear_df to before
partition_blocks.
2006-04-17 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (pass_recompute_reg_usage): Deleted. flow.c
(pass_recompute_reg_usage, recompute_reg_usage): Deleted. *
sched-ebb.c (begin_schedule_ready, schedule_ebb,
begin_schedule_ready, schedule_ebb, schedule_block): Threaded
local instance of df.
(schedule_ebbs): Created local instance of df.
* haifa-sched.c (schedule_block, sched_init, sched_finish,
generate_recovery_code, begin_speculative_block,
add_to_speculative_block, init_before_recovery,
create_recovery_block, create_check_block_twin, init_glat,
init_glat1): Threaded local instance of df.
* modulo-sched.c (sms_schedule): Ditto.
(rest_of_handle_sms): Removed unnecessary update of flow info.
* sched-int.h (df.h): Now includes this.
(schedule_block, sched_init, sched_finish, add_block): Added df
parm.
* sched-rgn.c (begin_schedule_ready, schedule_region,
schedule_insns): Threaded local instance of df.
(schedule_insns): Removed unnecessary update of flow info.
* Makefile.in (SCHED_INT_H): Added DF_H.
(ddg.o, modulo-sched.o, haifa-sched.o, sched-deps.o, sched-rgn.o,
sched-ebb.o): Removed DF_H.
* ddg.c (build_inter_loop_deps): Swapped parms.
(create_ddg): Swapped parms for call.
* passes.c (init_optimization_passes): Removed dce and
recompute_reg_use pass and moved clear_df to before first
schedulers.
2006-04-16 Kenneth Zadeck <zadeck@naturalbridge.com>
* df.h (shared_df): Removed.
(ra_df): New.
* core.c (shared_df): Removed.
(ra_df): New.
* postreload.c (reload_combine): Changed to use ra_df.
* reload.c (push_reload, find_dummy_reload): Ditto.
* global.c (global_alloc, global_conflicts, mark_elimination,
build_insn_chain, rest_of_handle_global_alloc): Ditto.
* reload1.c (compute_use_by_pseudos, reload): Ditto.
* local-alloc.c (local_alloc, block_alloc): Created local instance
of df.
* passes.c (init_optimization_passes): Moved clear_df to before
register allocators.
* tree-pass.h (pass_partition_blocks): Removed redundant
copy.
2006-04-16 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (pass_reset_df_after_reload): Removed.
* df-core.c (reset_df_after_reload, pass_reset_df_after_reload):
Removed.
* function.c (prologue_epilogue_df): New global.
(rtx keep_stack_depressed, thread_prologue_and_epilogue_insns):
Unthreaded local version of df and replaced with
prologue_epilogue_df.
* rtl.h (prologue_epilogue_df): New.
* passes.c (init_optimization_passes): Removed all uses of flow
after register allocation.
* config/i386/i386.c (ix86_eax_live_at_start_p): Replaced use of
flow with prologue_epilogue_df.
2006-04-15 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (pass_flow2): Renamed to
pass_thread_prologue_and_epilogue.
* passes.c (pass_flow2): Ditto.
* final.c (rest_of_clean_state): Removed flow2_completed.
* config/i386/i386.md: Ditto.
* config/sh/sh.md: Ditto.
* config/mips/mips.md: Ditto.
* config/h8300/h8300.md: Ditto.
* flow.c: Ditto.
(rest_of_handle_flow2): Moved to function.c as
rest_of_handle_thread_prologue_and_epilogue.
* timevar.def (TV_FLOW2): Renamed to
TV_THREAD_PROLOGUE_AND_EPILOGUE.
* function.c (keep_stack_depressed): Added df parameter.
(thread_prologue_and_epilogue_insns): Made local function and
removed unused parameter. Added local instance of df.
(rest_of_handle_thread_prologue_and_epilogue): New function
renamed from flow.c.
(pass_thread_prologue_and_epilogue): New pass.
* rtl.h (flow2_completed, thread_prologue_and_epilogue_insns):
Removed.
* df-problems.c (df_ru_get_bb_info, df_rd_get_bb_info,
df_lr_get_bb_info, df_ur_get_bb_info, df_urec_get_bb_info): Added
check.
* Makefile.in (function.o): Added timevar.h.
2006-04-13 Kenneth Zadeck <zadeck@naturalbridge.com>
* rtl-factoring (collect_pattern_seqs, clear_regs_live_in_seq,
recompute_gain_for_pattern_seq, clear_regs_live_in_seq,
recompute_gain, split_blocks_after_seqs, split_pattern_seq,
erase_matching_seqs, abstract_best_seq, rtl_seqabstr): Threaded
local instance of df to replace all references to flow.
(gate_rtl_seqabstr): Removed unnecessary calls.
* passes.c (init_optimization_passes): Moved clear_df before
rtl_seqabstr. Removed some expensive calls to dce.
* tree-pass.h (pass_fast_rtl_dce): New.
* regrename.c (gate_handle_regrename): Update call to pass.
* sched-rgn.c (rest_of_handle_sched2): Remove outdated calls.
2006-04-13 Kenneth Zadeck <zadeck@naturalbridge.com>
* regmove.c (rest_of_handle_stack_adjustments): Removed all
references to flow.c and replaced with df.
* passes.c (init_optimization_passes): Moved clear_df before
pass_stack_adjustments.
2006-04-12 Kenneth Zadeck <zadeck@naturalbridge.com>
* recog.c (delete_insn_chain_and_dflow): New function.
(peephole2_optimize): Replaced all flow references with df. Added
local instance of df.
* passes.c (init_optimization_passes): Moved clear_df before peephole2.
2006-04-11 Kenneth Zadeck <zadeck@naturalbridge.com>
* ifcvt.c (cond_exec_process_if_block, merge_if_block,
noce_process_if_block, cond_move_process_if_block,
process_if_block, find_if_header, find_cond_trap, find_if_case_1,
find_if_case_2, dead_or_predicable): Threaded local copy of df
thru the call stack.
(merge_if_block, find_cond_trap, find_if_case_1, find_if_case_2,
dead_or_predicable): Added code to update df in place.
(if_convert): Removed parameter concerned with correct dataflow
info, it now always is. Created instance of df. Removed code to
update old flow info.
(rest_of_handle_if_after_reload): Removed unnecessary calls to
cleanup_cfg.
* passes.c (init_optimization_passes): Moved clear_df to before
last ifconvert. Renamed pass_cprop to pass_cprop_hardreg.
* regrename.c (rest_of_handle_cprop): Renamed pass_cprop to
pass_cprop_hardreg.
* tree-pass.h: Renamed cprop to cprop_hardreg.
2006-04-11 Kenneth Zadeck <zadeck@naturalbridge.com>
* sched-ebb.c (schedule_ebbs): Removed code to update dataflow
after scheduling and removed unused parm from
reposition_prologue_and_epilogue_notes.
* sched-rgn.c (schedule_insns): Ditto.
(rest_of_handle_sched): Added temp hack to rebuild flow based dataflow
until flow is permanently removed.
* haifa-sched.c (init_glat): Modified to create glat from df info.
(attach_life_info, attach_life_info1, check_reg_live): Removed.
(free_glat): Now cleans up df.
* modulo-sched.c (compute_jump_reg_dependencies): Removed df parm.
* ifcvt.c (rest_of_handle_if_conversion): Added code to clean up
flow based reg_deaths after first call to ifconvert.
* function.c (reposition_prologue_and_epilogue_notes): Removed
unused parm.
* rtl.h (reposition_prologue_and_epilogue_notes): Ditto.
* sched-int.h (check_reg_live): Removed.
2006-04-10 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-core.c (reset_df_after_reload, clear_df): Added return to
make compatible with pass manager.
* dce.c (rest_of_handle_dce, rest_of_handle_fast_dce,
rest_of_handle_dse): Ditto.
2006-04-09 Kenneth Zadeck <zadeck@naturalbridge.com>
* regrename.c (merge_overlapping_regs, regrename_optimize):
Threaded private instance of df.
(regrename_optimize): Created private instance of df, removed
all references or flow.
(copyprop_hardreg_forward): Removed all references to flow.
(gate_handle_regrename): Split reg rename and cprop into separate
passes.
(gate_handle_cprop): New function.
(pass_cprop): New pass structure.
* tree-pass.h (pass_cprop): New pass structure.
* passes.c (init_optimization_passes): Added cprop pass and
moved clear_df pass closer to beginning.
2006-04-08 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h (pass_split_after_reload, pass_branch_target_load_optimize1
pass_branch_target_load_optimize2): Added.
(pass_branch_target_load_optimize): Deleted.
* flow.c (rest_of_handle_flow2): Split the calls to split_all_insns and
branch_target_load_optimize into their own passes.
* passes.c (init_optimization_passes): Ditto.
(init_optimization_passes): Moved clear_df pass to before
second branch_target_load_optimize pass.
* bt-load (compute_defs_uses_and_gen, build_btr_def_use_webs,
migrate_btr_defs): Threaded private copy of df into these functions.
(branch_target_load_optimize): Made private and add local
instance of df. Removed all references to flow.
(rest_of_handle_branch_target_load_optimize1): New function.
(rest_of_handle_branch_target_load_optimize): Renamed to
rest_of_handle_branch_target_load_optimize2.
rtl.h (branch_target_load_optimize): Removed.
2006-04-08 Kenneth Zadeck <zadeck@naturalbridge.com>
* sched-ebb.c (init_ready_list, can_schedule_ready_p, new_ready,
compute_jump_reg_dependencies, schedule_ebb, sched_analyze,
schedule_block): Changed to pass instance of df.
(compute_jump_reg_dependencies): Changed to use local instance
of dataflow.
* ddg.c (build_intra_loop_deps, sched_analyze,
build_intra_loop_deps): Changed to pass instance of df.
* ddg.h: added forward reference to struct df.
* haifa-sched.c (schedule_insns, schedule_insn,
schedule_block): Changed to pass instance of df.
* modulo-sched (compute_jump_reg_dependencies): Ditto.
(sms_schedule): Added call to do dce when stated.
* sched-deps.c (sched_analyze_insn, sched_analyze):
Changed to pass instance of df.
* rtl.h (schedule_insns, schedule_ebbs): Ditto.
* sched-int.h (init_ready_list, can_schedule_ready_p, new_ready,
compute_jump_reg_dependencies, sched_analyze, schedule_block):
Ditto.
* sched-rgn.c (check_live_1, update_live_1, check_live,
update_live, init_ready_list, can_schedule_ready_p, new_ready,
compute_jump_reg_dependencies, compute_block_backward_dependences,
schedule_region, schedule_insns): Ditto.
(schedule_insns): Removed call to update_life_info when finished.
(rest_of_handle_sched, rest_of_handle_sched2): Creates local
instance of df.
* passes.c (init_optimization_passes): moved clear_df pass
earlier.
* Makefile.in (df-core.o): Added except.h and dce.h
(modulo-sched.o): Added DF_H.
* recog.c (split_all_insns): Removed old code that was used to
update dataflow.
* reg-stack.c (rest_of_handle_stack_regs): Removed ifdefed out code.
2006-04-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* recog.c (split_all_insns): Removed parameter and code to
update dataflow.
* sched-rgn.c (rest_of_handle_sched2): Removed parm to
split_all_insns.
* flow.c (rest_of_handle_flow2): Ditto.
(rest_of_handle_split_all_insns): Added call to update old
dataflow after this pass.
(rest_of_handle_split_after_reload,
rest_of_handle_split_before_regstack): New function.
(pass_split_after_reload): New structure.
* rtl.h (split_all_insns): Removed param.
* bb-reorder.c (rest_of_handle_reorder_blocks): Removed
references to flow.
* reg-stack.c (subst_stack_regs_pat): Removed unnecessary
assertion.
2006-04-07 Daniel Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* regoc.c (dbr_schedule): Added parm to call to df_lr_add_problem.
* ifcvt.c (if_convert): Ditto.
* modulo-sched.c (sms_schedule): Ditto.
* reg-stack.c (reg_to_stack): Ditto.
* global.c (global_alloc, rest_of_handle_global_alloc): Ditto.
(rest_of_handle_global_alloc): Removed call to df_set_state.
* basic_block.h (clear_reg_deaths): New function.
* flow.c: (clear_reg_deaths): New function.
(rest_of_handle_life): Added parm to call to df_lr_add_problem and
df_ur_add_problem.
* df-scan.c (df_scan_free_internal): Added code to clear new
bit vectors.
(df_scan_alloc): Added extra parameter and code to initialize
new bit vectors.
(df_scan_dump): Added code to dump new bit vectors.
(df_problem problem_SCAN): Added extra field.
(df_scan_add_problem): Added flags parameter.
(df_rescan_blocks): Added code to remove deleted blocks from
bitmap and extra parm to call to df_scan_alloc.
(df_insn_create_insn_record): Removed return value.
(df_set_state): Removed function.
(df_ref_record, df_bb_refs_record, df_record_entry_block_defs,
df_record_exit_block_uses): Changed the way flags are processed.
(df_bb_refs_record, df_refs_record, df_record_exit_block_uses):
Restructured scanning to fixed hard regs so bitmaps could be
recorded for later use.
(df_has_eh_preds): Now public.
* df-core.c (df_mvs_dump, df_set_flags, df_clear_flags,
df_delete_basic_block): New function.
(df_init): Changed location of flags.
(df_add_problem): Added flags parameter and the way flags are
processed.
(df_insn_uid_debug, df_ref_debug, debug_df_defno, debug_df_ref,
debug_df_chain): Improved debugging output.
(clear_df): Added call to clear_reg_deaths.
* df.h: Some reordering to remove forward references.
(dataflow.flags): New field.
(df.flag): Deleted field.
(df_alloc_function): Added additional bitmap parameter.
(df_dependent_problem_function): New type.
(df_problem.changeable_flags): New field.
(df_ref_flags.DF_SCAN_INITIAL,
DF_SCAN_GLOBAL, DF_SCAN_POST_ALLOC, df_state): Removed.
(df_refs_chain_dump, df_ref_debug, df_chain_dump): Removed df
parameter.
(df_add_problem, df_ru_add_problem, df_rd_add_problem,
df_lr_add_problem, df_ur_add_problem, df_urec_add_problem,
df_ri_add_problem, df_scan_add_problem): Added flags parameter.
(df_set_state): Removed function.
(df_set_flags, df_clear_flags, df_delete_basic_block, df_has_eh_preds) New functions.
* df-problems.c (df_get_dependent_problem): Deleted function.
(df_ru_alloc, df_rd_alloc, df_lr_alloc, df_ur_alloc,
df_urec_alloc, df_chain_alloc, df_ri_alloc): Added all blocks
parameter.
(df_ru_alloc, df_rd_alloc): Now resets all blocks.
(df_ru_dump, df_rd_dump, df_lr_dump, df_ur_dump, df_urec_dump,
df_chains_dump): Fixed crash if problem was never run.
(df_ru_add_problem, df_rd_add_problem, df_lr_add_problem,
df_ur_add_problem, df_urec_add_problem, df_chain_add_problem,
df_ri_add_problem): Processes flags in uniform manner.
(df_lr_bb_local_compute): Fixed case to account for return value
correctly.
(df_lr_bb_local_compute): Changed processing of exit block.
(df_lr_transfer_function): Added hook to call dce.
(df_lr_free): Added lr problem data.
(df_set_notes_for_mw, df_reg_lifetime): Removed function.
(df_lr_simulate_artificial_refs_at_end, df_lr_simulate_one_insn,
df_kill_notes, df_set_unused_notes_for_mw, df_set_dead_notes_for_mw):
New function.
(df_ri_alloc, df_ri_bb_compute, df_create_unused_note,
df_ri_bb_compute, df_ri_compute, df_ri_free, df_ri_add_problem):
Added functionality to compute register information.
dce.c (deletable_insn_p): Cannot delete PREFETCHes.
(delete_unmarked_insns): Also delete noop moves as well as support for
calling dce from df.
(prescan_insns_for_dce, rest_of_handle_dce, end_fast_dce,
dce_process_block, rest_of_handle_fast_dce,
rest_of_handle_dse): Restructured to handle being directly called from
df.
2006-03-14 Kenneth Zadeck <zadeck@naturalbridge.com>
* tree-pass.h: Added pass to clear other dataflow infomation out.
* final.c (rest_of_handle_final, rest_of_clean_state): Cleared out
references to df.
(rest_of_clean_state) Added regstack_completed.
* reorg.c (fill_simple_delay_slots, fill_slots_from_thread,
fill_eager_delay_slots, make_return_insns): Added df parameter to function.
(make_return_insns, dbr_schedule) Added df parameter to calls.
* flow.c (update_life_info): Added glue code to df calls.
* df-scan.c (df_scan_free_internal, df_insn_refs_delete, df_ref_record): Added
code to properly handle multiword hard registers.
(df_ref_create_structure, df_ref_record): Added code to properly handle subregs.
(df_ref_create_structure): Changed switching structure.
(df_bb_refs_record): Fixed case where duplicate artificial refs
were created.
(df_record_entry_block_defs): Added code to make stack pointer
live in entry block. Refined cases where frame pointer is needed.
* df-core.c (df_mvs_dump, clear_df): New function.
(pass_clear_df): New pass structure.
(df_insn_uid_debug, df_ref_debug, debug_df_defno, debug_df_ref,
debug_df_chain): Improved debugging output.
* df.h: Some reordering to remove forward reference.
(df_ref_flags.DF_REF_MW_HARDREG, DF_REF_PARTIAL): New fields.
(df_ref_flags.DF_REF_DIES_AFTER_THIS_USE): Removed.
(df_mw_hardreg): New struct.
(DF_INSN_UID_MWS): New macro.
(df_refs_chain_dump, df_ref_debug, df_chain_dump): Removed df
parameter.
* rtl.h (regstack_completed): New global var.
* resource.c (mark_target_live_regs): Added passed in instance of
df.
* resource.h (mark_target_live_regs): Ditto.
* df-problems.c (df_chain_dump): Removed df parameter.
(df_ru_bb_local_compute_process_def,
df_rd_bb_local_compute_process_def, df_lr_bb_local_compute,
df_lr_bb_local_compute, df_chain_create_bb): Made subreg aware.
(df_ru_bb_local_compute, df_rd_bb_local_compute,
df_lr_bb_local_compute, df_lr_bb_local_compute,
df_chain_create_bb): Cleanup to use proper macros.
(df_ur_local_finalize, df_ur_local_finalize): Removed unnecessary
code to fixup bitvectors.
(df_ri_alloc): Cleared lifetime.
(df_ignore_stack_reg, df_kill_notes, df_set_notes_for_mw,
df_create_unused_note): New function.
(df_ri_bb_compute, df_ri_compute): Added code to create/update
REG_DEAD and REG_UNUSED notes.
* reg-stack.c (regstack_completed): New variable.
(reg_to_stack): Modified to use it's own instance of df.
(rest_of_handle_stack_regs): Removed most cleanup code.
* Makefile.in (reorg.o, RESOURCE_H): Added dependancy to df.h.
(final.o): Removed dependency to df.h
* passes.c (pass_magic_life): Removed.
(pass_clear_df): Added.
* dce.c (prescan_insns_for_dce, end_fast_dce): Now works if no instance of
df is available.
(dce_process_block): Made subreg aware.
(rest_of_handle_fast_dce): Reset bitvectors when iterating.
(prescan_insns_for_dse): Removed useless code.
2006-02-06 Daniel Berlin <dberlin@dberlin.org>
* doc/rtl.texi: Document REG_LIBCALL_ID.
* optabs.c (libcall_id): New variable.
(emit_no_conflict_block): Use it to emit
REG_LIBCALL_ID.
(emit_libcall_block): Ditto.
* combine.c (distribute_notes): Deal with
REG_LIBCALL_ID.
* reg-notes.def (LIBCALL_ID): New note.
* dce.c (marked_libcalls): New variable.
(in_libcall): Removed.
(mark_insn): Mark which libcalls we need to fully mark.
(mark_libcall_insns): New function.
(end_dce): Free marked_libcalls.
(init_dce): Allocate marked_libcalls.
Call mark_libcall_insns.
2006-01-17 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-core.c (df_iterative_dataflow): Added debugging assert.
(df_insn_uid_debug): New debugging function.
(df_insn_debug): Changed to used df_insn_uid_debug.
(df_analyze_problem): Made public.
* df.h (df_analyze_problem): Ditto.
* cfgcleanup.c (cleanup_cfg): Now calls run_fsst_dce.
* flow.c (update_life_info): Ditto.
* dce.c (init_dce, mark_insn,
mark_nonreg_stores, prescan_insns_for_dce): Added parameter so
that they could be called from both handle_rest_of_dce and
handle_rest_of_fast_dce.
(marked_insn_p): Added code to be tolerant of artifical defs,
which do not have insns.
(mark_nonreg_stores_2): New function.
(mark_artificial_uses, mark_reg_dependencies, store_base_local,
mark_escaping_stores, mark_dependent_stores,
prescan_insns_for_dse): Added parameter to mark_insn.
(rest_of_handle_dce): Added parameter to prescan_insns_for_dce.
(record_stores): Added parameter to mark_non_reg_stores.
(dce_process_block, rest_of_handle_fast_dce, gate_fast_dce,
run_fast_dce): New functions to do dce faster.
(rest_of_handle_dse) Added parameter to init_dce.
* dce.h (run_fast_dce): Added declaration.
2006-01-17 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_hard_reg_init): Moved declaration of i outside macro.
2006-01-17 Ian Lance Taylor <ian@airs.com>
* combine.c (combine_instructions): Pass instruction
to note_stores and set_nonzero_bits_and_sign_copies.
(set_nonzero_bits_and_sign_copies): We can't assume
anything about non-zero bits for registers initialized with
themselves if the register is not live on entry to the block.
2005-01-17 Kenneth Zadeck <zadeck@naturalbridge.com>
PR dataflow/25799
* df-problems.c (df_ru_confluence_n, df_rd_confluence_n):
Corrected confluence operator to remove bits from op2 before oring
with op1 rather than removing bits from op1.
* (df_ru_transfer_function): Corrected test on wrong bitmap which
caused infinite loop.
2005-01-17 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_scan_free_bb_info): Added basic block parameter to
be able to clean out basic block when not necessary.
(df_scan_free): Fixed to properly delete information if df is
unused before calling df_finish.
(df_scan_alloc, df_rescan_blocks, df_reg_chain_unlink,
df_insn_create_insn_record, df_bb_refs_record): Fixed formatting
or comment typos.
(df_bb_refs_delete): New function.
(df_refs_delete): Moved per block code to df_bb_refs_delete.
* df-core.c (df_set_blocks): Added code to properly clean out
unused blocks if they are not part of the blocks to consider.
(df_compact_blocks): Added basic block parameter to free_bb_fun to
be able to clean out basic block when not necessary
* df.h (df_free_bb_function): Ditto.
(df_bb_refs_delete): New function.
* df-problems.c (df_ru_free_bb_info, df_rd_set_bb_info,
df_lr_set_bb_info, df_ur_free_bb_info, df_urec_free_bb_info):Added
basic block parameter to be able to clean out basic block when not
necessary.
(df_ru_alloc, df_rd_alloc): Fixed dyslexic overflow test.
(df_ru_free, df_rd_free, df_lr_free, df_ur_free, df_urec_free):
Fixed to properly delete information if df is unused before
calling df_finish.
2006-01-06 Daniel Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* df-scan.c (df_reg_use_gen, df_reg_def_gen): Removed.
(df_insn_contains_asm_1): New function.
(df_insn_contains_asm): Rew