|
-maltivec)
2006-05-19 Daniel Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
PR rtl-optimization/26855
* df-scan.c (mw_reg_pool, mw_link_pool): New allocation pools for
multiword refs.
(df_scan_alloc): Added code to properly handle multiword hard
registers and add all_blocks parameter.
(df_scan_free_internal, df_insn_refs_delete, df_ref_record): Added
code to properly handle multiword hard registers.
(df_rescan_blocks): Added code to remove deleted blocks from
bitmap.
(df_ref_create_structure, df_ref_record): Added code to properly
handle subregs.
(df_ref_record_1): Changed DF_REF_CLOBBER into DF_REF_MUST_CLOBBER
and set DF_REF_PARTIAL.
(df_defs_record): Changed DF_REF_CLOBBER into DF_REF_MUST_CLOBBER.
(df_uses_record): Added DF_REF_PARTIAL for subreg.
(df_scan_add_problem): Added flags parameter.
(df_ref_create_structure): Changed switching structure.
(df_bb_refs_record): Fixed case where duplicate artificial refs
were created. Changed location of flags.
(df_record_entry_block_defs): Added code to make stack pointer
live in entry block. Refined cases where frame pointer is needed.
Changed location of flags.
(df_record_exit_block_uses, df_insn_refs_record): Changed location of flags.
(df_set_state): Removed function.
(df_grow_reg_info, df_reg_chain_unlink, df_ref_remove,
df_insn_create_insn_record, df_insn_refs_delete,
df_ref_create_structure): Formatting changes.
* 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.
(df_insn_debug, df_insn_uid_debug): Added multiword reg support.
(df_refs_chain_dump): Removed df parameter.
(df_iterative_dataflow): Added consistency check.
(df_prune_to_subcfg): Made public.
(df_analyze_problem): Added blocks_to_init parameter and made
public.
(df_ref_record, df_bb_refs_record, df_mark_reg,
df_record_exit_block_uses): Whitespace changes.
(df_dump): Whitespace changes.
* df.h: Some reordering to remove forward references.
(df_ref_flags.DF_REF_MW_HARDREG, DF_REF_PARTIAL,
DF_REF_MUST_CLOBBER, DF_REF_MAY_CLOBBER): New fields.
(df_ref_flags.DF_REF_CLOBBER): Deleted field.
(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_REF_DIES_AFTER_THIS_USE, DF_SCAN_INITIAL,
DF_SCAN_GLOBAL, DF_SCAN_POST_ALLOC, df_state): 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.
(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) New functions.
* df-problems.c (df_chain_dump): Removed df parameter.
(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_rd_bb_local_compute_process_def, df_ur_bb_local_compute,
df_chain_create_bb, df_create_unused_note, df_ri_bb_compute):
Split DF_REF_CLOBBER into DF_REF_MAY_CLOBBER and
DF_REF_MUST_CLOBBER cases.
(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_ur_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_urec_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 as well as register information.
(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_ru_alloc, df_ru_local_compute, df_ru_confluence_n, df_ru_free,
df_ru_dump, df_rd_local_compute, df_rd_confluence_n, df_rd_free,
df_rd_dump, df_urec_free_bb_info): Formatting changes.
(df_ru_free_bb_info, df_ru_bb_local_compute, df_ru_dump,
df_rd_free_bb_info, df_rd_bb_local_compute_process_def,
df_rd_bb_local_compute, df_rd_dump, df_lr_free_bb_info,
df_lr_bb_local_compute, df_lr_local_compute, df_ur_free_bb_info,
df_ur_dump, df_urec_free_bb_info, df_urec_dump,
df_chain_create_bb, df_ri_bb_compute): Whitespace changes.
* modulo-sched.c (sms_schedule): Added flag parameter to calls.
* see.c (see_initialize_data): Ditto.
* final.c (rest_of_clean_state) Added regstack_completed.
* rtl.h (regstack_completed): Ditto.
* reg-stack.c (regstack_completed): Ditto.
From-SVN: r113915
|
|
2005-01-11 Danny Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* df.h (DF_SCAN, DF_RU, DF_RD, DF_LR, DF_UR, DF_UREC, DF_CHAIN,
DF_RI, DF_LAST_PROBLEM_PLUS1, DF_DU_CHAIN, DF_UD_CHAIN,
DF_REF_TYPE_NAMES, DF_HARD_REGS, DF_EQUIV_NOTES, DF_SUBREGS,
DF_SCAN_BB_INFO, DF_RU_BB_INFO, DF_RD_BB_INFO, DF_LR_BB_INFO,
DF_UR_BB_INFO, DF_UREC_BB_INFO, DF_LIVE_IN, DF_LIVE_OUT,
DF_RA_LIVE_IN, DF_RA_LIVE_OUT, DF_UPWARD_LIVE_IN,
DF_UPWARD_LIVE_OUT, DF_REF_REAL_REG, DF_REF_REGNO,
DF_REF_REAL_LOC, DF_REF_REG, DF_REF_LOC, DF_REF_BB, DF_REF_BBNO,
DF_REF_INSN, DF_REF_INSN_UID, DF_REF_TYPE, DF_REF_CHAIN,
DF_REF_ID, DF_REF_FLAGS, DF_REF_NEXT_REG, DF_REF_PREV_REG,
DF_REF_NEXT_REF, DF_REF_DATA, DF_REF_REG_DEF_P, DF_REF_REG_USE_P,
DF_REF_REG_MEM_STORE_P, DF_REF_REG_MEM_LOAD_P, DF_REF_REG_MEM_P,
DF_DEFS_SIZE, DF_DEFS_GET, DF_DEFS_SET, DF_USES_SIZE, DF_USES_GET,
DF_USES_SET, DF_REG_SIZE, DF_REG_DEF_GET, DF_REG_DEF_SET,
DF_REG_USE_GET, DF_REG_USE_SET, 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_UID_GET, DF_INSN_UID_LUID, DF_INSN_UID_DEFS,
DF_INSN_UID_USES, DF_SCAN_INITIAL, DF_SCAN_GLOBAL,
DF_SCAN_POST_ALLOC): New macros.
(df_flow_dir, df_ref_type, df_ref_flags, df_alloc_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_dump_problem_function,
df_problem, dataflow, df_insn_info, df_reg_info, df_ref, df_link,
df_ref_info, df, df_map, df_scan_bb_info, df_ru_bb_info,
df_ru_bb_info, df_rd_bb_info, df_lr_bb_info, df_ur_bb_info,
df_urec_bb_info, ) New types.
(df_invalidated_by_call, df_all_hard_regs, df_state) New public
variables.
(df_init, df_add_problem, df_set_blocks, df_finish, df_analyze,
df_analyze_simple_change_some_blocks,
df_analyze_simple_change_one_block, 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_find_use,
df_iterative_dataflow, df_dump, df_chain_dump, df_refs_chain_dump,
df_regs_chain_dump, df_insn_debug, df_insn_debug_regno,
df_regno_debug, df_ref_debug, debug_df_insn, debug_df_regno,
debug_df_reg, debug_df_defno, debug_df_useno, debug_df_ref,
debug_df_chain, df_get_dependent_problem, df_chain_create,
df_chain_unlink, df_chain_copy, df_get_live_in, df_get_live_out,
df_grow_bb_info, df_chain_dump, df_print_bb_index,
df_ru_add_problem, df_ru_get_bb_info, df_rd_add_problem,
df_rd_get_bb_info, df_lr_add_problem, df_lr_get_bb_info,
df_ur_add_problem, df_ur_get_bb_info, df_urec_add_problem,
df_urec_get_bb_info, df_chain_add_problem, df_ri_add_problem,
df_reg_lifetime, df_scan_get_bb_info, df_scan_add_problem,
df_rescan_blocks, df_ref_create, df_get_artificial_defs,
df_get_artificial_uses, df_reg_chain_create, df_reg_chain_unlink,
df_ref_remove, df_insn_refs_delete, df_refs_delete,
df_reorganize_refs, df_set_state, df_hard_reg_init,
df_read_modify_subreg_p) New public functions.
* df-core.c: The core dataflow solver and glue routines for rtl
dataflow.
(df_init, df_add_problem, df_set_blocks, df_finish,
df_hybrid_search_forward, df_hybrid_search_backward,
df_iterative_dataflow, df_prune_to_subcfg, df_analyze_problem,
df_analyze, df_get_bb_info, df_set_bb_info, 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_refs_chain_dump, df_regs_chain_dump, df_insn_debug,
df_insn_debug_regno, df_regno_debug, df_ref_debug, debug_df_insn,
debug_df_reg, debug_df_regno, debug_df_ref debug_df_defno,
debug_df_useno, reset_df_after_reload): New functions.
* df-scan.c: The scanning fuctions, once in df.c, completely
rewritten so that they now fully model the functionality of
register usage at the backend.
(df_scan_free_internal, df_scan_get_bb_info, df_scan_set_bb_info,
df_scan_free_bb_info, df_scan_alloc, df_scan_free, df_scan_dump,
df_scan_add_problem, df_grow_reg_info, df_grow_ref_info,
df_grow_insn_info, df_rescan_blocks, df_ref_create,
df_get_artificial_defs, df_get_artificial_uses,
df_reg_chain_create, df_ref_unlink, df_reg_chain_unlink,
df_ref_remove, df_insn_create_insn_record, df_insn_refs_delete,
df_refs_delete, df_reorganize_refs, df_set_state,
df_ref_create_structure, df_ref_record, df_read_modify_subreg_p,
df_def_record_1, df_defs_record, df_uses_record,
df_insn_contains_asm_1, df_insn_contains_asm, df_insn_refs_record,
df_has_eh_preds, df_bb_refs_record, df_refs_record, df_mark_reg,
df_record_exit_block_uses, df_hard_reg_init): New functions.
* df-problems.c: Seven concrete dataflow problems that use the
scanning in df-scan.c and are solved by the engine in df-core.c.
(df_get_dependent_problem, df_chain_create, df_chain_unlink,
df_chain_copy, df_get_live_in, df_get_live_out, df_grow_bb_info,
df_chain_dump, df_print_bb_index, df_ref_bitmap, df_set_seen,
df_unset_seen, 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_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_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_free,
df_lr_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_local_finalize, df_ur_confluence_n, df_ur_transfer_function,
df_ur_free, df_ur_dump, df_ur_add_problem, df_urec_get_bb_info,
df_urec_set_bb_info, df_urec_free_bb_info, df_urec_alloc,
df_urec_mark_reg_change, df_urec_check_earlyclobber,
df_urec_mark_reg_use_for_earlyclobber,
df_urec_mark_reg_use_for_earlyclobber_1, 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_dump, df_urec_add_problem, df_chain_alloc,
df_chain_create_bb_process_use, df_chain_create_bb,
df_chain_finalize, df_chain_free, df_chains_dump,
df_chain_add_problem, df_ri_alloc, df_ri_bb_compute,
df_ri_compute, df_ri_free, df_ri_dump, df_ri_add_problem,
df_reg_lifetime): New functions.
* df.c: Deleted file.
* ddg.c (create_ddg_dep_no_link, build_inter_loop_deps): Made code
consistent with new df api.
* modulo-sched.c (sms_schedule, rest_of_handle_sms,
rest_of_handle_sms): Ditto.
* web.c (unionfind_union, union_defs, entry_register, web_main):
Ditto.
* loop_invariant.c (invariant_for_use, hash_invariant_expr_1,
invariant_expr_equal_p, find_defs, check_dependencies,
find_invariant_insn, find_invariants_to_move, move_invariant_reg,
free_inv_motion_data, move_loop_invariants): Ditto.
* sched-deps.c (sched_analyze_1): Ditto.
Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com>
From-SVN: r109577
|