Commit Graph

690 Commits

Author SHA1 Message Date
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Steve Ellcey bb27eeda7d re PR target/31850 (gcc.c-torture/compile/limits-fnargs.c is slow at compiling for spu-elf)
PR target/31850
	* rtl.h (push_to_sequence2): New.
	* emit-rtl.c (push_to_sequence2): New.
	* function.c (assign_parm_data_all): Add new fields.
	(assign_parm_setup_block): Call push_to_sequence2 instead of 
	push_to_sequence.
	(assign_parm_setup_reg): Ditto.
	(assign_parm_setup_stack): Ditto.
	(assign_parms_unsplit_complex): Ditto.
	(assign_parms): Change field name.

From-SVN: r125532
2007-06-07 16:46:26 +00:00
Zdenek Dvorak a7b87f730f haifa-sched.c (restore_bb_notes): Clear bb field of the notes emited outside of basic block.
* haifa-sched.c (restore_bb_notes): Clear bb field of the notes
	emited outside of basic block.
	* cfgbuild.c (find_bb_boundaries): Clear bb field for insns between
	the created blocks.
	* rtl.h (delete_insn_chain): Declaration changed.
	* cfgrtl.c (delete_insn_chain): Add option to clear bb field for
	non-removed insns.
	(rtl_delete_block, rtl_merge_blocks): Pass true to delete_insn_chain.
	(delete_insn_chain_and_edges, try_redirect_by_replacing_jump,
	rtl_tidy_fallthru_edge, cfg_layout_merge_blocks): Pass false 
	to delete_insn_chain.
	(rtl_verify_flow_info_1): Verify that the insns in header and footer
	do not have bb field set.
	(rtl_verify_flow_info): Verify that insns between basic blocks do not
	have bb field set.
	* recog.c (peephole2_optimize): Add argument to delete_insn_chain call.
	* cfgcleanup.c (try_optimize_cfg): Ditto.

From-SVN: r125492
2007-06-06 14:46:34 +00:00
Jan Hubicka a38e7aa544 gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER...
* gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	* ddg.c (create_ddg): LIkewise.
	* final.c (final): Remove hunk moving line numbernotes around since
	they are no longer present at this stage.
	(final_scan_insn): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(output_asm_label): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* haifa-sched.c (unlink_other_notes): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* graph.c (start_bb): Likewise.
	* rtl.def (NOTE): Update description.
	* jump.c (squeeze_notes): Delete.
	(mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
	NOTE_INSN_BASIC_BLOCK_P when possible.
	* ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
	* dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
        NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(dwarf2out_var_location): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(find_basic_blocks_1): Likewise.
	* function.c (reorder_blocks_1): Likewise.
	(epilogue_done): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise; drop code for printing line number
	notes.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* gcse.c (insert_insn_start_bb): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	* calls.c (fixup_tail_calls): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	* emit-rtl.c (add_insn_after): Likeiwse.
	(emit_label_before): Likewise.
	(emit_label_after): Likewise.
	(emit_note_before, emit_note_after, emit_note): Update
	parameter to be enum insn_note; do not deal with source
	files.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
	Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
	when possible.
	(merge_blocks_move_successor_nojumps): Simplify now when
	we don't have BLOCK notes.
	(try_optimize_cfg): Likewise.
	* cfglayout.c (skip_insns_after_block): Likewise.
	(record_effective_endpoints): Likewise.
	(duplicate_insn_chain): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.
	* sched-deps.c (sched_analyze): Likewise.
	* rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
	Exterminate.
	(note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
	* rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
	(SET_INSN_DELETED): Simplify.
	(NOTE_LINE_NUMBER): Exterminate.
	(NOTE_LINE_KIND): New.
	(NOTE_INSN_BASIC_BLOCK_P): Update.
	(enum insn_note): Simplify.
	(GET_NOTE_INSN_NAME) Simplify.
	(emit_note_before, emit_note_after, emit_note): Update prototype.
	(squeeze_notes): Remove.
	* sched-int.h (NOTE_NOT_BB_P): Update.
	* resource.c (mark_target_live_regs): Update.
	* sched-rgn.c (debug_dependencies): Update.
	* sched-vis.c (print_insn): Update.
	* config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
	* config/i386/i386.c (ix86_output_function_epilogue): Update.
	* config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
	(TARGET_ADJUST_UNROLL_MAX): Likewise.
	(split_branches): Update.
	(sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
	4.0.0.
	(sh_adjust_unroll_max): Exterminate.
	* config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
	(m68hc11_reorg): Likewise.
	* config/ia64/ia64.c (emit_insn_group_barriers): Update.
	(emit_predicate_relation_info): Update.
	(process_for_unwind_directive): Update.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
	(output_call): Update.
	* config/pa/pa.c (output_lbranch): Update.
	(output_millicode_call): Update.
	(output_call): Update.
	(pa_combine_instructions): Update.
	* config/mips/mips.c (mips16_gp_pseudo_reg): Update.
	* config/bfin/bfin.c (gen_one_bundle): Update.
	* cfgrtl.c (can_delete_note_p): Update.
	(delete_insn): Update.
	(rtl_merge_blocks): Update.
	(commit_one_edge_insertion): Update.
	(rtl_verify_flow_info): Update.
	* stmt.c (expand_case): Do not call squeeze_notes.

From-SVN: r124895
2007-05-21 06:19:50 +00:00
Jan Hubicka 55e092c4d0 alpha.c (alpha_output_mi_thunk_osf): Use insn_locators_alloc instead of insn_locators_initialize...
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Use
	insn_locators_alloc instead of insn_locators_initialize;
	call reset_block_changes.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
	* config/sh/sh.c (sparc_output_mi_thunk): Likewise.
	* config/is64/ia64.c (ia64_output_mi_thunk): Likewise.
	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
	* config/score/score.c (th_output_mi_thunk): Likewise.
	* config/mips/mips.c (mips_output_mi_thunk): Likewise.
	* cfglyaout.c (set_curr_insn_source_location, set_curr_insn_block):
	tolerate uninitialized locator info.

	Re-apply:
	* function.c (init_function_start): Don't init line number info.
	(expand_function_end): Update.
	(reset_block_changes, record_block_change, finalize_block_changes,
	check_block_change, free_block_changes): Kill.
	* function.h (reset_block_changes, record_block_change,
	finalize_block_changes, check_block_change, free_block_changes): Remove
	prototypes.
	(struct function): Remove ib_boundaries_block.
	* emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
	Use curr_insn_locator to initialize locator.
	(emit_line_note): Remove.
	* cfgexpand.c (expand_gimple_cond_expr): Update.
	(construct_exit_block): Likewise.
	(tree_expand_cfg): Initialize/finalize locators.
	* expr.c (expand_expr_real): Update.
	* cfglayout.c (line_locators_locs, line_locators_lines,
	file_locators_locs, file_locators_files): Remove.
	(set_block_levels): Move to cfgexpand.c.
	(insn_locators_initialize): Remove.
	(pass_insn_locators_initialize): Remove.
	(locations_locators_locs, locations_locators_vals): New static vars.
	(curr_location, last_location, curr_block, last_block, curr_rtl_loc):
	Likewise.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	New functions.
	(locator_location): New.
	(locator_line, locator_file): Rewrite.
	* rtl.h (emit_line_note): Kill.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	Declare.
	* tree-inline.c (initialize_cfun): Do not initialize
	ib_boundaries_block.
	* passes.c (pass_insn_locators_initialize): Remove.

From-SVN: r124258
2007-04-28 08:20:08 +00:00
Jan Hubicka ec9ac2bc42 Revert:
2007-04-23  Jan Hubicka  <jh@suse.cz>
	* function.c (init_function_start): Don't init line number info.
	(expand_function_end): Update.
	(reset_block_changes, record_block_change, finalize_block_changes,
	check_block_change, free_block_changes): Kill.
	* function.h (reset_block_changes, record_block_change,
	finalize_block_changes, check_block_change, free_block_changes): Remove
	prototypes.
	(struct function): Remove ib_boundaries_block.
	* emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
	Use curr_insn_locator to initialize locator.
	(emit_line_note): Remove.
	* cfgexpand.c (expand_gimple_cond_expr): Update.
	(construct_exit_block): Likewise.
	(tree_expand_cfg): Initialize/finalize locators.
	* expr.c (expand_expr_real): Update.
	* cfglayout.c (line_locators_locs, line_locators_lines,
	file_locators_locs, file_locators_files): Remove.
	(set_block_levels): Move to cfgexpand.c.
	(insn_locators_initialize): Remove.
	(pass_insn_locators_initialize): Remove.
	(locations_locators_locs, locations_locators_vals): New static vars.
	(curr_location, last_location, curr_block, last_block, curr_rtl_loc):
	Likewise.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	New functions.
	(locator_location): New.
	(locator_line, locator_file): Rewrite.
	* rtl.h (emit_line_note): Kill.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	Declare.
	* tree-inline.c (initialize_cfun): Do not initialize
	ib_boundaries_block.
	* passes.c (pass_insn_locators_initialize): Remove.

From-SVN: r124094
2007-04-24 00:05:57 +00:00
Jan Hubicka c90533c60b function.c (init_function_start): Don't init line number info.
* function.c (init_function_start): Don't init line number info.
	(expand_function_end): Update.
	(reset_block_changes, record_block_change, finalize_block_changes,
	check_block_change, free_block_changes): Kill.
	* function.h (reset_block_changes, record_block_change,
	finalize_block_changes, check_block_change, free_block_changes): Remove
	prototypes.
	(struct function): Remove ib_boundaries_block.
	* emit-rtl.c (make_insn_raw, make_jump_insn_raw, make_call_insn_raw):
	Use curr_insn_locator to initialize locator.
	(emit_line_note): Remove.
	* cfgexpand.c (expand_gimple_cond_expr): Update.
	(construct_exit_block): Likewise.
	(tree_expand_cfg): Initialize/finalize locators.
	* expr.c (expand_expr_real): Update.
	* cfglayout.c (line_locators_locs, line_locators_lines,
	file_locators_locs, file_locators_files): Remove.
	(set_block_levels): Move to cfgexpand.c.
	(insn_locators_initialize): Remove.
	(pass_insn_locators_initialize): Remove.
	(locations_locators_locs, locations_locators_vals): New static vars.
	(curr_location, last_location, curr_block, last_block, curr_rtl_loc):
	Likewise.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	New functions.
	(locator_location): New.
	(locator_line, locator_file): Rewrite.
	* rtl.h (emit_line_note): Kill.
	(insn_locators_alloc, insn_locators_finalize,
	set_curr_insn_source_location, set_curr_insn_block, curr_insn_locator):
	Declare.
	* tree-inline.c (initialize_cfun): Do not initialize
	ib_boundaries_block.
	* passes.c (pass_insn_locators_initialize): Remove.

From-SVN: r124061
2007-04-23 09:53:59 +00:00
Steven Bosscher ad21dab7f7 tracer.c (tracer): Don't take FLAGS argument.
* tracer.c (tracer): Don't take FLAGS argument.  Assert we are
	in cfglayout mode.  Don't go into and out of cfglayout mode.
	Link the blocks in the order of the constructed traces.
	(rest_of_handle_tracer): Adjust call to tracer.
	* loop-init.c (rtl_loop_init): Assert we are in cfglayout mode.
	Don't go into cfglayout mode.
	(rtl_loop_done): Don't go out of cfglayout mode.
	* cfglayout.c (relink_block_chain): New function, split out from...
	(fixup_reorder_chain): ...here.  Remove redundant checking.
	(cfg_layout_finalize): Don't clear the header, footer, and aux
	fields here, move the code to do so to relink_block_chain.  Likewise
	for free_original_copy_tables.
	* rtl.h (tracer): Update prototype.
	* bb-reorder.c (reorder_basic_blocks): Don't take FLAGS argument.
	Assert we are in cfglayout mode.  Don't go into and out of cfglayout
	mode.  Use relink_block_chain to serialize the CFG according to the
	new basic block order.  Move targetm.cannot_modify_jumps_p check from
	here...
	(gate_handle_reorder_blocks): ...to here.
	(duplicate_computed_gotos): Move targetm.cannot_modify_jumps_p check
	from here...
	(gate_duplicate_computed_gotos): ...to here.
	(rest_of_handle_reorder_blocks): Don't see if anything has changed,
	something always changes when going into and out of cfglayout mode.
	Perform an expensive cfg cleanup while going into cfglayout mode.
	Always update liveness information on HAVE_conditional_execution
	targets.  Reserialize the basic blocks and go out of cfglayout mode.
	* reg-stack.c: Include cfglayout.h.
	(rest_of_handle_stack_regs): Go into and out of cfglayout mode around
	the call to reorder_basic_blocks.
	* basic-block.h (reorder_basic_blocks): Update prototype.
	(relink_block_chain): New prototype.
	* passes.c (pass_outof_cfg_layout_mode): Move after cse2.

From-SVN: r123167
2007-03-23 23:05:28 +00:00
Richard Sandiford 2a45063980 rtl.h (constant_pool_reference_p): Delete.
gcc/
	* rtl.h (constant_pool_reference_p): Delete.
	(find_constant_src): Declare.
	* rtlanal.c (find_constant_src): New function.
	* simplify-rtx.c (constant_pool_reference_p): Delete.
	* config/i386/i386.md: Use find_constant_src instead of
	constant_pool_reference_p/avoid_constant_pool_reference pairs.

From-SVN: r123106
2007-03-21 09:10:08 +00:00
Alexandre Oliva 0de2ae0273 rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
* rtl.h (gen_rtx_ASM_INPUT): Use "" instead of NULL file name.
* final.c (final_scan_insn): Test for non-"" file name.

From-SVN: r122750
2007-03-09 15:10:33 +00:00
Alexandre Oliva bff4b63d31 rtl.def (ASM_INPUT): Add location.
* rtl.def (ASM_INPUT): Add location.
* rtl.h (ASM_INPUT_SOURCE_LOCATION): New.
(ASM_INPUT_SOURCE_FILE, ASM_INPUT_SOURCE_LINE): New.
(decode_asm_operands): Add loc operand.
(gen_rtx_ASM_INPUT, gen_rtx_ASM_INPUT_loc): Define.
* stmt.c (expand_asm): Rename to...
(expand_asm_loc): ... this.  Add locus argument.  Pass it on to
gen_rtx_ASM_INPUT_loc.
(expand_asm_expr): Adjust.
* recog.c (decode_asm_operands): Add loc operand.
(check_asm_operands, extract_insn): Adjust.
* reload1.c (maybe_fix_stack_asms): Likewise.
* final.c (asm_insn_count): Likewise.
(final_scan_insn): Output # line before and after asm.

From-SVN: r122742
2007-03-09 07:36:43 +00:00
Richard Sandiford 7ffb5e7879 Makefile.in (rtlanal.o): Depend on tree.h.
gcc/
	* Makefile.in (rtlanal.o): Depend on tree.h.
	* rtl.h (offset_within_section_p, split_const): Declare.
	* rtlanal.c: Include tree.h.
	(offset_within_block_p): New function, taken from
	mips_offset_within_object_p.
	(split_const): New function, taken from mips_split_const.
	* config/m68k/m68k-protos.h (m68k_illegitimate_symbolic_constant_p):
	Declare.
	* config/m68k/m68k.h (M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P): Define.
	(CONSTANT_ADDRESS_P): Only accept legitimate constants.
	(LEGITIMATE_CONSTANT_P): Check m68k_illegitimate_symbolic_constant_p.
	* config/m68k/m68k.c (TARGET_CANNOT_FORCE_CONST_MEM): Define.
	(m68k_illegitimate_symbolic_constant_p): New function.
	* config/m68k/m68k.md (movsi): Remove misleading predicates.
	If M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P and the source is a
	symbolic constant that might be outside the symbol's section,
	move the symbol first and then add the offset.
	* config/m68k/uclinux.h (M68K_OFFSETS_MUST_BE_WITHIN_SECTIONS_P):
	Override.
	* config/mips/mips.c (mips_split_const): Delete.
	(mips_offset_within_object_p): Delete.
	(mips_symbolic_constant_p): Use offset_within_section_p and
	split_const instead of mips_offset_within_object_p and
	mips_split_const.
	(mips_cannot_force_const_mem, mips_const_insns, mips_unspec_address)
	(mips_legitimize_const_move, print_operand_reloc)
	(mips_dangerous_for_la25_p): Use split_const instead of
	mips_split_const.

From-SVN: r122428
2007-03-01 09:58:12 +00:00
Steven Bosscher 7cd689bcf0 rtl.h (remove_reg_equal_equiv_notes): New prototype.
* rtl.h (remove_reg_equal_equiv_notes): New prototype.
	* rtlanal.c (remove_reg_equal_equiv_notes): New function.
	* combine.c (adjust_for_new_dest): Use it.
	* postreload.c (reload_combine): Likewise.

From-SVN: r122178
2007-02-20 22:14:41 +00:00
Paolo Bonzini c47277a619 jump.c (get_label_after): Delete.
2007-02-15  Paolo Bonzini  <bonzini@gnu.org>

	* jump.c (get_label_after): Delete.
	(get_label_before, delete_computation, delete_jump,
	delete_prior_computation, follow_jumps): Move...
	* reorg.c (delete_computation, delete_prior_computation): ... here...
	(get_label_before, delete_jump): ... making these static ...
	(follow_jumps): ... and simplifying this since it only runs after
	reload.
	* rtl.h (get_label_after, get_label_before, delete_jump,
	follow_jumps): Delete prototypes.

From-SVN: r122003
2007-02-15 16:40:16 +00:00
Kazu Hirata a638bdc2fd emit-rtl.c (renumber_insns): Remove.
* emit-rtl.c (renumber_insns): Remove.
	* flags.h: Remove the extern for flag_renumber_insns.
	* rtl.h: Remove the prototype for renumber_insns.
	* toplev.c (flag_renumber_insns): Remove.

From-SVN: r121517
2007-02-02 19:02:18 +00:00
Maxim Kuvyrkov b198261f9c re PR middle-end/28071 (A file that can not be compiled in reasonable time/space)
* sched-int.h (ds_to_dk, dk_to_ds): Declare functions.
	
	(struct _dep): New type.
	(dep_t): New typedef.
	(DEP_PRO, DEP_CON, DEP_KIND): New access macros.
	(DEP_STATUS): New access macro.  The macro with the same name was
	renamed to DEP_LINK_STATUS.
	(dep_init): Declare function

	(struct _dep_link): New type.
	(dep_link_t): New typedef.
	(DEP_LINK_NODE, DEP_LINK_NEXT, DEP_LINK_PREV_NEXTP): New access macros.
	(DEP_LINK_DEP, DEP_LINK_PRO, DEP_LINK_CON, DEP_LINK_KIND): New macros.
	(DEP_LINK_STATUS): New macro.
	(debug_dep_links): New debug function.

	(struct _deps_list): New type.
	(deps_list_t): New typedef.
	(DEPS_LIST_FIRST): New access macro.
	(FOR_EACH_DEP_LINK): New cycle macro.
	(create_deps_list, free_deps_list, delete_deps_list): Declare
	functions.
	(deps_list_empty_p, debug_deps_list, add_back_dep_to_deps_list): Ditto.
	(find_link_by_pro_in_deps_list, find_link_by_con_in_deps_list): Ditto.
	(copy_deps_list_change_con): Ditto.

	(move_dep_link): Declare function.

	(struct _dep_node): New type.
	(dep_node_t): New typedef.
	(DEP_NODE_BACK, DEP_NODE_DEP, DEP_NODE_FORW): New access macros.

	(struct haifa_insn_data.back_deps): New field to hold backward
	dependencies of the insn.
	(struct haifa_insn_data.depend): Rename to forw_deps.  Change its type
	to deps_list_t.
	(struct haifa_insn_data.resolved_deps): Rename to resolved_back_deps.
	Change its type	to deps_list_t.
	(INSN_BACK_DEPS): New access macro to use instead of LOG_LINKS.
	(INSN_DEPEND): Rename to INSN_FORW_DEPS.
	(RESOLVED_DEPS): Rename to INSN_RESOLVED_BACK_DEPS.

	(INSN_COST): Move to haifa-sched.c.  Use insn_cost () instead.
	
	(DEP_STATUS): Rename to DEP_LINK_STATUS.  Fix typo in the comment.

	(add_forw_dep, delete_back_forw_dep, insn_cost): Update declaration and
	all callers.
	(dep_cost): Declare.
	
	* sched-deps.c (CHECK): New macro to (en/dis)able sanity checks.
	(ds_to_dk, dk_to_ds): New functions.
	
	(init_dep_1): New static function.
	(init_dep): New function.
	(copy_dep): New static function.
	
	(dep_link_consistent_p, attach_dep_link, add_to_deps_list): New static
	functions.
	(detach_dep_link): New static function.
	(move_dep_link): New function.
	
	(dep_links_consistent_p, dump_dep_links): New static functions.
	(debug_dep_links): New debugging function.
	
	(deps_obstack, dl_obstack, dn_obstack): New static variables.
	
	(alloc_deps_list, init_deps_list): New static functions.
	(create_deps_list): New function.
	(clear_deps_list): New static function.
	(free_deps_list, delete_deps_list, deps_list_empty_p): New functions.
	(deps_list_consistent_p, dump_deps_list): New static functions.
	(debug_deps_list): New function.
	(add_back_dep_to_deps_list, find_link_by_pro_in_deps_list): New
	functions.
	(find_link_by_con_in_deps_list, copy_deps_list_change_con): Ditto.

	(maybe_add_or_update_back_dep_1, add_or_update_back_dep_1): Update to
	use new scheduler dependencies lists.
	(add_back_dep, delete_all_dependences, fixup_sched_groups): Ditto.
	(sched_analyze): Ditto.  Initialize dependencies lists.
	(add_forw_dep, compute_forward_dependences): Update to use new
	scheduler dependencies lists.
	
	(init_dependency_caches): Init deps_obstack.
	(free_dependency_caches): Free deps_obstack.
	
	(adjust_add_sorted_back_dep, adjust_back_add_forw_dep): Update to use
	new scheduler dependencies lists.
	(delete_forw_dep, add_or_update_back_forw_dep): Ditto.
	(add_back_forw_dep, delete_back_forw_dep): Ditto.

	* sched-rgn.c (set_spec_fed, find_conditional_protection, is_pfree):
	Update to use new scheduler dependencies lists.
	(is_conditionally_protected, is_prisky, add_branch_dependences): Ditto.
	(debug_dependencies): Ditto.
	(schedule_region): Update comments.
	
	* sched-ebb.c (earliest_block_with_similiar_load): Update to use new
	scheduler dependencies lists.
	(schedule_ebb): Update comments.
	
	* rtl.def (DEPS_LIST): Remove.
	
	* lists.c (unused_deps_list): Remove.
	(free_list): Update assertions.
	
	(alloc_DEPS_LIST, free_DEPS_LIST_list, free_DEPS_LIST_node): Remove.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.

	* rtl.h (free_DEPS_LIST_list, alloc_DEPS_LIST): Remove declarations.
	(remove_free_DEPS_LIST_elem, copy_DEPS_LIST_list): Ditto.
	
	* haifa-sched.c (comments): Update.
	(insn_cost1): Remove.  Inline the code into insn_cost ().
	(insn_cost): Update to use new scheduler dependencies lists.  Move
	processing of the dependency cost to dep_cost ().
	(dep_cost): New function.  Use it instead of insn_cost () when
	evaluating cost of the dependency.  Use compatible interface to
	interact with the target.
	(priority): Update to use new scheduler dependencies lists.
	(rank_for_schedule): Ditto.  Optimize heuristic that prefers the insn
	with greater number of insns that depend on the insn.
	(schedule_insn): Update to use new scheduler dependencies lists.  Add
	code to free backward dependencies lists.  Inline and optimize code
	from resolve_dep () - see PR28071.
	(ok_for_early_queue_removal): Update to use new scheduler dependencies
	lists.  Update call to targetm.sched.is_costly_dependence hook.
	
	(fix_inter_tick, try_ready, fix_tick_ready): Update to use new
	scheduler dependencies lists.
	
	(resolve_dep): Remove.  Move the logic to schedule_insn ().
	(init_h_i_d): Initialize dependencies lists.
	
	(process_insn_depend_be_in_spec): Rename to
	process_insn_forw_deps_be_in_spec.  Update to use new scheduler
	dependencies lists.
	(add_to_speculative_block, create_check_block_twin, fix_recovery_deps):
	Update to use new scheduler dependencies lists.
	(clear_priorities, calc_priorities, add_jump_dependencies): Ditto.
	
	* ddg.c (create_ddg_dependence, create_ddg_dep_no_link): Update to use
	new scheduler dependencies lists.
	(build_intra_loop_deps): Ditto.
	
	* target.h (struct _dep): Declare to use in
	gcc_target.sched.is_costly_dependence.
	(struct gcc_target.sched.adjust_cost): Fix typo.
	(struct gcc_target.sched.is_costly_dependence): Change signature to use
	single dep_t parameter instead of an equivalent triad.
	(struct gcc_target.sched.adjust_cost_2): Remove.

	* target-def.h (TARGET_SCHED_ADJUST_COST_2): Remove.

	* reg-notes.def (DEP_TRUE, DEP_OUTPUT, DEP_ANTI): Update comments.

	* doc/tm.texi (TARGET_SCHED_IS_COSTLY_DEPENDENCE): Update
	documentation.
	(TARGET_SCHED_ADJUST_COST_2): Remove documentation.

	* doc/rtl.texi (LOG_LINKS): Remove part about instruction scheduler.
	(REG_DEP_TRUE): Document.
	
	* config/ia64/ia64.c (ia64_adjust_cost_2): Rename to ia64_adjust_cost.
	Change signature to correspond to the targetm.sched.adjust_cost hook.  
	Update use in TARGET_SCHED_ADJUST_COST_2.
	(TARGET_SCHED_ADJUST_COST_2): Rename to TARGET_SCHED_ADJUST_COST.
	(ia64_dependencies_evaluation_hook, ia64_dfa_new_cycle): Update to use
	new scheduler dependencies lists.
	(ia64_gen_check): Ditto.

	* config/mips/mips.c (vr4130_swap_insns_p): Update to use new scheduler
	dependencies lists.
	
	* config/rs6000/rs6000.c (rs6000_is_costly_dependence): Change
	signature to correspond to the targetm.sched.is_costly_dependence hook.
	(is_costly_group): Update to use new scheduler dependencies lists.

	* config/spu/spu.c (spu_sched_adjust_cost): Use insn_cost () function
	instead of INSN_COST () macro.

From-SVN: r121494
2007-02-02 09:11:11 +00:00
Ian Lance Taylor e53a16e75f lower-subreg.c: New file.
gcc/:
	* lower-subreg.c: New file.
	* rtl.def (CONCATN): Define.
	* passes.c (init_optimization_passes): Add pass_lower_subreg and
	pass_lower_subreg2.
	* emit-rtl.c (update_reg_offset): New static function, broken out
	of gen_rtx_REG_offset.
	(gen_rtx_REG_offset): Call update_reg_offset.
	(gen_reg_rtx_offset): New function.
	* regclass.c: Revert patch of 2006-03-05, restoring
	reg_scan_update.
	(clear_reg_info_regno): New function.
	* dwarf2out.c (concatn_loc_descriptor): New static function.
	(loc_descriptor): Handle CONCATN.
	* common.opt (fsplit_wide_types): New option.
	* opts.c (decode_options): Set flag_split_wide_types when
	optimizing.
	* timevar.def (TV_LOWER_SUBREG): Define.
	* rtl.h (gen_reg_rtx_offset): Declare.
	(reg_scan_update): Declare.
	* regs.h (clear_reg_info_regno): Declare.
	* tree-pass.h (pass_lower_subreg): Declare.
	(pass_lower_subreg2): Declare.
	* doc/invoke.texi (Option Summary): List -fno-split-wide-types.
	(Optimize Options): Add -fsplit-wide-types to -O1 list.  Document
	-fsplit-wide-types.
	* doc/rtl.texi (Regs and Memory): Document concat and concatn.
	* Makefile.in (OBJS-common): Add lower-subreg.o.
	(lower-subreg.o): New target.
gcc/testsuite/:
	* gcc.dg/lower-subreg-1.c (test): New test.

From-SVN: r121453
2007-02-01 01:09:35 +00:00
Kazu Hirata 9b1ae0a097 basic-block.h: Remove the prototype for expected_value_to_br_prob.
* basic-block.h: Remove the prototype for
	expected_value_to_br_prob.
	* rtl.h: Remove the prototypes for expand_builtin_expect_jump
	and purge_line_number_notes.

From-SVN: r120186
2006-12-24 01:47:56 +00:00
Kazu Hirata 3c1dd4a384 * rtl.h (NOTE_EXPECTED_VALUE): Remove.
From-SVN: r120169
2006-12-23 16:01:47 +00:00
Joseph Myers f1f4e530a5 rtlanal.c (struct subreg_info, [...]): New.
* rtlanal.c (struct subreg_info, subreg_get_info, subreg_nregs):
	New.
	(subreg_regno_offset, subreg_offset_representable_p): Change to
	wrappers about subreg_get_info.
	(refers_to_regno_p, reg_overlap_mentioned_p): Use subreg_nregs.
	* rtl.h (subreg_nregs): Declare.
	* doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING): Update to refer to
	subreg_get_info.
	* caller-save.c (mark_set_regs, add_stored_regs): Use
	subreg_nregs.
	* df-scan.c (df_ref_record): Use subreg_nregs.
	* flow.c (mark_set_1): Use subreg_nregs.
	* postreload.c (move2add_note_store): Use subreg_nregs.
	* reload.c (decompose, refers_to_regno_for_reload_p,
	reg_overlap_mentioned_for_reload_p): Use subreg_nregs.
	* resource.c (update_live_status, mark_referenced_resources,
	mark_set_resources): Use subreg_nregs.

From-SVN: r120076
2006-12-20 16:25:00 +00:00
Jan Hubicka ef950eba66 extended.texi (__builtin_expect): We no longer require second argument to be constant.
* extended.texi (__builtin_expect): We no longer require second argument
	to be constant.
	* gengtype.c (adjust_field_rtx_def): Drop NOTE_INSN_EXPECTED_VALUE.
	* builtins.c (expand_builtin_expect): Simplify.
	(expand_builtin_expect_jump): Kill.
	* final.c (final_scan_insn): Do not skip the removed notes.
	* insn-notes.def (LOOP_BEG, LOOP_END, REPEATED_LINE_NUMBER,
	EXPECTED_VALUE): Remove.
	* dojump.c (do_jump): Do not care about __builtin_expect.
	* predict.c (expected_value_to_br_prob): Kill.
	* function.c (expand_function_end): Do not expand
	NOTE_INSN_REPEATED_LINE_NUMBER.
	* print-rtl.c (print_rtx): Do not pretty print the removed notes.
	* expect.c (sjlj_emit_function_enter): Emit directly branch probability.
	* cfgexpand.c (add_reg_br_prob_note): Export.
	* cfgcleanup.c (rest_of_handle_jump2): Do not call
	expected_value_to_br_prob.
	* cfglayout.c (duplicate_insn_chain): Do not deal with removed notes.
	* rtl.h (add_reg_br_prob_note): Declare.

From-SVN: r118696
2006-11-11 16:54:57 +00:00
Jan Hubicka 6039a0c74a tree-pass.h (pass_purge_lineno_notes): Remove declaration.
* tree-pass.h (pass_purge_lineno_notes): Remove declaration.
	* modulo-sched.c (find_line_note): Remove.
	(loop_canon_p): Do not worry about line number notes.
	(sms_schedule): Likewise.
	* cse.c (cse_main): Likewise.
	* regmove.c (fixup_match_1): Likewise
	* function.c (emit_return_info_block): Likewise.
	(expand_function_end): Likewise.
	(thread_prologue_an_epilogue_insns): Likewise.
	* cfgrtl.c (try_redirect_by_replacing_jump, rtl_tidy_fallthru_edge):
	Likewise.
	* emit-rtl.c (find_line_note, emit_insn_after_with_line_notes,
	emit_note_copy_after): Kill.
	(emit_note_copy): Do not worry about line numbers.
	* jump.c (purge_line_number_notes): Kill.
	(pass_purge_lineno_notes): Kill.
	* cfgcleanup.c (rest_of_handle_jump2): Kill purge_line_number_notes
	call.
	* rtl.h (emit_note_copy_after, emit_insn_after_with_line_notes): Kill.
	* passes.c (init_optimization_passes): Don't purge_lineno_notes.
	* sched-ebb.c (schedule_ebbs): Don't do rm_redundant_line_notes.
	* tree-pass.h (pass_purge_lineno_notes): Kill.
	* sched-ebb.c (schedule_ebb): Don't rm_line_notes,
	rm_redundant_line_notes.
	* sched-rgb.c (schedule_region): Don't rm_line_notes,
	rm_redundant_line_notes.
	* sched-int.h (rm_line_notes, rm_redundant_line_notes): Kill.
	* haifa-sched.c: Update comment about handling notes.
 	(unlink_line_notes): Kill.
	(rm_line_notes): Kill.
	(save_line_notes): Simplify.
	(rm_redundant_line_notes): Kill.

From-SVN: r118693
2006-11-11 15:50:16 +00:00
Peter Bergner adb43ed451 rtl.h (MEM_COPY_ATTRIBUTES): Copy MEM_POINTER.
* rtl.h (MEM_COPY_ATTRIBUTES): Copy MEM_POINTER.

From-SVN: r118684
2006-11-10 22:20:37 -06:00
Steven Bosscher 1049f47570 rtl.h (LABEL_OUTSIDE_LOOP_P): Remove.
* rtl.h (LABEL_OUTSIDE_LOOP_P): Remove.
        * doc/rtl.texi: Remove related documentation.

From-SVN: r116992
2006-09-16 08:46:22 +00:00
Bernd Schmidt 11b904a1fc cfgrtl.c (emit_insn_at_entry): New function.
* cfgrtl.c (emit_insn_at_entry): New function.
	* rtl.h (emit_insn_at_entry): Declare it.
	* integrate.c (emit_initial_value_sets): Use it.

From-SVN: r116968
2006-09-15 12:35:43 +00:00
Stuart Hastings 4fbbe6941c * rtl.h (UINTVAL) New.
* config/rs6000/rs6000.c (SMALL_INT) Use it.
	* testsuite/gcc.dg/20060801-1.c: New.

From-SVN: r115855
2006-08-01 16:17:53 +00:00
Kazu Hirata c98662e020 c-common.h: Remove the prototype for yyparse.
* c-common.h: Remove the prototype for yyparse.
	* rtl.h: Remove the prototype for init_loop.

From-SVN: r114242
2006-05-30 18:34:32 +00:00
Daniel Berlin 23249ac43c re PR rtl-optimization/26855 (ICE in add_deps_for_def with -fmodulo-sched -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
2006-05-19 21:18:23 +00:00
Kazu Hirata 917f1b7ea3 builtins.c, [...]: Fix comment typos.
* builtins.c, config/arm/arm.c, config/i386/cygwin.h,
	config/i386/i386.c, config/ia64/ia64.c, config/s390/fixdfdi.h,
	config/sh/sh.c, config/sh/sh.h, df-scan.c, except.c,
	haifa-sched.c, optabs.c, rtl.h, sched-deps.c, sched-int.h,
	sched-rgn.c, tree-inline.h, tree-ssa-dom.c,
	tree-ssa-loop-prefetch.c, tree-ssa-operands.c,
	tree-vect-patterns.c, tree-vrp.c: Fix comment typos.  Follow
	spelling convensions.
	* config/ia64/ia64.opt, doc/contrib.texi, doc/invoke.texi,
	doc/passes.texi, doc/tm.texi, doc/tree-ssa.texi: Fix comment
	typos.  Follow spelling conventions.

From-SVN: r112782
2006-04-08 17:01:17 +00:00
Maxim Kuvyrkov c7ec547267 re PR target/26734 (GCC cannot bootstrap on IA64 HP-UX)
2006-03-30  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR target/26734
	* rtl.def (DEPS_LIST): Change type of the second operand to 'int'.
	* target.h (struct gcc_target.speculate_insn): Change type of the
	second parameter to 'int'.
	* lists.c (alloc_DEPS_LIST): Change signature.  Update reference to
	the second operand of the DEPS_LIST.
	(copy_DEPS_LIST_list): Update reference	to the second operand of the
	DEPS_LIST.
	* rtl.h (alloc_DEPS_LIST): Update signature.
	* sched-int.h (ds_t): Change typedef to 'int'.
	(DEP_STATUS, BITS_PER_DEP_STATUS): Update.

From-SVN: r112538
2006-03-30 15:41:00 +00:00
Maxim Kuvyrkov 3cc82eea2b 2006-03-28 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
Revert my 2006-03-27 patches.

From-SVN: r112456
2006-03-28 17:33:41 +00:00
Maxim Kuvyrkov 5edb2b13fa rtl.def (Copyright): Update date.
2006-03-27  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	* rtl.def (Copyright): Update date.
	(DEPS_LIST): Change type of the second operand to 'int'.
	* target.h (Copyright): Update date.
	(struct gcc_target.speculate_insn): Change type of the second parameter
	to 'int'.
	* lists.c (Copyright): Update date.
	(alloc_DEPS_LIST): Change signature.  Update reference to the second
	operand of the DEPS_LIST.
	(copy_DEPS_LIST_list): Update reference	to the second operand of the
	DEPS_LIST.
	* rtl.h (Copyright): Update date.
	(alloc_DEPS_LIST): Update signature.
	* sched-int.h (Copyright): Update date.
	(ds_t): Change typedef to 'int'.
	(DEP_STATUS, BITS_PER_DEP_STATUS): Update.

From-SVN: r112428
2006-03-27 22:59:07 +00:00
Steven Bosscher ede497cfbd function.h (struct function): Rename to x_stack_check_probe_note.
* function.h (struct function) <x_tail_recursion_reentry>:
	Rename to x_stack_check_probe_note.
	(tail_recursion_reentry): Rename to stack_check_probe_note.
	* function.c: Replace tail_recursion_reentry with
	stack_check_probe_note everywhere.
	(expand_function_start): Only emit a note for
	stack_check_probe_note with -fstack-protect.
	* stmt.c (expand_case): Don't emit NOTE_INSN_DELETED notes.

	* emit-rtl.c (remove_unnecessary_notes): Remove.
	(pass_remove_unnecessary_notes): Remove.
	* rtl.h (remove_unnecessary_notes): Remove prototype.
	* final.c (final_start_function): Don't call remove_unnecessary_notes.
	* tree-pass.h (pass_remove_unnecessary_notes): Remove.
	* passes.c (pass_remove_unnecessary_notes): Don't run it.

From-SVN: r112229
2006-03-20 21:22:55 +00:00
Jan-Benedict Glaw d97c12956f rtl.h (CONST_INT_P): Define.
* rtl.h (CONST_INT_P): Define.
	* config/vax/vax.c (print_operand_address): Use CONST_INT_P()
	instead of GET_CODE(x) == CONST_INT.
	(vax_rtx_costs): Likewise.
	(vax_output_int_move): Likewise.
	(vax_output_int_add): Likewise.
	(legitimate_constant_address_p): Likewise.
	(index_term_p): Likewise.
	* config/vax/vax.h (PRINT_OPERAND): Likewise.
	* config/vax/vax.md (and<mode>3): Likewise.
	(ashrsi3): Likewise.
	(extv): Likewise.
	(movstricthi): Likewise.
	(movstrictqi): Likewise.
	(rotrsi3): Likewise.
	(five unnamed insns): Likewise.

From-SVN: r112169
2006-03-17 01:12:33 +00:00
Maxim Kuvyrkov 496d7bb032 target.h (struct spec_info_def): New opaque declaration.
2006-03-16  Maxim Kuvyrkov <mkuvyrkov@ispras.ru>

        * target.h (struct spec_info_def): New opaque declaration.
        (struct gcc_target.sched): New fields: adjust_cost_2, h_i_d_extended,
        speculate_insn, needs_block_p, gen_check,
        first_cycle_multipass_dfa_lookahead_guard_spec, set_sched_flags.
        * target-def.h (TARGET_SCHED_ADJUST_COST_2,
        TARGET_SCHED_H_I_D_EXTENDED, TARGET_SCHED_SPECULATE_INSN,
        TARGET_SCHED_NEEDS_BLOCK_P, TARGET_SCHED_GEN_CHECK,
        TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC,
        TARGET_SCHED_SET_SCHED_FLAGS): New macros to initialize fields in
        gcc_target.sched.
        (TARGET_SCHED): Use new macros.
        * rtl.h (copy_DEPS_LIST_list): New prototype.
        * sched-int.h (struct sched_info): Change signature of new_ready field,
	adjust all initializations. New fields: add_remove_insn,
        begin_schedule_ready, add_block, advance_target_bb, fix_recovery_cfg,
	region_head_or_leaf_p.
        (struct spec_info_def): New structure declaration.
        (spec_info_t): New typedef.
        (struct haifa_insn_data): New fields: todo_spec, done_spec, check_spec,
        recovery_block, orig_pat.
        (glat_start, glat_end): New variables declaraions.
        (TODO_SPEC, DONE_SPEC, CHECK_SPEC, RECOVERY_BLOCK, ORIG_PAT):
	New access macros.
        (enum SCHED_FLAGS): New constants: SCHED_RGN, SCHED_EBB,
        DETACH_LIFE_INFO, USE_GLAT.
        (enum SPEC_SCHED_FLAGS): New enumeration.
        (NOTE_NOTE_BB_P): New macro.
        (extend_dependency_caches, xrecalloc, unlink_bb_notes, add_block,
        attach_life_info, debug_spec_status, check_reg_live): New functions.
        (get_block_head_tail): Change signature to get_ebb_head_tail, adjust
        all uses in ddg.c, modulo-sched.c, haifa-sched.c, sched-rgn.c,
        sched-ebb.c
	(get_dep_weak, ds_merge): Prototype functions from sched-deps.c .
        * ddg.c (get_block_head_tail): Adjust all uses.
        * modulo-sched.c (get_block_head_tail): Adjust all uses.
	(sms_sched_info): Initialize new fields.
	(contributes_to_priority): Removed.
        * haifa-sched.c (params.h): New include.
	(get_block_head_tail): Adjust all uses.
        (ISSUE_POINTS): New macro.
        (glat_start, glat_end): New global variables.
        (spec_info_var, spec_info, added_recovery_block_p, nr_begin_data,
	nr_be_in_data, nr_begin_control, nr_be_in_control, bb_header,
	old_last_basic_block, before_recovery, current_sched_info_var,
	rgn_n_insns, luid): New static variables.
        (insn_cost1): New function.  Move logic from insn_cost to here.
        (find_insn_reg_weight1): New function.  Move logic from
        find_insn_reg_weight to here.
        (reemit_notes, move_insn, max_issue): Change signature.
        (move_insn1): Removed.
        (extend_h_i_d, extend_ready, extend_global, extend_all, init_h_i_d,
        extend_bb): New static functions to support extension of scheduler's
        data structures.
        (generate_recovery_code, process_insn_depend_be_in_spec,
        begin_speculative_block, add_to_speculative_block,
        init_before_recovery, create_recovery_block, create_check_block_twin,
        fix_recovery_deps): New static functions to support
        generation of recovery code.
        (fix_jump_move, find_fallthru_edge, dump_new_block_header,
        restore_bb_notes, move_block_after_check, move_succs): New static
        functions to support ebb scheduling.
        (init_glat, init_glat1, attach_life_info1, free_glat): New static
        functions to support handling of register live information.
        (associate_line_notes_with_blocks, change_pattern, speculate_insn,
	sched_remove_insn, clear_priorities, calc_priorities, bb_note,
	add_jump_dependencies):	New static functions.
        (check_cfg, has_edge_p, check_sched_flags): New static functions for
	consistancy checking.
	(debug_spec_status): New function to call from debugger.
	(priority): Added code to handle speculation checks.
	(rank_for_schedule): Added code to distinguish speculative instructions.
	(schedule_insn): Added code to handle speculation checks.
	(unlink_other_notes, rm_line_notes, restore_line_notes, rm_other_notes):
	Fixed to handle ebbs.
        (move_insn): Added code to handle ebb scheduling.
	(max_issue): Added code to use ISSUE_POINTS of instructions.
        (choose_ready): Added code to choose between speculative and
        non-speculative instructions.
        (schedule_block): Added code to handle ebb scheduling and scheduling of
        speculative instructions.
        (sched_init): Initialize new variables.
        (sched_finish): Free new variables.  Print statistics.
        (try_ready): Added code to handle speculative instructions.
        * lists.c (copy_DEPS_LIST_list): New function.
        * sched-deps.c (extend_dependency_caches): New function.  Move logic
        from create_dependency_caches to here.
	(get_dep_weak, ds_merge): Make global.
        * genattr.c (main): Code to output prototype for
        dfa_clear_single_insn_cache.
        * genautomata.c (DFA_CLEAR_SINGLE_INSN_CACHE_FUNC_NAME): New macros.
        (output_dfa_clean_insn_cache_func): Code to output
        dfa_clear_single_insn_cache function.
        * sched-ebb.c (target_n_insns): Remove.  Adjust all users to use
	n_insns.
        (can_schedule_ready_p, fix_basic_block_boundaries, add_missing_bbs):
        Removed.
        (n_insns, dont_calc_deps, ebb_head, ebb_tail, last_bb):
        New static variables.
        (begin_schedule_ready, add_remove_insn, add_block1, advance_target_bb,
	fix_recovery_cfg, ebb_head_or_leaf_p): Implement hooks from
	struct sched_info.
        (ebb_sched_info): Initialize new fields.
	(get_block_head_tail): Adjust all uses.
	(compute_jump_reg_dependencies): Fixed to use glat_start.
	(schedule_ebb): Code to remove unreachable last block.
        (schedule_ebbs): Added code to update register live information.
        * sched-rgn.c (region_sched_info): Initialize new fields.
	(get_block_head_tail): Adjust all uses.
	(last_was_jump): Removed.  Adjust users.
        (begin_schedule_ready, add_remove_insn, insn_points, extend_regions,
	add_block1, fix_recovery_cfg, advance_target_bb, region_head_or_leaf_p):
	Implement new hooks.
        (check_dead_notes1): New static function.
        (struct region): New fields: dont_calc_deps, has_real_ebb.
        (RGN_DONT_CALC_DEPS, RGN_HAS_REAL_EBB): New access macros.
        (BB_TO_BLOCK): Fixed to handle EBBs.
        (EBB_FIRST_BB, EBB_LAST_BB): New macros.
        (ebb_head): New static variable.
        (debug_regions, contributes_to_priority): Fixed to handle EBBs.
        (find_single_block_regions, find_rgns, find_more_rgns): Initialize
	new fields.
	(compute_dom_prob_ps): New assertion.
        (check_live_1, update_live_1): Fixed to work with glat_start instead of
        global_live_at_start.
	(init_ready_list): New assertions.
	(can_schedule_ready_p): Split update code to begin_schedule_ready.
	(new_ready): Add support for BEGIN_CONTROL speculation.
        (schedule_insns): Fixed code that updates register live information
        to handle EBBs.
        (schedule_region): Fixed to handle EBBs.
	(init_regions): Use extend_regions and check_dead_notes1.
        * params.def (PARAM_MAX_SCHED_INSN_CONFLICT_DELAY,
        PARAM_SCHED_SPEC_PROB_CUTOFF): New parameters.
	* doc/tm.texi (TARGET_SCHED_ADJUST_COST_2, TARGET_SCHED_H_I_D_EXTENDED,
	TARGET_SCHED_SPECULATE_INSN, TARGET_SCHED_NEEDS_BLOCK_P,
	TARGET_SCHED_GEN_CHECK,
	TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD_SPEC,
	TARGET_SCHED_SET_SCHED_FLAGS): Document.
        * doc/invoke.texi (max-sched-insn-conflict-delay,
	sched-spec-prob-cutoff): Document.

From-SVN: r112128
2006-03-16 05:27:03 +00:00
Maxim Kuvyrkov 63f54b1abd sched-int.h (struct haifa_insn_data): New fields: resolved_deps, inter_tick, queue_index.
2006-03-16  Maxim Kuvyrkov <mkuvyrkov@ispras.ru>

        * sched-int.h (struct haifa_insn_data): New fields: resolved_deps,
	inter_tick, queue_index.
	(struct sched_info): Change signature of init_ready_list field.
	Adjust all initializations.
	(RESOLVED_DEPS): New access macro.
	(ready_add): Remove prototype.
	(try_ready): Add prototype.
	* sched-rgn.c (init_ready_list): Use try_ready.
	(schedule_region): Initialize
	current_sched_info->{sched_max_insns_priority, queue_must_finish_empty}.
	* sched-ebb.c (new_ready): Remove.  Adjust ebb_sched_info.
	(init_ready_list): Use try_ready.
	(schedule_ebb): Initialize current_sched_info->sched_max_insns_priority.
	* lists.c (remove_list_elem): Remove `static'.
	(remove_free_INSN_LIST_elem): New function.
	* rtl.h (remove_list_elem, remove_free_INSN_LIST_elem): Add prototypes.
	* haifa-sched.c (INTER_TICK, QUEUE_INDEX): New macros.
	(INVALID_TICK, MIN_TICK, QUEUE_SCHEDULED, QUEUE_NOWHERE, QUEUE_READY):
	New constants.
	(readyp): New variable.
	(queue_remove, ready_remove_insn, fix_inter_tick, fix_tick_ready,
	change_queue_index, resolve_dep): New static functions.
	(try_ready): New function.  Adjust callers in sched-rgn.c and
	sched-ebb.c to use it instead of ready_add.
	(clock_var): Move at the begining of file.
	(rank_for_schedule): Fix typo.
	(queue_insn): Add assertion.  Handle QUEUE_INDEX.
	(ready_lastpos): Enforce assertion.
	(ready_add): Make it static.  Handle QUEUE_INDEX.  Add new argument,
	update all callers.
	(ready_remove_first, ready_remove): Handle QUEUE_INDEX.
	(schedule_insn): Rewrite to use try_ready and resolve_dep.
	(queue_to_ready): Use free_INSN_LIST_list.
	(early_queue_to_ready): Fix typo.
	(schedule_block): Init readyp.  Move init_ready_list call after the
	initialization of clock_var.  Fix error in rejecting insn by
	targetm.sched.dfa_new_cycle.  Add call to fix_inter_tick.  Remove code
	that previously	corrected INSN_TICKs.  Add code for handling
	QUEUE_INDEX.
	(set_priorities): Fix typo.
	(sched_init): Initialize INSN_TICK, INTER_TICK and QUEUE_INDEX.
	Clarify comment and code that keeps current_sched_info->next_tail
	non-null.

From-SVN: r112127
2006-03-16 05:23:21 +00:00
Maxim Kuvyrkov ddbd543924 ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call.
2006-03-16  Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
            Andrey Belevantsev <abel@ispras.ru>

	* ddg.c (build_intra_loop_deps): Adjust add_forward_dependence call.
        * lists.c (unused_deps_list): New variable.
	(free_list): Add assertions to verify the proper distinguishing 
        between INSN_LISTs and DEPS_LISTs.
        (find_list_elem, remove_list_elem, remove_list_node): New static
	functions.
        (alloc_DEPS_LIST, free_DEPS_LIST, free_DEPS_LIST_node,
        remove_free_INSN_LIST_elem, remove_free_DEPS_LIST_elem,
        remove_free_INSN_LIST_node, remove_free_DEPS_LIST_node): New functions.
        (alloc_INSN_LIST): Assert that the list we're working on is indeed
	an INSN_LIST.
        (free_INSN_LIST_node): Likewise.
	* modulo-sched.c (current_sched_info): Initialize flags field.
	* reg-notes.def: Exchange DEP_ANTI and DEP_OUTPUT.
	* rtl.def (DEPS_LIST): Define.
        * rtl.h: Declare new functions from lists.c.
        * sched-deps.c (spec_dependency_cache): New static variable.
        (maybe_add_or_update_back_dep_1, add_back_dep): New static functions.
        (add_dependence): Change return type to void.  Move the logic to ...
        (add_or_update_back_dep_1): ... here.  Handle speculative dependencies.
        (delete_all_dependences): Add comment about forward_dependency_cache.
	Handle spec_dependency_cache.  Handle DEPS_LISTs.
        (fixup_sched_groups): Clarify the change of priority of output
        and anti dependencies.
        (sched_analyze_2): Adjust add_dependence calls to create data
	speculative dependence.
        (add_forward_dependence): Renamed to add_forw_dep, change prototype.
	Adjust all callers.  Handle DEPS_LISTS.
        (compute_forward_dependences): Use add_forw_dep.  Sort LOG_LINKs in
	presence of speculation.
        (init_dependency_caches, free_dependency_caches):
	Handle spec_dependency_cache.
        (adjust_add_sorted_back_dep, adjust_back_add_forw_dep, delete_forw_dep,
	estimate_dep_weak, get_dep_weak, ds_merge, check_dep_status):
	New static functions.
        (add_or_update_back_dep, add_or_update_back_forw_dep,
	add_back_forw_dep, delete_back_forw_dep): New functions.
	* sched-int.h (ds_t, dw_t): New typedefs.
	(struct sched_info): Add new field flags.
	(struct haifa_insn_data): Add new bitfield has_internal_dep.
	Prototype new sched-deps.c functions.
        (HAS_INTERNAL_DEP, DEP_STATUS): New access macros.
	(BITS_PER_DEP_STATUS, BITS_PER_DEP_WEAK, DEP_WEAK_MASK, MAX_DEP_WEAK,
	MIN_DEP_WEAK, NO_DEP_WEAK, UNCERTAIN_DEP_WEAK, BEGIN_DATA, BE_IN_DATA,
	BEGIN_CONTROL, BE_IN_CONTROL, BEGIN_SPEC, DATA_SPEC, CONTROL_SPEC,
	SPECULATIVE, BE_IN_SPEC, FIRST_SPEC_TYPE, LAST_SPEC_TYPE,
	SPEC_TYPE_SHIFT, DEP_TRUE, DEP_OUTPUT, DEP_ANTI, DEP_TYPES, HARD_DEP):
	New constants.
        (enum SPEC_TYPES_OFFSETS, enum DEPS_ADJUST_RESULT, enum SCHED_FLAGS):
	New enums.
	* sched-rgn.c (current_sched_info): Initialize flags field.
	(schedule_insns): Initialize current_sched_info before the sched_init
	call.
	* sched-ebb.c (current_sched_info): Initialize flags field.
	(add_deps_for_risky_insns): Use control_flow_insn_p instead of JUMP_P.
	Call add_or_update_back_dep instead of add_dependence.
	Create control speculative dependencies.
	(schedule_insns): Initialize current_sched_info before the sched_init
	call.

Co-Authored-By: Andrey Belevantsev <abel@ispras.ru>

From-SVN: r112125
2006-03-16 05:17:41 +00:00
Steven Bosscher fc6c490eea rtl.def (LABEL_REF): Remove the field for LABEL_NEXTREF.
* rtl.def (LABEL_REF): Remove the field for LABEL_NEXTREF.
        * rtl.h (LABEL_NEXTREF): Remove field accessor.

From-SVN: r111969
2006-03-11 22:14:35 +00:00
Kazu Hirata a678e384b9 flow.c (recompute_reg_usage): Make it static.
* flow.c (recompute_reg_usage): Make it static.
	* rtl.h: Remove the prototype for recompute_reg_usage.

From-SVN: r111736
2006-03-05 17:41:48 +00:00
Kazu Hirata dc782dcd16 rtlanal.c (replace_reg): Remove.
* rtlanal.c (replace_reg): Remove.
	* rtl.h: Remove the prototype for replace_reg.

From-SVN: r111730
2006-03-05 05:59:55 +00:00
Kazu Hirata 3c491cab15 regclass.c (reg_scan_update): Remove.
* regclass.c (reg_scan_update): Remove.
	(reg_scan_mark_refs): Remove the last argument.
	* rtl.h: Remove the prototype for reg_scan_update.

From-SVN: r111729
2006-03-05 05:58:50 +00:00
Kazu Hirata 22ec0cc8fe rtlanal.c (insns_safe_to_move_p): Remove.
* rtlanal.c (insns_safe_to_move_p): Remove.
	* rtl.h: Remove the prototype for insns_safe_to_move_p.

From-SVN: r111713
2006-03-04 19:45:26 +00:00
Richard Sandiford 3fa9c136c3 tm.texi: Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of SYMBOL_REF_IN_BLOCK_P.
* doc/tm.texi: Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	* doc/rtl.texi: Likewise.  Refer to SYMBOL_FLAG_HAS_BLOCK_INFO instead
	of SYMBOL_FLAG_IN_BLOCK.
	* gengtype.c (adjust_field_rtx_def): Use SYMBOL_REF_HAS_BLOCK_INFO_P
	instead of SYMBOL_REF_IN_BLOCK_P.
	* explow.c (use_anchored_address): Likewise.
	* rtl.c (rtx_size): Likewise.
	* varasm.c (create_block_symbol): Set SYMBOL_FLAG_HAS_BLOCK_INFO
	instead of SYMBOL_FLAG_IN_BLOCK.
	(make_decl_rtl): Use SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(assemble_variable): Likewise.
	(output_constant_def_contents): Likewise.
	(output_constant_pool): Likewise.
	(default_encode_section_info): Preserve SYMBOL_FLAG_HAS_BLOCK_INFO
	instead of SYMBOL_FLAG_IN_BLOCK.
	* rtl.h (block_symbol): Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(SYMBOL_REF_BLOCK): Likewise.
	(SYMBOL_REF_OFFSET): Likewise.
	(BLOCK_SYMBOL_CHECK): Use SYMBOL_REF_HAS_BLOCK_INFO_P instead of
	SYMBOL_REF_IN_BLOCK_P.
	(SYMBOL_FLAG_IN_BLOCK): Replace with...
	(SYMBOL_FLAG_HAS_BLOCK_INFO): ...this.
	(SYMBOL_REF_IN_BLOCK_P): Replace with...
	(SYMBOL_REF_HAS_BLOCK_INFO_P): ...this.

From-SVN: r111675
2006-03-03 09:11:58 +00:00
Richard Sandiford 434aeebbff tm.texi (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Document.
* doc/tm.texi (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Document.
	(ASM_OUTPUT_BSS): Describe the two ways of handling global BSS,
	and say that only one is needed.
	* doc/rtl.texi (SYMBOL_REF_BLOCK): Say that the block can be null.
	* target.h (have_switchable_bss_sections): New hook.
	* explow.c (use_anchored_address): Check that the symbol is in a block.
	* varasm.c (tls_comm_section, comm_section, lcomm_section)
	(bss_noswitch_section): New variables.
	(get_unnamed_section): Add SECTION_UNNAMED to the flags.
	(get_noswitch_section): New function.
	(get_block_for_section): Allow SECT to be null.
	(unlikely_text_section_p): Use SECTION_STYLE.
	(bss_initializer_p): New function.
	(get_variable_section): Move earlier in file.  Take a new argument,
	prefer_noswitch_p.  Move bss checks from assemble_variable to here.
	Return one of the new *_sections in such cases.
	(get_block_for_decl): New function, extracting some logic from
	use_blocks_for_decl_p.
	(change_symbol_section): Remove in favor of...
	(change_symbol_block): ...this new function.
	(use_blocks_for_decl_p): Remove checks now performed by
	get_block_for_decl.
	(make_decl_rtl): Use change_symbol_block and get_block_for_decl.
	(ASM_EMIT_LOCAL, ASM_EMIT_BSS, ASM_EMIT_COMMON): Delete in favor of...
	(emit_local, emit_bss, emit_common): ...these new functions.
	Return true if the alignment was honored.
	(emit_tls_common): New function.
	(asm_emit_uninitialised): Delete.
	(assemble_variable_noswitch): New function, split out from...
	(assemble_variable): ...here.  Don't make decisions about common
	variables here.  Globalize all public decls that go into non-common
	sections.  Check whether SYMBOL_REF_BLOCK is null.
	(output_constant_def_contents): Check whether SYMBOL_REF_BLOCK is null.
	(output_constant_pool): Likewise.
	(init_varasm_once): Initialize the new section variables.
	(have_global_bss_p): New function.
	(categorize_decl_for_section): Use bss_initializer_p.
	(switch_to_section): Use SECTION_STYLE.  Abort for SECTION_NOSWITCH.
	(place_block_symbol): Assert that the symbol must be in a block.
	* target-def.h (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): New macro.
	(TARGET_INITIALIZER): Include it.
	* rtl.h (SYMBOL_REF_BLOCK): Document the null alternative.
	* output.h (SECTION_STYLE_MASK, SECTION_COMMON): New macros.
	(SECTION_MACH_DEP): Bump by two.
	(SECTION_UNNAMED, SECTION_NOSWITCH): New macros.
	(unnamed_section): Mention SECTION_UNNAMED in comment.
	(named_section): Likewise SECTION_NAMED.
	(noswitch_section_callback): New type.
	(noswitch_section): New structure.
	(section): Add a noswitch_section alternative.
	(SECTION_STYLE): New macro.
	(tls_comm_section, comm_section, lcomm_section): Declare.
	(bss_noswitch_section, have_global_bss_p): Declare.
	* config/elfos.h (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Override.
	* config/iq2000/iq2000.c (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS):
	Override.
	* config/v850/v850.c (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Override.
	* config/stormy16/stormy16.c (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS):
	Override.

cp/
	* decl.c (start_decl): Use have_global_bss_p when deciding
	whether to make the decl common.

ada/
	* utils.c (create_var_decl): Use have_global_bss_p when deciding
	whether to make the decl common.

From-SVN: r111644
2006-03-02 19:32:52 +00:00
Daniel Berlin c2924966db tree-vrp.c (execute_vrp): Return value.
2006-03-02  Daniel Berlin <dberlin@dberlin.org>

	* gcc/tree-vrp.c (execute_vrp): Return value.
	* gcc/regrename.c (rest_of_handle_regrename): Ditto.
	* gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto.
	* gcc/tree-complex.c (tree_lower_complex): Ditto.
	(tree_lower_complex_O0): Ditto.
	* gcc/tracer.c (rest_of_handle_tracer): Ditto.
	* gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto.
	* gcc/postreload.c (rest_of_handle_postreload): Ditto.
	* gcc/tree-tailcall.c (execute_tail_recursion): Ditto.
	(execute_tail_calls): Ditto.
	* gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* gcc/tree.h (init_function_for_compilation): Ditto.
	* gcc/ipa-cp.c (ipcp_driver): Ditto.
	* gcc/tree-scalar-evolution.c (scev_const_prop): Ditto.
	* gcc/tree-scalar-evolution.h (scev_const_prop): Ditto.
	* gcc/final.c (compute_alignments): Ditto.
	(rest_of_handle_final): Ditto.
	(rest_of_handle_shorten_branches): Ditto.
	(rest_of_clean_state): Ditto.
	* gcc/omp-low.c (execute_expand_omp): Ditto.
	(execute_lower_omp): Ditto.
	* gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto.
	* gcc/ipa-reference.c (static_execute): Ditto.
	* gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto.
	* gcc/reorg.c (rest_of_handle_delay_slots): Ditto.
	(rest_of_handle_machine_reorg): Ditto.
	* gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto.
	* gcc/flow.c (recompute_reg_usage): Ditto.
	(rest_of_handle_remove_death_notes): Ditto.
	(rest_of_handle_life): Ditto.
	(rest_of_handle_flow2): Ditto.
	* gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto.
	* gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto.
	(do_ssa_store_ccp): Ditto.
	(execute_fold_all_builtins): Ditto.
	* gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto.
	* gcc/modulo-sched.c (rest_of_handle_sms): Ditto.
	* gcc/ipa-pure-const.c (static_execute): Ditto.
	* gcc/cse.c (rest_of_handle_cse): Ditto.
	(rest_of_handle_cse2): Ditto.
	* gcc/web.c (rest_of_handle_web): Ditto.
	* gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto.
	* gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto.
	* gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto.
	* gcc/tree-nrv.c (tree_nrv): Ditto.
	(execute_return_slot_opt): Ditto.
	* gcc/tree-ssa-alias.c (compute_may_aliases): Ditto.
	(create_structure_vars): Ditto.
	* gcc/loop-init.c (rtl_loop_init): Ditto.
	(rtl_loop_done): Ditto.
	(rtl_move_loop_invariants): Ditto.
	(rtl_unswitch): Ditto.
	(rtl_unroll_and_peel_loops): Ditto.
	(rtl_doloop): Ditto.
	* gcc/gimple-low.c (lower_function_body): Ditto.
	(mark_used_blocks): Ditto.
	* gcc/tree-ssa-sink.c (execute_sink_code): Ditto.
	* gcc/ipa-inline.c (cgraph_decide_inlining): Ditto.
	(cgraph_early_inlining): Ditto.
	* gcc/global.c (rest_of_handle_global_alloc): Ditto.
	* gcc/jump.c (cleanup_barriers): Ditto.
	(purge_line_number_notes): Ditto.
	* gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto.
	(rest_of_handle_if_after_reload): Ditto.
	* gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto.
	(tree_ssa_loop_im): Ditto.
	(tree_ssa_loop_unswitch): Ditto.
	(tree_vectorize): Ditto.
	(tree_linear_transform): Ditto.
	(tree_ssa_loop_ivcanon): Ditto.
	(tree_ssa_empty_loop): Ditto.
	(tree_ssa_loop_bounds): Ditto.
	(tree_complete_unroll): Ditto.
	(tree_ssa_loop_prefetch): Ditto.
	(tree_ssa_loop_ivopts): Ditto.
	(tree_ssa_loop_done): Ditto.
	* gcc/predict.c (tree_estimate_probability): Ditto.
	* gcc/recog.c (split_all_insns_noflow): Ditto.
	(rest_of_handle_peephole2): Ditto.
	(rest_of_handle_split_all_insns): Ditto.
	* gcc/tree-eh.c (lower_eh_constructs): Ditto.
	* gcc/regmove.c (rest_of_handle_regmove): Ditto.
	(rest_of_handle_stack_adjustments): Ditto.
	* gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto.
	* gcc/function.c (instantiate_virtual_regs): Ditto.
	(init_function_for_compilation): Ditto.
	(rest_of_handle_check_leaf_regs): Ditto.
	* gcc/gcse.c (rest_of_handle_jump_bypass): Ditto.
	(rest_of_handle_gcse): Ditto.
	* gcc/ipa-type-escape.c (type_escape_execute): Ditto.
	* gcc/alias.c (rest_of_handle_cfg): Ditto.
	* gcc/tree-if-conv.c (main_tree_if_conversion): Ditto.
	* gcc/profile.c (rest_of_handle_branch_prob): Ditto.
	* gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto.
	* gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto.
	* gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto
	* gcc/tree-dfa.c (find_referenced_vars): Ditto.
	* gcc/except.c (set_nothrow_function_flags): Ditto.
	(convert_to_eh_region_ranges): Ditto.
	(rest_of_handle_eh): Ditto.
	* gcc/emit-rtl.c (unshare_all_rtl): Ditto.
	(remove_unnecessary_notes): Ditto.
	* gcc/except.h (set_nothrow_function_flags): Ditto.
	(convert_to_eh_region_ranges): Ditto.
	* gcc/cfgexpand.c (tree_expand_cfg): Ditto.
	* gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto.
	* gcc/tree-ssa-pre.c (do_pre): Ditto.
	(execute_fre): Ditto.
	* gcc/cfgcleanup.c (rest_of_handle_jump): Ditto.
	(rest_of_handle_jump2): Ditto.
	* gcc/tree-sra.c (tree_sra): Ditto.
	* gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto.
	(execute_mudflap_function_decls): Ditto.
	* gcc/tree-ssa-copy.c (do_copy_prop): Ditto.
	(do_store_copy_prop): Ditto.
	* gcc/ipa-prop.h (ipcp_driver): Ditto.
	* gcc/cfglayout.c (insn_locators_initialize): Ditto.
	* gcc/tree-ssa-forwprop.c
	(tree_ssa_forward_propagate_single_use_vars): Ditto.
	* gcc/cfglayout.h (insn_locators_initialize): Ditto.
	* gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto.
	* gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto.
	(execute_late_warn_uninitialized): Ditto.
	* gcc/rtl.h (cleanup_barriers): Ditto.
	(split_all_insns_noflow): Ditto.
	(purge_line_number_notes): Ditto.
	(unshare_all_rtl): Ditto.
	(remove_unnecessary_notes): Ditto.
	(recompute_reg_usage): Ditto.
	(variable_tracking_main): Ditto.
	* gcc/integrate.c (emit_initial_value_sets): Ditto.
	* gcc/integrate.h (emit_initial_value_sets): Ditto.
	* gcc/tree-optimize.c (execute_free_datastructures): Ditto
	(execute_free_cfg_annotations): Ditto.
	(execute_fixup_cfg): Ditto.
	(execute_cleanup_cfg_pre_ipa): Ditto.
	(execute_cleanup_cfg_post_optimizing): Ditto.
	(execute_init_datastructures): Ditto.
	* gcc/tree-object-size.c (compute_object_sizes): Ditto.
	* gcc/combine.c (rest_of_handle_combine): Ditto.
	* gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto.
	* gcc/bb-reorder.c (duplicate_computed_gotos): Ditto.
	(rest_of_handle_reorder_blocks): Ditto.
	(rest_of_handle_partition_blocks): Ditto.
	* gcc/var-tracking.c (variable_tracking_main): Ditto.
	* gcc/tree-profile.c (tree_profiling): Ditto.
	* gcc/tree-vect-generic.c (expand_vector_operations): Ditto.
	* gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto.
	* gcc/sched-rgn.c (rest_of_handle_sched): Ditto.
	(rest_of_handle_sched2): Ditto.
	* gcc/basic-block.h (free_bb_insn): Ditto.
	* gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto.
	* gcc/tree-cfg.c (execute_build_cfg): Ditto.
	(remove_useless_stmts): Ditto.
	(split_critical_edges): Ditto.
	(execute_warn_function_return): Ditto.
	(execute_warn_function_noreturn): Ditto.
	* gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto.
	* gcc/cfgrtl.c (free_bb_for_insn): Ditto.
	* gcc/passes.c (execute_one_pass): Run additional
	todos returned by execute function.
	* gcc/tree-pass.h (struct tree_opt_pass): Make execute
	return a value.

From-SVN: r111643
2006-03-02 19:00:11 +00:00
Paolo Bonzini d3b7269024 rtl.h (truncated_to_mode): Declare it.
* rtl.h (truncated_to_mode): Declare it.
	(struct rtl_hooks): Add reg_truncated_to_mode hook.
	* rtlhooks-def.h (RTL_HOOKS_REG_TRUNCATED_TO_MODE): New macro.
	(RTL_HOOKS_INITIALIZER): Include it.
	* rtlhooks.c (reg_truncated_to_mode_general): New function.
	* combine.c (RTL_HOOKS_REG_TRUNCATED_TO_MODE): Override to
	reg_truncated_to_mode.
	* rtlanal.c (truncated_to_mode): Define it.
	* simplify-rtx.c (simplify_unary_operation_1): Use it.

Co-Authored-By: Adam Nemet <anemet@caviumnetworks.com>

From-SVN: r111573
2006-02-28 20:32:20 +00:00
Zdenek Dvorak e755fcf517 re PR middle-end/26316 (loop-invariant miscompiles openmp.c)
PR rtl-optimization/26316
	* rtlanal.c (enum may_trap_p_flags): New.
	(may_trap_p_1): Take flags instead of unaligned_mems argument.  Ignore
	MEM_NOTRAP_P if flags & MTP_AFTER_MOVE.
	(may_trap_p, may_trap_or_fault_p): Pass flags to may_trap_p_1.
	(may_trap_after_code_motion_p): New function.
	* loop-invariant.c (find_identical_invariants): Fix dump formating.
	(find_invariant_insn): Use may_trap_after_code_motion_p.
	* rtl.h (may_trap_after_code_motion_p): Declare.

From-SVN: r111397
2006-02-23 21:03:05 +00:00
Roger Sayle 3d8504ac32 gcse.c (want_to_gcse_p): On STACK_REGS targets...
* gcse.c (want_to_gcse_p): On STACK_REGS targets, look through
	constant pool references to identify stack mode constants.
	* rtlanal.c (constant_pool_constant_p): New predicate to check
	whether operand is a floating point constant in the pool.
	* rtl.h (constant_pool_constant_p): Prototype here.
	* loop.c (scan_loop): Avoid hoisting constants from the constant
	pool on STACK_REGS targets.
	(load_mems): Likewise.
	* loop-invariant.c (get_inv_cost): Make hoisting constant pool
	loads into x87 registers expensive in terms of register pressure.


Co-Authored-By: Steven Bosscher <stevenb.gcc@gmail.com>

From-SVN: r111283
2006-02-19 22:01:17 +00:00
Richard Sandiford aacd3885eb re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions)
* cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE.
	* emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx.
	(copy_insn_1): Likewise.  Don't copy each field individually.
	Reindent.
	* read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead
	of RTX_SIZE.
	* reload1.c (eliminate_regs): Use shallow_copy_rtx.
	* rtl.c (rtx_size): Rename variable to...
	(rtx_code_size): ...this.
	(rtx_size): New function.
	(rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE.
	(copy_rtx): Use shallow_copy_rtx.  Don't copy each field individually.
	Reindent.
	(shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE.
	* rtl.h (rtx_code_size): New variable.
	(rtx_size): Change from a variable to a function.
	(RTX_SIZE): Rename to...
	(RTX_CODE_SIZE): ...this.

	PR target/9703
	PR tree-optimization/17106
	* doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document.
	(Anchored Addresses): New section.
	* doc/invoke.texi (-fsection-anchors): Document.
	* doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise.
	(SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise.
	(SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise.
	* hooks.c (hook_bool_mode_rtx_false): New function.
	* hooks.h (hook_bool_mode_rtx_false): Declare.
	* gengtype.c (create_optional_field): New function.
	(adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when
	SYMBOL_REF_IN_BLOCK_P is true.
	* target.h (output_anchor, use_blocks_for_constant_p): New hooks.
	(min_anchor_offset, max_anchor_offset): Likewise.
	(use_anchors_for_symbol_p): New hook.
	* toplev.c (compile_file): Call output_object_blocks.
	(target_supports_section_anchors_p): New function.
	(process_options): Check that -fsection-anchors is only used on
	targets that support it and when -funit-at-a-time is in effect.
	* tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL
	if the decl doesn't have one.
	* dwarf2out.c: Remove instantiations of VEC(rtx,gc).
	* expr.c (emit_move_multi_word, emit_move_insn): Pass the result
	of force_const_mem through use_anchored_address.
	(expand_expr_constant): New function.
	(expand_expr_addr_expr_1): Call it.  Use the same modifier when
	calling expand_expr for INDIRECT_REF.
	(expand_expr_real_1): Pass DECL_RTL through use_anchored_address
	for all modifiers except EXPAND_INITIALIZER.  Use expand_expr_constant.
	* expr.h (use_anchored_address): Declare.
	* loop-unroll.c: Don't declare rtx vectors here.
	* explow.c: Include output.h.
	(validize_mem): Call use_anchored_address.
	(use_anchored_address): New function.
	* common.opt (-fsection-anchors): New switch.
	* varasm.c (object_block_htab, anchor_labelno): New variables.
	(hash_section, object_block_entry_eq, object_block_entry_hash)
	(use_object_blocks_p, get_block_for_section, create_block_symbol)
	(use_blocks_for_decl_p, change_symbol_section): New functions.
	(get_variable_section): New function, split out from assemble_variable.
	(make_decl_rtl): Create a block symbol if use_object_blocks_p and
	use_blocks_for_decl_p say so.  Use change_symbol_section if the
	symbol has already been created.
	(assemble_variable_contents): New function, split out from...
	(assemble_variable): ...here.  Don't output any code for
	block symbols; just pass them to place_block_symbol.
	Use get_variable_section and assemble_variable_contents.
	(get_constant_alignment, get_constant_section, get_constant_size): New
	functions, split from output_constant_def_contents.
	(build_constant_desc): Create a block symbol if use_object_blocks_p
	says so.  Or into SYMBOL_REF_FLAGS.
	(assemble_constant_contents): New function, split from...
	(output_constant_def_contents): ...here.  Don't output any code
	for block symbols; just pass them to place_section_symbol.
	Use get_constant_section and get_constant_alignment.
	(force_const_mem): Create a block symbol if use_object_blocks_p and
	use_blocks_for_constant_p say so.  Or into SYMBOL_REF_FLAGS.
	(output_constant_pool_1): Add an explicit alignment argument.
	Don't switch sections here.
	(output_constant_pool): Adjust call to output_constant_pool_1.
	Switch sections here instead.  Don't output anything for block symbols;
	just pass them to place_block_symbol.
	(init_varasm_once): Initialize object_block_htab.
	(default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK.
	(default_asm_output_anchor, default_use_aenchors_for_symbol_p)
	(place_block_symbol, get_section_anchor, output_object_block)
	(output_object_block_htab, output_object_blocks): New functions.
	* target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro.
	(TARGET_ASM_OUT): Include it.
	(TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro.
	(TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros.
	(TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro.
	(TARGET_INITIALIZER): Include them.
	* rtl.c (rtl_check_failed_block_symbol): New function.
	* rtl.h: Include vec.h.  Declare heap and gc rtx vectors.
	(block_symbol, object_block): New structures.
	(rtx_def): Add a block_symbol field to the union.
	(BLOCK_SYMBOL_CHECK): New macro.
	(rtl_check_failed_block_symbol): Declare.
	(SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags.
	(SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates.
	(SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2.
	(SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors.
	* output.h (output_section_symbols): Declare.
	(object_block): Name structure.
	(place_section_symbol, get_section_anchor, default_asm_output_anchor)
	(default_use_anchors_for_symbol_p): Declare.
	* Makefile.in (RTL_BASE_H): Add vec.h.
	(explow.o): Depend on output.h.
	* config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default.
	(TARGET_MAX_ANCHOR_OFFSET): Likewise.
	(TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise.
	(rs6000_use_blocks_for_constant_p): New function.

From-SVN: r111254
2006-02-18 22:06:53 +00:00
Paolo Bonzini 5b4fdb2060 cfg.c (dump_flow_info): Get dump flags as an additional parameter.
2006-02-15  Paolo Bonzini  <bonzini@gnu.org>

	* cfg.c (dump_flow_info): Get dump flags as an additional parameter.
	(debug_flow_info): Pass it.
	* alias.c (rest_of_handle_cfg): Adjust calls to dump_flow_info.
	* bb-reorder.c (reorder_basic_blocks): Likewise.
	* cfgcleanup.c (rest_of_handle_jump2): Likewise.
	* cse.c (rest_of_handle_cse, rest_of_handle_cse2): Likewise.
	* flow.c (life_analysis, recompute_reg_usage): Likewise.
	* gcse.c (gcse_main, bypass_jumps): Likewise.
	* ifcvt.c (rest_of_handle_if_conversion): Likewise.
	* local-alloc.c (rest_of_handle_local_alloc): Likewise.
	* loop-init.c (rtl_loop_init, rtl_loop_done): Likewise.
	* profile.c (compute_branch_probabilities, branch_prob): Likewise.
	* rtl.h (dump_flow_info): Adjust prototype.
	* tracer.c (rest_of_handle_tracer, tracer): Likewise.
	* var-tracking.c (variable_tracking_main): Likewise.
	* passes.c (execute_todo): Obey TDF_BLOCKS for RTL.
	* tree-dump.c (enable_rtl_dump_file): Enable the details and blocks
	options.

From-SVN: r111020
2006-02-15 09:15:56 +00:00