Commit Graph

119 Commits

Author SHA1 Message Date
Zdenek Dvorak 9f2e9ac43b re PR rtl-optimization/32773 (SH: ICE in create_pre_exit, at mode-switching.c:223)
PR rtl-optimization/32773
	* cfglayout.c (force_one_exit_fallthru): New function.
	(cfg_layout_finalize): Use it.

	* gcc.dg/pr32773.c: New test.

From-SVN: r126700
2007-07-17 03:56:40 +00:00
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Thomas Neumann ae50c0cbc8 cfg.c (init_flow): Use type safe memory macros.
* cfg.c (init_flow): Use type safe memory macros.
	(alloc_block): Likewise.
	(unchecked_make_edge): Likewise.
	(dump_flow_info): Avoid using C++ keywords as variable names.
	(copy_original_table_clear): Cast according to the coding conventions.
	(copy_original_table_set): Likewise.
	* cfgexpand (label_rtx_for_bb): Likewise.
	(expand_gimüle_basic_block): Likewise.
	* cfghooks.c (dump_bb): Likewise.
	(lv_adjust_loop_header_phi): Avoid using C++ keywords as variable names.
	(lv_add_condition_to_bb): Likewise.
	* cfglayout (relink_block_chain): Cast according to the coding
	conventions.
	(fixup_reorder_chain): Likewise.
	(fixup_fallthru_exit_predecessor): Likewise.
	* cfgloop.c (glb_enum_p): Likewise.
	(get_exit_description): Likewise.
	(dump_recorded_exit): Likewise.
	* cfgloop.h (enum loop_estimation): Move out of struct scope...
	(struct loop): ... from here.
	* cfgloopmanip (rpe_enum_p): Cast according to the coding conventions.
	* cfgrtl.c (rtl_create_basic_block): Likewise.
	(rtl_split_block): Likewise.
	(rtl_dump_bb): Likewise.
	(cfg_layout_split_block): Likewise.
	(init_rtl_bb_info): Use typesafe memory macros.

	* graphds.h (struct graph_edge): Renamed edge to graph_edge.
	* graphds.h: Updated all usages of edge to graph_edge.
	* graphds.c: Likewise.
	* cfgloopanal.c: Likewise.

From-SVN: r125336
2007-06-05 15:41:04 +00:00
Kazu Hirata c80b4100e0 cfglayout.c, [...]: Fix comment typos.
* cfglayout.c, cgraphunit.c, config/avr/avr.c, fold-const.c,
	haifa-sched.c, optabs.h, tree-affine.c, tree-data-ref.c,
	tree-predcom.c, tree-ssa-alias-warnings.c,
	tree-ssa-forwprop.c, tree-vect-analyze.c, tree-vrp.c: Fix
	comment typos.  Follow spelling conventions.
	* doc/cpp.texi, doc/invoke.texi: Fix typos.

From-SVN: r125080
2007-05-25 22:58:16 +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
Steven Bosscher 49ea3702aa cfglayout.c (fixup_reorder_chain): Postpone deleting dead jump tables...
* cfglayout.c (fixup_reorder_chain): Postpone deleting dead
	jump tables, move the call to delete_dead_jumptables from here...
	(cfg_layout_finalize): ...to here.  But rebuild jump labels first.
	* cfgrtl.c (cfg_layout_can_merge_blocks_p): When not optimizing,
	don't allow merging of blocks that try_redirect_by_replacing_jump
	also does not handle when not optimizing.

From-SVN: r122957
2007-03-15 20:08:29 +00:00
Steven Bosscher dacb3cda32 tree-pass.h (pass_into_cfg_layout_mode, [...]): Declare.
* tree-pass.h (pass_into_cfg_layout_mode,
	pass_outof_cfg_layout_mode): Declare.
	* cfglayout.c (into_cfg_layout_mode, outof_cfg_layout_mode,
	pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode): New.
	* passes.c (pass_into_cfg_layout_mode): Schedule before jump2.
	(pass_outof_cfg_layout_mode): Schedule after pass_rtl_ifcvt.

From-SVN: r122858
2007-03-12 19:38:06 +00:00
Steven Bosscher 7984c78796 lower-subreg.c: Include except.h.
* lower-subreg.c: Include except.h.
	(decompose_multiword_subregs): Verify that the only control flow
	insns we can split are loads to multi-words pseudos.
	Handle breaking such blocks after splitting, instead of calling
	find_many_sub_basic_blocks.

	* loop-unroll.c (split_edge_and_insert): Don't set BB_SUPERBLOCK
	on the new basic block.  Add a lengthy comment explaining why we
	thought this was necessary.
	* cfglayout.c (cfg_layout_finalize): Don't break superblocks.

From-SVN: r122807
2007-03-10 23:33:40 +00:00
Steven Bosscher aeceeb06a1 cfgcleanup.c (cleanup_cfg): Detect cfglayout mode and set the CLEANUP_CFGLAYOUT flag when in cfglayout mode.
* cfgcleanup.c (cleanup_cfg): Detect cfglayout mode and set
	the CLEANUP_CFGLAYOUT flag when in cfglayout mode.

	* Makefile.c (GTFILES): Add cfglayout.h.
	* gengtype.c (open_base_files): Likewise.
	* cfglayout.c (cfg_layout_function_footer,
	cfg_layout_function_header) Reindent to make gengtype happy.
	* cfglayout.h (cfg_layout_function_footer,
	cfg_layout_function_header): Add GTY(()) marker.

	* ifcvt.c (noce_try_sign_mask): Make sure INSN_B is non-null.

From-SVN: r120893
2007-01-18 08:17:06 +00:00
Jan Hubicka 071a42f958 cfgexpand.c (construct_exit_block): Don't disturb end of last BB.
* cfgexpand.c (construct_exit_block): Don't disturb end of last BB.
	* rtl.texi (NOTE_INSN_FUNCTION_END): Remove.
	* final.c (final_scan_insn): Don't scan NOTE_INSN_FUNCTION_END.
	* insn-notes.def (FUNCTION_END): Remove.
	* jump.c (delete_related_insns): Don't worry about FUNCTION_END.
	(redicect_jump_2): Don't accept -1 parameter to remove FUNCTION_END
	note.
	* ifcvt.c (dead_or_predictable): Update call of redirect_jump_2.
	* function.c (expand_function_end): Don't emit NOTE_INSN_FUNCTION_END
	* cfglayout.c (duplicate_insn_chain): Don't worry about
	NOTE_FUNCTION_END.

From-SVN: r119250
2006-11-27 15:07:10 +00:00
Zdenek Dvorak 598ec7bdbe tree-vrp.c (execute_vrp): Do not update current_loops.
* tree-vrp.c (execute_vrp): Do not update current_loops.
	* loop-unswitch.c (unswitch_loop): Do not use loop_split_edge_with.
	* doc/loop.texi: Remove documentation for cancelled functions.
	* tree-ssa-loop-im.c (loop_commit_inserts): Removed.
	(move_computations, determine_lsm): Use bsi_commit_edge_inserts
	instead.
	* cfgloopmanip.c (remove_bbs): Do not update loops explicitly.
	(remove_path): Ensure that in delete_basic_blocks, the loops
	are still allocated.
	(add_loop): Work on valid loop structures.
	(loopify): Modify call of add_loop.
	(mfb_update_loops): Removed.
	(create_preheader): Do not update loops explicitly.
	(force_single_succ_latches, loop_version): Do not use
	loop_split_edge_with.
	(loop_split_edge_with): Removed.
	* tree-ssa-loop-manip.c (create_iv, determine_exit_conditions):
	Do not use bsi_insert_on_edge_immediate_loop.
	(split_loop_exit_edge, tree_unroll_loop): Do not use
	loop_split_edge_with.
	(bsi_insert_on_edge_immediate_loop): Removed.
	* tree-ssa-loop-ch.c (copy_loop_headers): Use current_loops.  Do not
	use loop_split_edge_with.
	* cfghooks.c: Include cfgloop.h.
	(verify_flow_info): Verify that loop_father is filled iff current_loops
	are available.
	(redirect_edge_and_branch_force, split_block, delete_basic_block,
	split_edge, merge_blocks, make_forwarder_block, duplicate_block):
	Update cfg.
	* cfgloopanal.c (mark_irreducible_loops): Work if the function contains
	no loops.
	* modulo-sched.c (generate_prolog_epilog, canon_loop): Do not use
	loop_split_edge_with.
	(sms_schedule): Use current_loops.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Use current_loops.
	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Set
	current_loops.
	(rtl_loop_init, rtl_loop_done): Do not set current_loops.
	* tree-ssa-sink.c (execute_sink_code): Use current_loops.
	* ifcvt.c (if_convert): Ditto.
	* predict.c (predict_loops): Do not clear current_loops.
	(tree_estimate_probability): Use current_loops.
	(propagate_freq): Receive head of the region to propagate instead of
	loop.
	(estimate_loops_at_level): Do not use shared to_visit bitmap.
	(estimate_loops): New function.  Handle case current_loops == NULL.
	(estimate_bb_frequencies): Do not allocate tovisit.  Use
	estimate_loops.
	* tree-ssa-loop.c (current_loops): Removed.
	(tree_loop_optimizer_init): Do not return loops.
	(tree_ssa_loop_init, tree_ssa_loop_done): Do not set current_loops.
	* tree-vectorizer.c (slpeel_update_phi_nodes_for_guard1,
	slpeel_update_phi_nodes_for_guard2, slpeel_tree_peel_loop_to_edge):
	Do not update loops explicitly.
	* function.h (struct function): Add x_current_loops field.
	(current_loops): New macro.
	* tree-if-conv.c (combine_blocks): Do not update loops explicitly.
	* loop-unroll.c (split_edge_and_insert): New function.
	(unroll_loop_runtime_iterations, analyze_insns_in_loop): Do not
	use loop_split_edge_with.
	* loop-doloop.c (add_test, doloop_modify): Ditto.
	* tree-ssa-pre.c (init_pre, fini_pre): Do not set current_loops.
	* cfglayout.c (copy_bbs): Do not update loops explicitly.
	* lambda-code.c (perfect_nestify): Do not use loop_split_edge_with.
	* tree-vect-transform.c (vect_transform_loop): Do not update loops
	explicitly.
	* cfgloop.c (flow_loops_cfg_dump): Do not dump dfs_order and rc_order.
	(flow_loops_free): Do not free dfs_order and rc_order.
	(flow_loops_find): Do not set dfs_order and rc_order in loops
	structure.  Do not call loops and flow info verification.
	(add_bb_to_loop, remove_bb_from_loops): Check whether the block
	already belongs to some loop.
	* cfgloop.h (struct loops): Remove struct cfg.
	(current_loops, loop_split_edge_with): Declaration removed.
	(loop_optimizer_init, loop_optimizer_finalize): Declaration changed.
	* tree-flow.h (loop_commit_inserts, bsi_insert_on_edge_immediate_loop):
	Declaration removed.
	* Makefile.in (cfghooks.o): Add CFGLOOP_H dependency.
	* basic-block.h (split_edge_and_insert): Declare.
	* tree-cfg.c (remove_bb): Do not update loops explicitly.

From-SVN: r118931
2006-11-17 11:29:17 +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 9ff5780962 final.c (final): Walk from first instruction.
* final.c (final): Walk from first instruction.
	* cfglayout.c (insn_locators_initialize): Remove line number notes.

From-SVN: r118650
2006-11-10 09:30:33 +00:00
Mike Stump c22cacf346 Whitespace fixups
From-SVN: r113893
2006-05-18 22:16:23 +00:00
Kazu Hirata e3df376d22 Makefile.in (tree-into-ssa.o, [...]): Depend on vecprim.h.
* Makefile.in (tree-into-ssa.o, tree-outof-ssa.o,
	tree-ssa-live.o, tree-ssa-alias.o, function.o, df-problems.o,
	global.o, cfglayout.o, lambda-code.o, reg-stack.o,
	build/genextract.o): Depend on vecprim.h.
	* cfglayout.c, df-problems.c, function.c, genextract.c,
	global.c, lambda-code.c, reg-stack.c, tree-into-ssa.c,
	tree-outof-ssa.c, tree-ssa-alias.c, tree-ssa-live.c: Include
	vecprim.h.
	* vecprim.h: New.

From-SVN: r112830
2006-04-10 19:26:18 +00:00
Zdenek Dvorak 054a09fb26 cfgloopmanip.c (create_loop_notes): Removed.
* cfgloopmanip.c (create_loop_notes): Removed.
	* final.c (final_scan_insn): Do not handle loop notes.
	* jump.c (squeeze_notes): Ditto.
	* cfglayout.c (skip_insns_after_block,
	duplicate_insn_chain): Ditto.
	* cfgcleanup.c (rest_of_handle_jump2): Do not call
	create_loop_notes.
	* cfgloop.h (create_loop_notes): Declaration removed.

From-SVN: r112316
2006-03-23 10:33:38 +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
Kazu Hirata 68f9b84438 basic-block.h (control_flow_graph): Change the type of x_basic_block_info to VEC(basic_block,gc) *.
* basic-block.h (control_flow_graph): Change the type of
	x_basic_block_info to VEC(basic_block,gc) *.
	(BASIC_BLOCK_FOR_FUNCTION, BASIC_BLOCK): Adjust the uses of
	basic_block_info.
	(SET_BASIC_BLOCK): New.
	* cfg.c (compact_blocks, expunge_block): Use SET_BASIC_BLOCK
	instead of BASIC_BLOCK when assigning to BASIC_BLOCK.
	* cfgbuild.c (find_basic_blocks): Likewise.
	* cfglayout.c (fixup_reorder_chain): Likewise.
	* cfgrtl.c (create_basic_block_structure,
	rtl_create_basic_block): Likewise.
	* ifcvt.c (find_if_case_1): Likewise.
	* tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, create_bb):
	Likewise.

From-SVN: r109596
2006-01-11 18:43:15 +00:00
Eric Botcazou c8c3cb28fa cfglayout.c (fixup_reorder_chain): Remove kludge for the case of conditional jump jumping to the next instruction.
* cfglayout.c (fixup_reorder_chain): Remove kludge for the
	case of conditional jump jumping to the next instruction.
	* cfgrtl.c (force_nonfallthru_and_redirect): Accept all
	cases of conditional jump jumping to the next instruction.


Co-Authored-By: Jan Hubicka <jh@suse.cz>

From-SVN: r109247
2006-01-02 22:47:50 +00:00
Daniel Berlin 24bd1a0b27 basic-block.h: Changed basic block numbering so that the entry block is 0 and the exit block is 1.
2005-12-17  Danny Berlin <dberlin@dberlin.org>
	    Kenneth Zadeck <zadeck@naturalbridge.com>

	* basic-block.h: Changed basic block numbering so that the entry
	block is 0 and the exit block is 1.  Changed insn iterators so
	that they are tolerant of blocks with no insns.
	* regrename.c (copyprop_hardreg_forward): Changed basic block
	numbering so that the entry block is 0 and the exit block is 1.
	* sched-ebb.c (sehedule_ebbs): Ditto.
	* tracer.c (branch_ratio_cutoff): Ditto.
	* cfgloopmanip.c (fix_loop_structure): Ditto.
	* cfghooks.c (verify_flow_info): Ditto.
	* cfg.c (compact_blocks): Ditto.
	* reorg.c (dbr_schedule): Ditto.
	* flow.c (calculate_global_regs_live, libcall_dead_p): Ditto.
	* dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree,
	calculate_dominance_info): Ditto.
	* cfganal.c (create_edge_list, print_edge_list,
	flow_depth_first_order_compute, flow_dfs_compute_reverse_init,
	flow_dfs_compute_reverse_add_bb, flow_dfs_compute_reverse_execute,
	dfs_enumerate_from): Ditto.
	* global.c (global_alloc, set_up_bb_rts_numbers): Ditto.
	* ifcvt.c (find_if_case_2): Ditto.
	* cfgbuild.c (control_flow_insn_p, count_basic_blocks,
	find_basic_blocks): Ditto.
	* predict.c (predict_loops, tree_bb_level_predictions,
	predict_paths_leading_to, propagate_freq): Ditto.
	* lcm.c (compute_antinout_edge, compute_laterin,
	compute_available): Ditto.
	* function.c (thread_prologue_and_epilogue_insns): Ditto.
	* gcse.c (gcse_main, bypass_jumps): Ditto.
	* profile.c (compute_branch_probabilities,
	compute_value_histograms, branch_prob): Ditto.
	* tree-flow-inline.h (bsi_start, bsi_after_labels,
	bsi_last): Ditto.
	* tree-ssa-phiopt.c (tree_ssa_phiopt,
	blocks_in_phiopt_order): Ditto.
	* bt-load.c (compute_defs_uses_and_gen, compute_kill,
	compute_out, link_btr_uses, migrate_btr_defs): Ditto.
	* tree-dfa.c (collect_dfa_stats): Ditto.
	* cfgcleanup.c (try_forward_edges, try_optimize_cfg): Ditto.
	* cfglayout.c (fixup_reorder_chain): Ditto.
	* bb-reorder.c (reorder_basic_blocks, duplicate_computed_gotos,
	partition_hot_cold_basic_blocks): Ditto.
	* var-tracking.c (vt_find_locations): Ditto.
	* cfgloop.c (flow_loops_cfg_dump, flow_loops_find, get_loop_body): Ditto.
	* sched-rgn.c (compute_trg_info, init_regions, schedule_insns): Ditto.
	* tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, make_edges
	label_to_block_fn, print_loop_ir, tree_flow_call_edges_add): Ditto.
	* tree-ssa-reassoc.c (init_reassoc): Ditto.
	* cfgrtl.c (entry_of_function, rtl_verify_flow_info,
	rtl_flow_call_edges_add, rtl_flow_call_edges_add): Ditto.
	* df.c (df_analyze_1, hybrid_search, iterative_dataflow): Ditto
	and removed unused reverse orders.
	* df.h (): Ditto.
	* combine.c: Fix document typo.



Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com>

From-SVN: r108713
2005-12-17 13:40:27 +00:00
Zdenek Dvorak b9a6624012 bb-reorder.c (copy_bb, [...]): Add argument to duplicate_block.
* bb-reorder.c (copy_bb, duplicate_computed_gotos): Add argument
	to duplicate_block.
	* cfghooks.c (duplicate_block): Added position where to place
	new block as argument.
	* cfghooks.h (duplicate_block): Declaration changed.
	* cfglayout.c (copy_bbs): Add argument after.  Pass it to
	duplicate_block.
	* cfglayout.h (copy_bbs): Declaration changed.
	* cfgloop.h (loop_version): Declaration changed.
	* cfgloopmanip.c (duplicate_loop_to_header_edge): Pass
	position to copy_bbs.
	(loop_version): Pass position to duplicate_loop_to_header_edge.
	Add place_after argument and position new blocks according to
	it.
	* modulo-sched.c (sms_schedule): Pass place_after argument
	to loop_version.
	* tracer.c (tail_duplicate): Pass argument to duplicate_block.
	* tree-cfg.c (split_edge_bb_loc): New function.
	(tree_split_edge, tree_duplicate_sese_region): Use split_edge_bb_loc
	to determine position of new blocks.
	* tree-ssa-loop-unswitch.c (tree_unswitch_loop): Pass argument
	to loop_version.
	* tree-ssa-threadupdate.c (create_block_for_threading): Pass
	argument to duplicate_block.
	* tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg):
	Pass position to copy_bbs.

From-SVN: r103437
2005-08-24 07:56:56 +00:00
Paolo Bonzini defb77dcaa bb-reorder.c (pass_duplicate_computed_gotos, [...]): Add dump.
2005-08-09  Paolo Bonzini  <bonzini@gnu.org>

	* bb-reorder.c (pass_duplicate_computed_gotos, pass_partition_blocks):
	Add dump.
	* cfglayout.c (pass_insn_locators_initialize): Add dump.
	* emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes):
	Add dump.
	* except.c (pass_convert_to_eh_region_ranges): Add dump.
	* final.c (pass_shorten_branches): Add dump.
	* flow.c (pass_recompute_reg_usage, pass_remove_death_notes): Add dump.
	(pass_life): Rename dump.
	(rest_of_handle_flow2): Remove initial verify_flow_info.
	* function.c (pass_instantiate_virtual_regs): Add dump.
	* integrate.c (pass_initial_value_sets): Add dump.
	* jump.c (pass_cleanup_barriers, pass_purge_lineno_notes): Add dump.
	* loop-init.c (pass_rtl_loop_init, pass_rtl_loop_done): Rename dump.
	(pass_rtl_move_loop_invariants, pass_rtl_unswitch, pass_rtl_doloop,
	pass_rtl_unroll_and_peel_loops): Rename dump and add gate.
	(gate_rtl_move_loop_invariants, gate_rtl_unswitch, gate_rtl_doloop,
	gate_rtl_unrool_and_peel_loops): New.
	(rtl_move_loop_invariants, rtl_unswitch, rtl_unrool_and_peel_loops,
	rtl_doloop): Do not look at flags.
	* mode-switching.c (pass_mode_switching): Add dump.
	* recog.c (pass_split_all_insns, pass_split_for_shorten_branches,
	pass_split_before_regstack): Add dump.
	* regmove.c (pass_stack_adjustments): Add dump.
	* tree-optimize.c (pass_fixup_cfg): Add dump.

From-SVN: r102945
2005-08-10 09:02:48 +00:00
Paolo Bonzini ef3303124e Makefile.in: Adjust dependencies.
2005-07-05  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in: Adjust dependencies.
	* tree-pass.h: Add new passes and passes formerly in tree-optimize.c.
	* basic-block.h (duplicate_computed_gotos): Remove, it is now static.
	* alias.c (rest_of_handle_cfg, pass_cfg): New.
	* bb-reorder.c (duplicate_computed_gotos): Make it static.
	* cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of
	rest_of_compilation.

	* bb-reorder.c (gate_duplicate_computed_gotos,
	pass_duplicate_computed_gotos, gate_handle_reorder_blocks,
	rest_of_handle_reorder_blocks, pass_reorder_blocks,
	gate_handle_partition_blocks, rest_of_handle_partition_blocks,
	pass_partition_blocks): New.
	* bt-load.c (gate_handle_branch_target_load_optimize,
	rest_of_handle_branch_target_load_optimize,
	pass_branch_target_load_optimize): New.
	* cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2,
	pass_jump2): New.
	* cfglayout.c (pass_insn_locators_initialize): New.
	* cfgrtl.c (pass_free_cfg): New.
	* combine.c (gate_handle_combine, rest_of_handle_combine,
	pass_combine): New.
	* cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse,
	gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New.
	* emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New.
	* except.c (pass_set_nothrow_function_flags,
	pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh,
	pass_rtl_eh): New.
	* final.c (pass_compute_alignments, rest_of_handle_final, pass_final,
	rest_of_handle_shorten_branches, pass_shorten_branches,
	rest_of_clean_state, pass_clean_state): New.
	* flow.c (pass_recompute_reg_usage, gate_remove_death_notes,
	rest_of_handle_remove_death_notes, pass_remove_death_notes,
	rest_of_handle_life, pass_life, rest_of_handle_flow2,
	pass_flow2): New.
	* function.c (pass_instantiate_virtual_regs, pass_init_function,
	rest_of_handle_check_leaf_regs, pass_leaf_regs): New.
	* gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass,
	pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse,
	pass_gcse): New.
	* global.c (rest_of_handle_global_alloc, pass_global_alloc): New.
	* ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion,
	pass_rtl_ifcvt, gate_handle_if_after_combine,
	rest_of_handle_if_after_combine, pass_if_after_combine,
	gate_handle_if_after_reload, rest_of_handle_if_after_reload,
	pass_if_after_reload): New.
	* integrate.c (pass_initial_value_sets): New.
	* jump.c (pass_cleanup_barriers, purge_line_number_notes,
	pass_purge_lineno_notes): New.
	* mode-switching.c (rest_of_handle_mode_switching,
	pass_mode_switching): New.
	* local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New.
	* loop-init.c (gate_handle_loop2, rest_of_handle_loop2,
	pass_loop2): New.
	* loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize,
	pass_loop_optimize): New.
	* modulo-sched.c (gate_handle_sms, rest_of_handle_sms,
	pass_sms): New.
	* postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2,
	pass_gcse2): New.
	* postreload.c (gate_handle_postreload, rest_of_handle_postreload,
	pass_postreload_cse): New.
	* profile.c (gate_handle_profiling, pass_profiling,
	rest_of_handle_branch_prob, pass_branch_prob): New.
	* recog.c (pass pass_split_for_shorten_branches, gate_do_final_split,
	pass_split_before_regstack, gate_handle_split_before_regstack,
	gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2,
	rest_of_handle_split_all_insns, pass_split_all_insns): New.
	* reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs,
	pass_stack_regs): New.
	* regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove,
	gate_handle_stack_adjustments, rest_of_handle_stack_adjustments,
	pass_stack_adjustments): New.
	* regrename.c (gate_handle_regrename, rest_of_handle_regrename,
	pass_regrename): New.
	* reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots,
	pass_delay_slots, gate_handle_machine_reorg,
	rest_of_handle_machine_reorg, pass_machine_reorg): New.
	* rtl.h (extern void purge_line_number_notes): New.
	* sched-rgn.c (gate_handle_sched, rest_of_handle_sched,
	gate_handle_sched2, rest_of_handle_sched2, pass_sched,
	pass_sched2): New.
	* tracer.c (gate_handle_tracer, rest_of_handle_tracer,
	pass_tracer): New.
	* value-prof.c (gate_handle_value_profile_transformations,
	rest_of_handle_value_profile_transformations,
	pass_value_profile_transformations): New.
	* var-tracking.c (gate_handle_var_tracking,
	pass_variable_tracking): New.
	* web.c (gate_handle_web, rest_of_handle_web, pass_web): New.

	* passes.c (open_dump_file, close_dump_file, rest_of_handle_final,
	rest_of_handle_delay_slots, rest_of_handle_stack_regs,
	rest_of_handle_variable_tracking, rest_of_handle_machine_reorg,
	rest_of_handle_old_regalloc, rest_of_handle_regrename,
	rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks,
	rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2,
	rest_of_handle_gcse2, rest_of_handle_regmove,
	rest_of_handle_tracer, rest_of_handle_if_conversion,
	rest_of_handle_if_after_combine, rest_of_handle_if_after_reload,
	rest_of_handle_web, rest_of_handle_branch_prob,
	rest_of_handle_value_profile_transformations, rest_of_handle_cfg,
	rest_of_handle_jump_bypass, rest_of_handle_combine,
	rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2,
	rest_of_handle_gcse, rest_of_handle_loop_optimize,
	rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize,
	rest_of_handle_mode_switching, rest_of_handle_jump,
	rest_of_handle_eh, rest_of_handle_stack_adjustments,
	rest_of_handle_flow2, rest_of_handle_jump2,
	rest_of_handle_peephole2, rest_of_handle_postreload,
	rest_of_handle_shorten_branches, rest_of_clean_state,
	rest_of_compilation): Remove.

	* cgraphunit.c (ipa_passes): Moved from tree-optimize.c.
	* passes.c (dump_flags, in_gimple_form, all_passes,
	all_ipa_passes, all_lowering_passes, register_one_dump_file,
	register_dump_files, next_pass_1, last_verified, execute_todo,
	execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved
	from tree-optimize.c.
	(init_optimization_passes): Moved from tree-optimize.c,
	adding the RTL optimizations.
	* tree-dump.h (dump_info_p, dump_flag): Moved from tree.h.
	* tree-optimize.c (dump_flags, in_gimple_form, all_passes,
	all_ipa_passes, all_lowering_passes, register_one_dump_file,
	register_dump_files, next_pass_1, last_verified, execute_todo,
	execute_one_pass, execute_pass_list, execute_ipa_pass_list,
	init_tree_optimization_passes, ipa_passes): Delete.
	* tree-pass.h (enum tree_dump_index): Moved from tree.h, removing
	the RTL dumps.
	(TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p,
	dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved
	from tree.h.
	(ipa_passes): Remove.
	(all_passes, all_ipa_passes, all_lowering_passes): Now extern.
	* tree.h (enum tree_dump_index, TDF_*, get_dump_file_name,
	dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node,
	dump_switch_p, dump_flag_name): Moved to tree-pass.h.
	(dump_info_p, dump_flag): Moved to tree-dump.h.

	* Makefile.in: Adjust dependencies for tree-pretty-print.c,
	cgraph.c, opts.c.
	* passes.c (finish_optimization_passes): Use dump_begin
	and dump_end, TDI_end.
	(gate_rest_of_compilation): New.
	(pass_rest_of_compilation): Use it.
	(gate_postreload, pass_postreload): New.
	* toplev.c (general_init): Rename init_tree_optimization_passes.
	* toplev.h (init_tree_optimization_passes): Rename to
	init_optimizations_passes.
	* tree-dump.c (dump_flag): Make static.
	(dump_files): Remove RTL dumps.
	* tree-optimize.c (pass_all_optimizations, pass_early_local_passes,
	pass_cleanup_cfg, pass_free_cfg_annotations,
	pass_cleanup_cfg_post_optimizing, pass_free_datastructures,
	pass_init_datastructures, pass_fixup_cfg): Make non-static.
	* tree-pretty-print.c: Include tree-pass.h.
	* cgraph.c: Include tree-dump.h.

cp:
2005-07-05  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in (class.o, decl2.o): Adjust dependencies.
	* class.c: Include tree-dump.h.
	* decl2.c: Include tree-dump.h.

java:
2005-07-05  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in (parse.o): Adjust dependencies.
	* parse.y: Include tree-dump.h.

From-SVN: r101627
2005-07-05 16:20:53 +00:00
Jan Hubicka 370369e1a7 basic-block.h (basic_block_def): Kill rbi.
* basic-block.h (basic_block_def): Kill rbi.
	(reorder_block_def): Kill; Remove next field (replaced by aux);
	move other fields to ...
	(rtl_bb_info): ... here.
	* bb-reorder.c (find_traces, rotate_loop, find_traces_1_round,
	copy_bb, connect_traces, add_labels_and_missing_jumps
	fix_up_fall_thru_edges, fix_crossing_conditional_branches,
	duplicate_computed_gotos, partition_hot_cold_basic-blocks):
	Update to new fields.
	* cfg.c (initialize_bb_rbi): Kill.
	* cfglayout.c (record_effective_endpoints, fixup_reorder_chain,
	fixup_fallthru_exit_predecessor, cfg_layout_duplicate_bb): Update.
	* cfgrtl.c (cfg_layout_create_basic_block): Do not initialize rbi.
	(try_redirect_by_replacing_jump): Update rbi references.
	(cfg_layout_split_block): Likewise.
	(cfg_layout_delete_block): Likewise.
	(cfg_layout_merge_blocks): Likewise.
	* function.c (thread_prologue_and_epilogue_insns): Likewise.
	* passes.c (rest_of_handle_sms): Likewise.
	* tracer.c (seen, tail_duplicate, layout_superblocks): Likewise.

From-SVN: r101359
2005-06-27 23:06:33 +00:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Kazu Hirata 011646f5ef cfglayout.c (block_locators_locs, [...]): Change the type to VEC(int,heap)*.
* cfglayout.c (block_locators_locs, line_locators_locs,
	line_locators_lines, file_locators_locs): Change the type to
	VEC(int,heap)*.
	(insn_locators_initialize, change_scope, insn_scope,
	locator_line, insn_line, locator_file): Use VEC instead of
	VARRAY.

From-SVN: r101297
2005-06-24 21:55:32 +00:00
Jan Hubicka 5e2d947ce8 basic-block.h (rtl_bb_info): Break out head_, end_, global_live_at_start, global_live_at_end from ...
* basic-block.h (rtl_bb_info): Break out head_, end_,
	global_live_at_start, global_live_at_end from ...
	(basic_block_def): ... here; update all references
	(BB_RTL): New flag.
	(init_rtl_bb_info): Declare.
	* cfgexpand.c (expand_gimple_basic_block): Init bb info, set BB_RTL
	flag.
	* cfgrtl.c: Include ggc.h
	(create_basic_block_structure): Init bb info.
	(rtl_verify_flow_info_1): Check BB_RTL flag and rtl_bb_info pointer.
	(init_rtl_bb_info): New function.
	(rtl_merge_block, cfglayout_merge_block): Copy global_live_at_end here.
	* cfghooks.c (merge_block): Do not copy global_live_at_end here.
	* cfg.c (clear_bb_flags): Skip BB_RTL flag.
	(dump_flow_info): Gueard global_live_* dumping.

From-SVN: r101082
2005-06-16 10:33:40 +00:00
Jan Hubicka 6580ee7781 Makefile.in (cfg.o): Add new dependencies.
* Makefile.in (cfg.o): Add new dependencies.
	* basic-block.h (reorder_block_def): Kill
	original/copy/duplicated/copy_number fields.
	(BB_DUPLICATED): New flag.
	(initialize_original_copy_tables, free_original_copy_tables,
	set_bb_original, get_bb_original, set_bb_copy, get_bb_copy): New.
	* cfg.c: Include hashtab.h and alloc-pool.h
	(bb_original, bb_copy, original_copy_bb_pool): New static vars.
	(htab_bb_copy_original_entry): New struct.
	(bb_copy_original_hash, bb_copy_original_eq): New static functions.
	(initialize_original_copy_tables, free_original_copy_tables,
	set_bb_original, get_bb_original, set_bb_copy, get_bb_copy): New
	global functions.
	* cfghooks.c (duplicate_block): Update original/copy handling.
	* cfglayout.c (fixup_reorder_chain): Likewise.
	(cfg_layout_initialize): Initialize orignal_copy tables.
	(cfg_layout_finalize): FInalize original_copy tables.
	(can_copy_bbs_p): Use BB_DUPLICATED flag.
	(copy_bbs): Likewise.
	* cfgloopmanip.c (update-single_exits_after_duplication): Likewise.
	(duplicate_loop_to_header_edge): Likewise; update handling of
	copy_number.
	(loop_version): Likewise.
	* dominance.c (get_dominated_by_region): Use BB_DUPLICATED_FLAG.
	* except.c (expand_resx_expr): Check that reg->resume is not set.
	* loop-unroll.c (unroll_loop_constant_iterations,
	unroll_loop_runtime_iterations, apply_opt_in_copies): Update
	copy/original handling.
	* loop-unwitch.c (unswitch_loop): Likewise.
	* tree-cfg.c (create_bb): Do not initialize RBI.
	(disband_implicit_edges): Do not kill RBI.
	(add_phi_args_after_copy_bb): Use new original/copy mapping.
	(add_phi_args_after_copy): Use BB_DUPLICATED flag.
	(tree_duplicate_sese_region): Update original/copy handling.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
	* tree-ssa-loop-manip.c (copy_phi_node_args): Likewise.
	* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Likewise.

From-SVN: r101000
2005-06-15 23:05:23 +00:00
Kazu Hirata 804035d38e cfglayout.c (block_locators_blocks, [...]): Use VEC instead of VARRAY.
* cfglayout.c (block_locators_blocks,
	insn_locators_initialize, insn_scope): Use VEC instead of
	VARRAY.

From-SVN: r99162
2005-05-03 16:35:17 +00:00
Steven Bosscher 997de8ed6b Makefile.in: Add function.h to BASIC_BLOCK_H.
* Makefile.in: Add function.h to BASIC_BLOCK_H.  Remove all
	references to gt-tree-cfg.h.
	* basic-block.h (struct basic_block_def): Don't skip rbi
	for garbage collection.
	(struct reorder_block_def): Make GTY-able.
	(struct control_flow_graph): New structure.
	(n_edges, n_basic_blocks, last_basic_block, basic_block_info,
	BASIC_BLOCK, EXIT_BLOCK_PTR, ENTRY_BLOCK_PTR): No longer vars,
	but instead defines to the control_flow_graph for cfun.
	(label_to_block_map): New define, points to the label map of
	the control_flow_graph for cfun.
	(n_edges_for_function, n_basic_blocks_for_function,
	last_basic_block_for_function, basic_block_info_for_function,
	EXIT_BLOCK_PTR_FOR_FUNCTION, ENTRY_BLOCK_PTR_FOR_FUNCTION,
	basic_block_info_for_function, label_to_block_map_for_function):
	Counterparts for the above, taking a struct function as an extra
	argument.
	(alloc_rbi_pool, free_rbi_pool): Remove prototypes.
	* cfg.c: (n_edges, n_basic_blocks, last_basic_block,
	basic_block_info, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR): Remove.
	(alloc_rbi_pool, free_rbi_pool): Remove.
	(initialize_bb_rbi): Use ggc_alloc_cleared instead of pool_alloc.
	* cfglayout.c: (cfg_layout_initialize): Don't allocate the rbi pool
	here...
	(cfg_layout_finalize) ... and don't free it here.
	* cfgrtl.c (cfg_layout_delete_block): Zero out rbi so it gets
	garbage collected.
	* flow.c (free_basic_block_vars): Set label_to_block_map and
	n_edges to zero too.
	* function.h (struct function): Add cfg field.
	* function.c (allocate_struct_function): Allocate the cfg.
	* tree-cfg.c (label_to_block_map): Remove.
	(build_tree_cfg): Don't allocate the rbi pool here...
	(delete_tree_cfg_annotations): ...and don't free it here.
	Also don't nullify label_to_block_map for cfun.

Co-Authored-By: Jan Hubicka <jh@suse.cz>
Co-Authored-By: Stuart Hastings <stuart@apple.com>

From-SVN: r98048
2005-04-12 21:33:53 +00:00
Jan Hubicka 7b0cab995d cfglayout.c (copy_bbs): Rename n_edges to num_edges.
* cfglayout.c (copy_bbs): Rename n_edges to num_edges.
	* cfgloop.c (get_loop_exit_edges): Likewise.
	* cfgloopmanip.c (fix_irreducible_loops): Likewise.
	(unloop): Likewise.
	* loop-unroll.c (analyze_insns_in_loop): Likewise.
	* tree-cfg.c (dump_cfg_status): Likewise.

Co-Authored-By: Steven Bosscher <stevenb@suse.de>

From-SVN: r97903
2005-04-09 16:09:11 +00:00
Caroline Tice 87c8b4bed3 Fix problems with hot/cold partitioning optimization.
From-SVN: r97322
2005-03-31 06:59:59 -08:00
Jakub Jelinek b2a6a2fb64 re PR target/20561 (Error compiling jdtcore.jar on powerpc)
PR target/20561
	* cfglayout.c (reemit_insn_block_notes): Don't put block notes in
	between jump table and its label.
	* final.c (shorten_branches): Handle notes in between ADDR_VEC
	resp. ADDR_DIFF_VEC and the label preceeding it.
	(final_scan_insn): Likewise.  Ensure ADDR_VEC resp. ADDR_DIFF_VEC
	is emitted in the right section.

	* gcc.dg/20050321-2.c: New test.

From-SVN: r96867
2005-03-22 14:29:29 +01:00
Kazu Hirata c6c81aa686 cfglayout.c, [...]: Update copyright.
* cfglayout.c, loop-doloop.c, profile.c, target-def.h,
	target.h, targhooks.c, tracer.c, tree-ssa-loop-ch.c,
	tree-ssa-loop-unswitch.c, tree-ssa-loop.c, vec.c, vmsdbgout.c,
	config/m32r/m32r.md, config/xtensa/xtensa.h: Update copyright.

From-SVN: r96320
2005-03-12 00:34:07 +00:00
Zdenek Dvorak c5cbcccf90 basic-block.h (single_succ_p, [...]): New inline functions.
* basic-block.h (single_succ_p, single_pred_p, single_succ_edge,
	single_pred_edge, single_succ, single_pred): New inline functions.
	* bb-reorder.c (rotate_loop, find_traces_1_round,
	add_labels_and_missing_jumps, fix_up_fall_thru_edges,
	duplicate_computed_gotos): Use the single_succ/pred functions.
	* cfganal.c (forwarder_block_p): Ditto.
	* cfgbuild.c (compute_outgoing_frequencies): Ditto.
	* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
	outgoing_edges_match, try_crossjump_to_edge, try_optimize_cfg,
	merge_seq_blocks): Ditto.
	* cfghooks.c (split_edge, tidy_fallthru_edges): Ditto.
	* cfglayout.c (fixup_reorder_chain): Ditto.
	* cfgloop.c (mark_single_exit_loops, update_latch_info,
	canonicalize_loop_headers, verify_loop_structure): Ditto.
	* cfgloopmanip.c (remove_path, unloop, loop_delete_branch_edge,
	mfb_update_loops, create_preheader, force_single_succ_latches,
	create_loop_notes): Ditto.
	* cfgrtl.c (rtl_can_merge_blocks, try_redirect_by_replacing_jump,
	force_nonfallthru_and_redirect, rtl_tidy_fallthru_edge,
	commit_one_edge_insertion, purge_dead_edges,
	cfg_layout_can_merge_blocks_p): Ditto.
	* except.c (sjlj_emit_function_enter): Ditto.
	* flow.c (init_propagate_block_info): Ditto.
	* function.c (thread_prologue_and_epilogue_insns): Ditto.
	* gcse.c (find_implicit_sets, bypass_conditional_jumps,
	insert_insn_end_bb): Ditto.
	* ifcvt.c (merge_if_block, find_if_block, find_if_case_1,
	find_if_case_2): Ditto.
	* lambda-code.c (perfect_nestify): Ditto.
	* lcm.c (optimize_mode_switching): Ditto.
	* loop-doloop.c (doloop_modify): Ditto.
	* loop-init.c (loop_optimizer_init): Ditto.
	* loop-iv.c (simplify_using_initial_values): Ditto.
	* loop-unroll.c (unroll_loop_runtime_iterations): Ditto.
	* loop-unswitch.c (unswitch_loop): Ditto.
	* modulo-sched.c (generate_prolog_epilog): Ditto.
	* predict.c (combine_predictions_for_insn, estimate_probability,
	tree_estimate_probability, last_basic_block_p,
	estimate_bb_frequencies): Ditto.
	* profile.c (branch_prob): Ditto.
	* regrename.c (copyprop_hardreg_forward): Ditto.
	* sched-rgn.c (is_cfg_nonregular, find_rgns, update_live): Ditto.
	* tracer.c (layout_superblocks): Ditto.
	* tree-cfg.c (tree_can_merge_blocks_p, tree_merge_blocks,
	cfg_remove_useless_stmts_bb, cleanup_control_flow,
	cleanup_control_expr_graph, disband_implicit_edges,
	tree_find_edge_insert_loc, bsi_commit_edge_inserts,
	tree_verify_flow_info, tree_make_forwarder_block,
	tree_forwarder_block_p, remove_forwarder_block,
	remove_forwarder_block_with_phi, merge_phi_nodes): Ditto.
	* tree-if-conv.c (tree_if_conversion): Ditto.
	* tree-mudflap.c (mf_build_check_statement_for): Ditto.
	* tree-ssa-dce.c (remove_dead_stmt): Ditto.
	* tree-ssa-dom.c (dom_opt_finalize_block): Ditto.
	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p,
	copy_loop_headers): Ditto.
	* tree-ssa-loop-im.c (loop_commit_inserts): Ditto.
	* tree-ssa-loop-ivopts.c (compute_phi_arg_on_exit): Ditto.
	* tree-ssa-loop-manip.c (split_loop_exit_edge, ip_normal_pos,
	lv_adjust_loop_entry_edge, tree_ssa_loop_version): Ditto.
	* tree-ssa-loop-niter.c (simplify_using_initial_conditions): Ditto.
	* tree-ssa-loop-unswitch.c (simplify_using_entry_checks): Ditto.
	* tree-ssa-phiopt.c (tree_ssa_phiopt, value_replacement): Ditto.
	* tree-ssa-pre.c (compute_antic_aux, insert_aux, init_pre): Ditto.
	* tree-ssa-threadupdate.c (redirect_edges): Ditto.
	* tree-tailcall.c (independent_of_stmt_p, find_tail_calls,
	eliminate_tail_call, tree_optimize_tail_calls_1): Ditto.
	* tree-vect-analyze.c (vect_analyze_loop_form): Ditto.
	* tree-vect-transform.c (vect_update_ivs_after_vectorizer): Ditto.
	* tree-vectorizer.c (slpeel_update_phi_nodes_for_guard,
	slpeel_add_loop_guard): Ditto.

From-SVN: r96292
2005-03-11 09:05:12 +00:00
Kazu Hirata 2b41085532 * cfglayout.c (fixup_reorder_chain): Remove old_bb.
From-SVN: r96162
2005-03-09 07:03:24 +00:00
Steven Bosscher 6be85b25c2 cfgcleanup.c (outgoing_edges_match, [...]): Remove CASE_DROPS_THROUGH checks, it is never defined.
* cfgcleanup.c (outgoing_edges_match, try_crossjump_to_edge):
	Remove CASE_DROPS_THROUGH checks, it is never defined.
	* cfglyout.c (fixup_reorder_chain): Likewise.
	* cfgrtl.c (rtl_verify_flow_info): Likewise.
	* stmt.c (expand_case): Likewise.
	* cfgbuild.c (make_edges): Likewise.  Also remove force_fallthru,
	it is now always 0.
	* system.h (CASE_DROPS_THROUGH): Poison.
	* doc/md.texi (casesi): Remove documentation of CASE_DROPS_THROUGH.
	* doc/tm.texi (casesi): Remove documentation of CASE_DROPS_THROUGH.

	* config/v850/v850.h: Remove commented out CASE_DROPS_THROUGH.

From-SVN: r91488
2004-11-29 20:46:14 +00:00
Nathan Sidwell 04389919a6 basic-block.h (OBSTACK_ALLOC_REG_SET): Rename to ...
* basic-block.h (OBSTACK_ALLOC_REG_SET): Rename to ...
	(ALLOC_REG_SET): ... here.
	(FREE_REG_SET): Adjust.
	(XMALLOC_REG_SET, XFREE_REG_SET): Remove.
	* bb-reorder.c (fix_crossing_conditional_branches): Adjust.
	* cfglayout.c (cfg_layout_duplicate_bb): Adjust.
	* cfgrtl.c (rtl_split_block, rtl_split_edge,
	safe_insert_insn_on_edge, cfg_layout_split_edge): Adjust.
	* flow.c (update_life_info, calculate_global_regs_live,
	allocate_bb_life_data, init_propagate_block_info): Adjust.
	* global.c (build_insn_chain): Adjust.
	* ifcvt.c (dead_or_predicable): Adjust.
	* loop-iv.c (simplify_using_initial_values): Adjust.
	* recog.c (peephole2_optimize): Adjust.
	* sched-deps.c (init_deps_global): Adjust.

From-SVN: r91279
2004-11-25 09:30:04 +00:00
Nathan Sidwell 7932a3db21 bitmap.h (struct bitmap_obstack): New obstack type.
* bitmap.h (struct bitmap_obstack): New obstack type.
	(struct bitmap_head_def): Replace using_obstack with obstack
	pointer.
	(bitmap_default_obstack): New.
	(bitmap_initialize): Make inline, does not do allocation.
	(bitmap_release_memory): Remove.
	(bitmap_obstack_initialize, bitmap_obstack_release): Declare.
	(bitmap_obstack_alloc, bitmap_malloc_alloc, bitmap_gc_alloc,
	bitmap_obstack_free, bitmap_malloc_free): Declare.
	(BITMAP_OBSTACK_ALLOC, BITMAP_GGC_ALLOC, BITMAP_XMALLOC): Adjust.
	(BITMAP_FREE): Replace with ...
	(BITMAP_OBSTACK_FREE): ... this.
	(BITMAP_XFREE): Adjust.
	(BITMAP_INIT_ONCE): Remove.
	* bitmap.c (bitmap_obstack, bitmap_obstack_init, bitmap_free: Remove.
	(bitmap_default_obstack): New.
	(bitmap_elem_to_freelist): Adjust.
	(bitmap_element_allocate): Adjust. Break initialization into ...
	(bitmap_obstack_initialize): ... here.
	(bitmap_release_memory): Replace with ...
	(bitmap_obstack_release): ... this.
	(bitmap_obstack_alloc, bitmap_malloc_alloc, bitmap_gc_alloc,
	bitmap_obstack_free, bitmap_malloc_free): New.
	(bitmap_ior_and_compl, bitmap_ior_and_compl_into): Use
	bitmap_initialize.
	(bitmap_initialize): Move to bitmap.h.
	* gengtype.c (open_base_files): Add obstack.h to ifiles.
	* Makefile.in (BASIC_BLOCK_H, REGS_H): Add obstack.h.
	* basic-block.h (INIT_REG_SET): Allocate from reg_obstack.
	(INITIALIZE_REG_SET): Remove.
	(FREE_REG_SET): Use BITMAP_OBSTACK_FREE.
	(INIT_ONCE_REG_SET, MAX_REGNO_REG_SET): Remove.
	(flow_obstack): Do not declare.
	(reg_obstack): Declare.
	* regs.h: Include obstack.h.
	* tree-optimize.c (tree_rest_of_compilation): Initialize and
	release bitmap obstack here.
	* bb-reorder.c: #include regs, not basic-block.
	(fix_crossing_conditional_branches): Allocate regsets from
	reg_obstack.
	* bt-load.c: Do not inlude bitmap.h, sbitmap.h, basic-block.h or
	obstack.h.
	* caller-save.c: Include regs.h earlier.
	* cfg.c: Do not include basic-block.h or obstack.h.
	(reg_obstack): Define.
	* cfganal.c: Include obstack.h
	* cfgcleanyp.c: Do not include basic-block.h. Include regs.h
	earlier.
	* cfglayout.c: Do not include obstack.h.
	(flow_obstack): Remove declaration.
	(cfg_layout_duplicate_bb): Use reg_obstack.
	* cfgloop.c, cfgloopanal.c, cfgloopmanip.c: Include obstack.h.
	* cfgrtl.c (rtl_split_block): Use reg_obstack.
	(force_nonfallthru_and_redirect, rtl_split_edge): Likewise.
	(safe_insert_insn_on_edge): Use OBSTACK_ALLOC_REG_SET, adjust.
	(cfg_layout_split_edge): Use reg_obstack.
	* cse.c: Include regs.h earlier.
	* ddg.c: Do not include basic-block.h.
	* dominance.c: Inlude obstack.h.
	* flow.c (update_life_info): Use OBSTACK_ALLOC_REG_SET, adjust.
	(calculate_global_regs_live): Likewise.
	(allocate_bb_life_data): Use reg_obstack.
	(init_propagate_block_info): Use OBSTACK_ALLOC_REGSET.
	* global.c: Do not include basic-block.h.
	(build_insn_chain): Use OBSTACK_ALLOC_REG_SET, adjust.
	* graph.c: Include obstack.h.
	* haifa-sched.c: Do not include basic-block.h.
	* ifcvt.c: Use OBSTACK_ALLOC_REG_SET, adjust.
	* local-alloc.c: Do not include basic-block.h.
	* loop-init.c, loop-invariant.c: Include obstack.h.
	* loop-iv.c: Likewise.
	(simplify_using_initial_values): Use OBSTACK_ALLOC_REG_SET,
	adjust.
	* loop-unroll.c, loop-unswitch.c: Inlude obstack.h.
	* modulo-sched.c: Do not include basic-block.h.
	* passes.c (rest_of_handle_final): Do not call
	regset_release_memory.
	* ra-debug.c: Include regs.h earlier. Do not include
	basic-block.h.
	* recog.c (peephole2_optimize): Use OBSTACK_ALLOC_REG_SET, adjust.
	* regclass.c (init_reg_sets): Do not call INIT_ONCE_REG_SET.
	(allocate_reg_info): Do not call MAX_REGNO_REG_SET.
	(regset_release_memory): Remove.
	* resource.c: Do not include basic-block.h.
	* rtlanal.c: Do not include basic-block.h.
	* sbitmap.c: Include obstack.h.
	* sched-deps.c: Do not include basic-block.h.
	(reg_pending_sets_head, reg_pending_clobbers_head,
	reg_pending_uses_head): Remove.
	(init_deps_global): Use OBSTACK_ALLOC_REG_SET.
	* sched-ebb.c: Do not include basic-block.h.
	* sched-rgn.c: Likewise.
	* tree-if-conv.c (get_loop_body_in_if_conv_order): Use
	BITMAP_XFREE.
	* tree-outof-ssa.c (perform_edge_inserts): Use BITMAP_XFREE.
	* tree-sra.c (decide_instantiations): Adjust bitmap
	initialization.
	* tree-ssa-dce.c: Include obstack.h.
	* tree-ssa-pre.c (grand_bitmap_obstack): Make a bitmap_obstack.
	(value_insert_into_set_bitmap): Remove useless bitmap_clear.
	(bitmap_set_new): Likewise.
	(init_pre): Initialize bitmap obstack.
	(fini_pre): Release bitmap obstack.
	* tree-ssanames.c (ssa_names_to_rewrite): Make static.
	(marked_for_rewrite_p): ssa_names_to_rewrite is never NULL.
	(mark_for_rewrite, unmark_for_rewrite): Likewise.
	(marked_ssa_names): Likewise.
	(init_ssanames): Use BITMAP_XMALLOC.
	(fini_ssanames): Use BITMAP_XFREE.
	* web.c: Include obstack.h

From-SVN: r91009
2004-11-22 12:23:59 +00:00
Kazu Hirata a5d3e50dcd cfglayout.c (choose_inner_scope): Make it static.
* cfglayout.c (choose_inner_scope): Make it static.
	* rtl.h: Remove the corresponding prototype.

From-SVN: r90502
2004-11-11 23:10:10 +00:00
Ben Elliston 628f6a4e7c backport: basic-block.h: Include vec.h, errors.h.
2004-09-24  Ben Elliston  <bje@au.ibm.com>
	    Steven Bosscher  <stevenb@suse.de>
	    Andrew Pinski  <pinskia@physics.uc.edu>

	Merge from edge-vector-branch:
	* basic-block.h: Include vec.h, errors.h. Instantiate a VEC(edge).
	(struct edge_def): Remove pred_next, succ_next members.
	(struct basic_block_def): Remove pred, succ members.  Add preds
	and succs members of type VEC(edge).
	(FALLTHRU_EDGE): Redefine using EDGE_SUCC.
	(BRANCH_EDGE): Likewise.
	(EDGE_CRITICAL_P): Redefine using EDGE_COUNT.
	(EDGE_COUNT, EDGE_I, EDGE_PRED, EDGE_SUCC): New.
	(edge_iterator): New.
	(ei_start, ei_last, ei_end_p, ei_one_before_end_p): New.
	(ei_next, ei_prev, ei_edge, ei_safe_edge): Likewise.
	(FOR_EACH_EDGE): New.
	* bb-reorder.c (find_traces): Use FOR_EACH_EDGE and EDGE_* macros
	where applicable.
	(rotate_loop): Likewise.
	(find_traces_1_route): Likewise.
	(bb_to_key): Likewise.
	(connect_traces): Likewise.
	(copy_bb_p): Likewise.
	(find_rarely_executed_basic_blocks_and_crossing_edges): Likewise.
	(add_labels_and_missing_jumps): Likewise.
	(fix_up_fall_thru_edges): Likewise.
	(find_jump_block): Likewise.
	(fix_crossing_conditional_branches): Likewise.
	(fix_crossing_unconditional_branches): Likewise.
	(add_reg_crossing_jump_notes): Likewise.
	* bt-load.c (augment_live_range): Likewise.
	* cfg.c (clear_edges): Likewise.
	(unchecked_make_edge): Likewise.
	(cached_make_edge): Likewise.
	(make_single_succ_edge): Likewise.
	(remove_edge): Likewise.
	(redirect_edge_succ_nodup): Likewise.
	(check_bb_profile): Likewise.
	(dump_flow_info): Likewise.
	(alloc_aux_for_edges): Likewise.
	(clear_aux_for_edges): Likewise.
	(dump_cfg_bb_info): Likewise.
	* cfganal.c (forwarder_block_p): Likewise.
	(can_fallthru): Likewise.
	(could_fall_through): Likewise.
	(mark_dfs_back_edges): Likewise.
	(set_edge_can_fallthru_flag): Likewise.
	(find_unreachable_blocks): Likewise.
	(create_edge_list): Likewise.
	(verify_edge_list): Likewise.
	(add_noreturn_fake_exit_edges): Likewise.
	(connect_infinite_loops_to_exit): Likewise.
	(flow_reverse_top_sort_order_compute): Likewise.
	(flow_depth_first_order_compute): Likewise.
	(flow_preorder_transversal_compute): Likewise.
	(flow_dfs_compute_reverse_execute): Likewise.
	(dfs_enumerate_from): Likewise.
	(compute_dominance_frontiers_1): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(compute_outgoing_frequencies): Likewise.
	(find_many_sub_basic_blocks): Likewise.
	(find_sub_basic_blocks): Likewise.
	* cfgcleanup.c (try_simplify_condjump): Likewise.
	(thread_jump): Likewise.
	(try_forward_edges): Likewise.
	(merge_blocks_move): Likewise.
	(outgoing_edges_match): Likewise.
	(try_crossjump_to_edge): Likewise.
	(try_crossjump_bb): Likewise.
	(try_optimize_cfg): Likewise.
	(merge_seq_blocks): Likewise.
	* cfgexpand.c (expand_gimple_tailcall): Likewise.
	(expand_gimple_basic_block): Likewise.
	(construct_init_block): Likewise.
	(construct_exit_block): Likewise.
	* cfghooks.c (verify_flow_info): Likewise.
	(dump_bb): Likewise.
	(delete_basic_block): Likewise.
	(split_edge): Likewise.
	(merge_blocks): Likewise.
	(make_forwarder_block): Likewise.
	(tidy_fallthru_edges): Likewise.
	(can_duplicate_block_p): Likewise.
	(duplicate_block): Likewise.
	* cfglayout.c (fixup_reorder_chain): Likewise.
	(fixup_fallthru_exit_predecessor): Likewise.
	(can_copy_bbs_p): Likewise.
	(copy_bbs): Likewise.
	* cfgloop.c (flow_loops_cfg_dump): Likewise.
	(flow_loop_entry_edges_find): Likewise.
	(flow_loop_exit_edges_find): Likewise.
	(flow_loop_nodes_find): Likewise.
	(mark_single_exit_loops): Likewise.
	(flow_loop_pre_header_scan): Likewise.
	(flow_loop_pre_header_find): Likewise.
	(update_latch_info): Likewise.
	(canonicalize_loop_headers): Likewise.
	(flow_loops_find): Likewise.
	(get_loop_body_in_bfs_order): Likewise.
	(get_loop_exit_edges): Likewise.
	(num_loop_branches): Likewise.
	(verify_loop_structure): Likewise.
	(loop_latch_edge): Likewise.
	(loop_preheader_edge): Likewise.
	* cfgloopanal.c (mark_irreducible_loops): Likewise.
	(expected_loop_iterations): Likewise.
	* cfgloopmanip.c (remove_bbs): Likewise.
	(fix_bb_placement): Likewise.
	(fix_irreducible_loops): Likewise.
	(remove_path): Likewise.
	(scale_bbs_frequencies): Likewise.
	(loopify): Likewise.
	(unloop): Likewise.
	(fix_loop_placement): Likewise.
	(loop_delete_branch_edge): Likewise.
	(duplicate_loop_to_header_edge): Likewise.
	(mfb_keep_just): Likewise.
	(create_preheader): Likewise.
	(force_single_succ_latches): Likewise.
	(loop_split_edge_with): Likewise.
	(create_loop_notes): Likewise.
	* cfgrtl.c (rtl_split_block): Likewise.
	(rtl_merge_blocks): Likewise.
	(rtl_can_merge_blocks): Likewise.
	(try_redirect_by_replacing_jump): Likewise.
	(force_nonfallthru_and_redirect): Likewise.
	(rtl_tidy_fallthru_edge): Likewise.
	(commit_one_edge_insertion): Likewise.
	(commit_edge_insertions): Likewise.
	(commit_edge_insertions_watch_calls): Likewise.
	(rtl_verify_flow_info_1): Likewise.
	(rtl_verify_flow_info): Likewise.
	(purge_dead_edges): Likewise.
	(cfg_layout_redirect_edge_and_branch): Likewise.
	(cfg_layout_can_merge_blocks_p): Likewise.
	(rtl_flow_call_edges_add): Likewise.
	* cse.c (cse_cc_succs): Likewise.
	* df.c (hybrid_search): Likewise.
	* dominance.c (calc_dfs_tree_nonrec): Likewise.
	(calc_dfs_tree): Likewise.
	(calc_idoms): Likewise.
	(recount_dominator): Likewise.
	* domwalk.c (walk_dominator_tree): Likewise.
	* except.c (emit_to_new_bb_before): Likewise.
	(connect_post_landing_pads): Likewise.
	(sjlj_emit_function_enter): Likewise.
	(sjlj_emit_function_exit): Likewise.
	(finish_eh_generation): Likewise.
	* final.c (compute_alignments): Likewise.
	* flow.c (calculate_global_regs_live): Likewise.
	(initialize_uninitialized_subregs): Likewise.
	(init_propagate_block_info): Likewise.
	* function.c (thread_prologue_and_epilogue_insns): Likewise.
	* gcse.c (find_implicit_sets): Likewise.
	(bypass_block): Likewise.
	(bypass_conditional_jumps): Likewise.
	(compute_pre_data): Likewise.
	(insert_insn_end_bb): Likewise.
	(insert_store): Likewise.
	(remove_reachable_equiv_notes): Likewise.
	* global.c (global_conflicts): Likewise.
	(calculate_reg_pav): Likewise.
	* graph.c (print_rtl_graph_with_bb): Likewise.
	* ifcvt.c (mark_loop_exit_edges): Likewise.
	(merge_if_block): Likewise.
	(find_if_header): Likewise.
	(block_jumps_and_fallthru_p): Likewise.
	(find_if_block): Likewise.
	(find_cond_trap): Likewise.
	(block_has_only_trap): Likewise.
	(find_if_case1): Likewise.
	(find_if_case_2): Likewise.
	* lambda-code.c (lambda_loopnest_to_gcc_loopnest): Likewise.
	(perfect_nestify): Likewise.
	* lcm.c (compute_antinout_edge): Likewise.
	(compute_laterin): Likewise.
	(compute_available): Likewise.
	(compute_nearerout): Likewise.
	* loop-doloop.c (doloop_modify): Likewise.
	* loop-init.c (loop_optimizer_init): Likewise.
	* loop-invariant.c (find_exits): Likewise.
	* loop-iv.c (simplify_using_initial_values): Likewise.
	(check_simple_exit): Likewise.
	(find_simple_exit): Likewise.
	* loop-unroll.c (peel_loop_completely): Likewise.
	(unroll_loop_constant_iterations): Likewise.
	(unroll_loop_runtime_iterations): Likewise.
	* loop-unswitch.c (may_unswitch_on): Likewise.
	(unswitch_loop): Likewise.
	* modulo-sched.c (generate_prolog_epilog): Likewise.
	(sms_schedule): Likewise.
	* postreload-gcse.c (eliminate_partially_redundant_load):
	Likewise.
	* predict.c (can_predict_insn_p): Likewise.
	(set_even_probabilities): Likewise.
	(combine_predictions_for_bb): Likewise.
	(predict_loops): Likewise.
	(estimate_probability): Likewise.
	(tree_predict_by_opcode): Likewise.
	(tree_estimate_probability): Likewise.
	(last_basic_block_p): Likewise.
	(propagate_freq): Likewise.
	(estimate_loops_at_level): Likewise.
	(estimate_bb_frequencies): Likewise.
	* profile.c (instrument_edges): Likewise.
	(get_exec_counts): Likewise.
	(compute_branch_probabilities): Likewise.
	(branch_prob): Likewise.
	* ra-build.c (live_in): Likewise.
	* ra-rewrite.c (rewrite_program2): Likewise.
	* ra.c (reg_alloc): Likewise.
	* reg-stack.c (reg_to_stack): Likewise.
	(convert_regs_entry): Likewise.
	(compensate_edge): Likewise.
	(convert_regs_1): Likewise,
	(convert_regs_2): Likewise.
	(convert_regs): Likewise.
	* regrename.c (copyprop_hardreg_forward): Likewise.
	* reload1.c (fixup_abnormal_edges): Likewise.
	* sbitmap.c (sbitmap_intersection_of_succs): Likewise.
	(sbitmap_insersection_of_preds): Likewise.
	(sbitmap_union_of_succs): Likewise.
	(sbitmap_union_of_preds): Likewise.
	* sched-ebb.c (compute_jump_reg_dependencies): Likewise.
	(fix_basic_block_boundaries): Likewise.
	(sched_ebbs): Likewise.
	* sched-rgn.c (build_control_flow): Likewise.
	(find_rgns): Likewise.
	* tracer.c (find_best_successor): Likewise.
	(find_best_predecessor): Likewise.
	(tail_duplicate): Likewise.
	* tree-cfg.c (make_edges): Likewise.
	(make_ctrl_stmt_edges): Likewise.
	(make_goto_expr_edges): Likewise.
	(tree_can_merge_blocks_p): Likewise.
	(tree_merge_blocks): Likewise.
	(cfg_remove_useless_stmts_bb): Likewise.
	(remove_phi_nodes_and_edges_for_unreachable_block): Likewise.
	(tree_block_forwards_to): Likewise.
	(cleanup_control_expr_graph): Likewise.
	(find_taken_edge): Likewise.
	(dump_cfg_stats): Likewise.
	(tree_cfg2vcg): Likewise.
	(disband_implicit_edges): Likewise.
	(tree_find_edge_insert_loc): Likewise.
	(bsi_commit_edge_inserts): Likewise.
	(tree_split_edge): Likewise.
	(tree_verify_flow_info): Likewise.
	(tree_make_forwarder_block): Likewise.
	(tree_forwarder_block_p): Likewise.
	(thread_jumps): Likewise.
	(tree_try_redirect_by_replacing_jump): Likewise.
	(tree_split_block): Likewise.
	(add_phi_args_after_copy_bb): Likewise.
	(rewrite_to_new_ssa_names_bb): Likewise.
	(dump_function_to_file): Likewise.
	(print_pred_bbs): Likewise.
	(print_loop): Likewise.
	(tree_flow_call_edges_add): Likewise.
	(split_critical_edges): Likewise.
	(execute_warn_function_return): Likewise.
	(extract_true_false_edges_from_block): Likewise.
	* tree-if-conv.c (tree_if_conversion): Likewise.
	(if_convertable_bb_p): Likewise.
	(find_phi_replacement_condition): Likewise.
	(combine_blocks): Likewise.
	* tree-into-ssa.c (compute_global_livein): Likewise.
	(ssa_mark_phi_uses): Likewise.
	(ssa_rewrite_initialize_block): Likewise.
	(rewrite_add_phi_arguments): Likewise.
	(ssa_rewrite_phi_arguments): Likewise.
	(insert_phi_nodes_for): Likewise.
	(rewrite_into_ssa): Likewise.
	(rewrite_ssa_into_ssa): Likewise.
	* tree-mudflap.c (mf_build_check_statement_for): Likewise.
	* tree-outof-ssa.c (coalesce_abnormal_edges): Likewise.
	(rewrite_trees): Likewise.
	* tree-pretty-print.c (dump_bb_header): Likewise.
	(dump_implicit_edges): Likewise.
	* tree-sra.c (insert_edge_copies): Likewise.
	(find_obviously_necessary_stmts): Likewise.
	(remove_data_stmt): Likewise.
	* tree-ssa-dom.c (thread_across_edge): Likewise.
	(dom_opt_finalize_block): Likewise.
	(single_incoming_edge_ignoring_loop_edges): Likewise.
	(record_equivalences_from_incoming_edges): Likewise.
	(cprop_into_successor_phis): Likewise.
	* tree-ssa-live.c (live_worklist): Likewise.
	(calculate_live_on_entry): Likewise.
	(calculate_live_on_exit): Likewise.
	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise.
	(copy_loop_headers): Likewise.
	* tree-ssa-loop-im.c (loop_commit_inserts): Likewise.
	(fill_always_executed_in): Likewise.
	* tree-ssa-loop-ivcanon.c (create_canonical_iv): Likewise.
	* tree-ssa-loop-ivopts.c (find_interesting_uses): Likewise.
	(compute_phi_arg_on_exit): Likewise.
	* tree-ssa-loop-manip.c (add_exit_phis_edge): Likewise.
	(get_loops_exit): Likewise.
	(split_loop_exit_edge): Likewise.
	(ip_normal_pos): Likewise.
	* tree-ssa-loop-niter.c (simplify_using_initial_conditions):
	Likewise.
	* tree-ssa-phiopt.c (candidate_bb_for_phi_optimization): Likewise.
	(replace_phi_with_stmt): Likewise.
	(value_replacement): Likewise.
	* tree-ssa-pre.c (compute_antic_aux): Likewise.
	(insert_aux): Likewise.
	(init_pre): Likewise.
	* tree-ssa-propagate.c (simulate_stmt): Likewise.
	(simulate_block): Likewise.
	(ssa_prop_init): Likewise.
	* tree-ssa-threadupdate.c (thread_block): Likewise.
	(create_block_for_threading): Likewise.
	(remove_last_stmt_and_useless_edges): Likewise.
	* tree-ssa.c (verify_phi_args): Likewise.
	(verify_ssa): Likewise.
	* tree_tailcall.c (independent_of_stmt_p): Likewise.
	(find_tail_calls): Likewise.
	(eliminate_tail_call): Likewise.
	(tree_optimize_tail_calls_1): Likewise.
	* tree-vectorizer.c (vect_transform_loop): Likewise.
	* var-tracking.c (prologue_stack_adjust): Likewise.
	(vt_stack_adjustments): Likewise.
	(vt_find_locations): Likewise.
	* config/frv/frv.c (frv_ifcvt_modify_tests): Likewise.
	* config/i386/i386.c (ix86_pad_returns): Likewise.
	* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.

Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>
Co-Authored-By: Steven Bosscher <stevenb@suse.de>

From-SVN: r88222
2004-09-28 17:59:54 +10:00
Nathan Sidwell 341c100fc5 cfganal.c (flow_depth_first_order_compute, [...]): Use gcc_assert or gcc_unreachable.
* cfganal.c (flow_depth_first_order_compute, dfs_enumerate_from,
	cfgbuild.c, inside_basic_block_p, control_flow_insn_p,
	make_label_edge, make_edges, find_basic_blocks_1): Use gcc_assert
	or gcc_unreachable.
	* cfg.c (clear_edges, initialize_bb_rbi, compact_blocks,
	remove_edge, alloc_aux_for_blocks, free_aux_for_blocks,
	alloc_aux_for_edges, free_aux_for_edges): Likewise.
	* cfgcleanup.c (try_forward_edges,
	merge_blocks_move_predecessor_nojumps,
	merge_blocks_move_successor_nojumps): Likewise.
	* cfgexpand.c (expand_gimple_cond_expr,
	expand_gimple_tailcall): Likewise.
	* cfghooks.c (duplicate_block): Likewise.
	* cfglayout.c (record_effective_endpoints,
	insn_locators_initialize, change_scope, fixup_reorder_chain,
	verify_insn_chain, fixup_fallthru_exit_predecessor,
	duplicate_insn_chain, cfg_layout_finalize): Likewise.
	* cfgloopanal.c (check_irred): Likewise.
	* cfgloop.c (superloop_at_depth, flow_loops_free,
	flow_loop_entry_edges_find, flow_loops_find,
	flow_loop_outside_edge_p, get_loop_body,
	get_loop_body_in_dom_order, get_loop_body_in_bfs_order,
	get_loop_exit_edges, num_loop_branches, cancel_loop,
	verify_loop_structure): Likewise.
	cfgloopmanip.c (find_path, remove_path, loop_delete_branch_edge,
	duplicate_loop_to_header_edge, create_preheader,
	create_loop_notes): Likewise.
	* cfgrtl.c (delete_insn, try_redirect_by_replacing_jump,
	edirect_branch_edge, force_nonfallthru_and_redirect,
	rtl_split_edge, insert_insn_on_edge, commit_one_edge_insertion,
	commit_edge_insertions, commit_edge_insertions_watch_calls,
	purge_dead_edges, cfg_layout_redirect_edge_and_branch,
	cfg_layout_redirect_edge_and_branch_force,
	cfg_layout_merge_blocks, rtl_flow_call_edges_add): Likewise.
	* cgraph.c (cgraph_node, cgraph_create_edge, cgraph_remove_edge,
	cgraph_redirect_edge_callee, cgraph_global_info, cgraph_rtl_info,
	cgraph_varpool_node): Likewise.
	* cgraphunit.c (cgraph_finalize_function,
	cgraph_finalize_compilation_unit, cgraph_mark_functions_to_output,
	cgraph_expand_function, cgraph_remove_unreachable_nodes,
	cgraph_clone_inlined_nodes, cgraph_mark_inline_edge,
	cgraph_mark_inline, cgraph_expand_all_functions,
	cgraph_build_static_cdtor): Likewise.
	* combine.c  (do_SUBST, try_combine, subst, combine_simplify_rtx,
	simplify_logical, distribute_notes, insn_cuid): Likewise.
	* conflict.c (conflict_graph_add, print_conflict): Likewise.
	* coverage.c (rtl_coverage_counter_ref, tree_coverage_counter_ref,
	coverage_checksum_string): Likewise.
	* cse.c (make_new_qty, make_regs_eqv, insert, invalidate,
	hash_rtx, exp_equiv_p, cse_basic_block, count_reg_usage,
	cse_cc_succs, cse_condition_code_reg): Likewise.
	* cselib.c (entry_and_rtx_equal_p, remove_useless_values,
	rtx_equal_for_cselib_p, wrap_constant, cselib_hash_rtx,
	new_cselib_val, cselib_subst_to_values, cselib_invalidate_regno,
	cselib_record_set): Likewise.

From-SVN: r87145
2004-09-07 15:46:53 +00:00
Caroline Tice 8e8d51622f Add more details to hot/cold partitioning comments and documentation.
2004-08-25  Caroline Tice  <ctice@apple.com>

        * bb-reorder.c (partition_hot_cold_basic_blocks):  Add more details
        to comments at start of function.
        * cfgbuild.c (make_edges):  Add more details to hot/cold partitioning
        comment.
        * cfgcleanup.c (try_simplify_condjump, try_forward_edges,
        merge_blocks_move_predecessor_nojumps,
        merge_blocks_move_successor_nojumps, merge_blocks_move,
        try_crossjump_to_edge, try_crossjump_bb): Likewise.
        * cfglayout.c (fixup_reorder_chain): Likewise.
        * cfgrtl.c (rtl_can_merge_blocks, try_redirect_by_replacing_jump,
        cfg_layout_can_merge_blocks_p):  Likewise.
        * ifcvt.c (find_if_case_1, find_if_case_2): Likewise.
        * passes.c (rest_of_compilation): Update comments for calling
        optimization that partitions hot/cold basic blocks.
        * doc/invoke.texi:  Update documentation of
        freorder-blocks-and-partition flag.

From-SVN: r86570
2004-08-25 12:52:54 -07:00
Paolo Bonzini 8b63d0e5c8 cfglayout.c (duplicate_insn_chain): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT.
2004-04-25  Paolo Bonzini  <bonzini@gnu.org>

	* cfglayout.c (duplicate_insn_chain): Remove references to
	NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT.
	* cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator.
	* cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT.
	* final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP
	and NOTE_INSN_LOOP_CONT.
	* insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove.
	* jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP
	and NOTE_INSN_LOOP_CONT.
	* loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop,
	check_dbra_loop, loop_dump_aux): Remove references to removed notes
	and fields.
	* reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs.
	* unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove
	references to removed notes and fields.
	(subtract_reg_term, ujump_to_loop_cont): Remove.

From-SVN: r86542
2004-08-25 08:20:11 +00:00
Zack Weinberg 076c7ab896 basic-block.h (struct basic_block_def): Reorder fields to eliminate interior padding.
* basic-block.h (struct basic_block_def): Reorder fields to
	eliminate interior padding.  Remove 'partition' field.
	(BB_DISABLE_SCHEDULE, BB_HOT_PARTITION, BB_COLD_PARTITION)
	(BB_UNPARTITIONED, BB_PARTITION, BB_SET_PARTITION)
	(BB_COPY_PARTITION): New macros.
	* bb-reorder.c, cfgcleanup.c, cfglayout.c, cfgrtl.c, ifcvt.c
	Replace all references to the 'partition' field of a basic
	block with new macros.

	* insn-notes.def: Delete NOTE_INSN_DISABLE_SCHED_OF_BLOCK.
	* final.c (final_scan_insn): Don't handle it.
	* modulo-sched.c: Set BB_DISABLE_SCHEDULE flag on g->bb
	instead of emitting a NOTE_INSN_DISABLE_SCHED_OF_BLOCK note.
	* sched-rgn.c (sched_is_disabled_for_current_region_p):
	Look for a BB_DISABLE_SCHEDULE flag on the block instead of a note.

From-SVN: r86495
2004-08-24 16:46:32 +00:00
Steven Bosscher bd454efdcf basic-block.h (struct edge_def): Remove crossing_edge.
* basic-block.h (struct edge_def): Remove crossing_edge.
	(EDGE_CROSSING): New define.
	(EDGE_ALL_FLAGS): Update.
	* bb-reorder.c (find_traces_1_round, better_edge_p,
	find_rarely_executed_basic_blocks_and_cr, fix_up_fall_thru_edges,
	find_jump_block, fix_crossing_conditional_branches,
	fix_crossing_unconditional_branches, add_reg_crossing_jump_notes):
	Replace all occurences of crossing_edge with an edge flag check
	or set/reset.
	* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
	try_crossjump_bb): Likewise.
	* cfglayout.c (fixup_reorder_chain): Likewise.
	* cfgrtl.c (force_nonfallthru_and_redirect,
	commit_one_edge_insertion): Likewise.

	* Makefile.in (cfganal.o): Depend on TIMEVAR_H.
	* tree-flow.h (compute_dominance_frontiers): Move prototype...
	* basic-block.h:  ...here.
	* tree-cfg.c (compute_dominance_frontiers_1,
	compute_dominance_frontiers): Move from here...
	* cfganal.c: ...to here.  Include timevar.h.

From-SVN: r86228
2004-08-19 00:32:41 +00:00