Commit Graph

15 Commits

Author SHA1 Message Date
Richard Henderson c263766cf3 toplev.c (dump_file_tbl): Rename from dump_file.
* toplev.c (dump_file_tbl): Rename from dump_file.
        * bb-reorder.c, bt-load.c, cfgcleanup.c, cfglayout.c, cfgloopanal.c,
        cfgloopmanip.c, cfgrtl.c, config/arm/arm.c, config/frv/frv.c,
        config/i386/i386.c, config/ia64/ia64.c, config/mips/mips.c,
        config/sh/sh.c, cse.c, flow.c, ifcvt.c, loop-iv.c, loop-unroll.c,
        loop-unswitch.c, output.h, predict.c, profile.c, ra-build.c,
        ra-colorize.c, ra-debug.c, ra-rewrite.c, ra.c, regrename.c, reload1.c,
        toplev.c, tracer.c, value-prof.c, var-tracking.c, web.c:
        s/rtl_dump_file/dump_file/g.

From-SVN: r78399
2004-02-24 15:40:03 -08:00
Kazu Hirata aa335b7641 cfgloop.h, [...]: Update copyright.
gcc/
	* cfgloop.h, cfgloopanal.c, cpplex.c, except.h, loop-init.c,
	loop-unroll.c, scan-decls.c, scan.h, stor-layout.c,
	xcoffout.c, xcoffout.h, config/arm/mmintrin.h,
	config/mips/linux64.h, config/pa/pa-64.h,
	config/rs6000/aix51.h, config/rs6000/aix52.h,
	config/rs6000/spe.md, config/sparc/linux.h,
	config/sparc/linux64.h: Update copyright.

gcc/cp/
	* cp-tree.def, cvt.c: Update copyright.

From-SVN: r78032
2004-02-18 15:05:17 +00:00
Zdenek Dvorak 50654f6c03 loop-iv.c: New file.
* loop-iv.c: New file.
	* Makefile.in (loop-iv.o): New.
	* basic_block.h (FOR_BB_INSNS, FOR_BB_INSNS_REVERSE): New macros.
	* cfgloop.c (fill_sons_in_loop, get_loop_body_in_dom_order,
	num_loop_branches): New functions.
	* cfgloop.h (get_loop_body_in_dom_order, num_loop_branches,
	iv_analysis_loop_init, iv_get_reaching_def, iv_analyse, get_iv_value,
	find_simple_exit, iv_number_of_iterations, iv_analysis_done,
	get_simple_loop_desc, free_simple_loop_desc): Declare.
	(simple_loop_desc): New inline function.
	(struct rtx_iv, struct niter_desc): New.
	* cfgloopmanip.c (loopify): Specify semantics more precisely.
	* expr.c (force_operand): Handle subregs of expressions created by
	loop unroller.
	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize): Move
	parts of the initialization to toplev.c
	* loop-unroll.c (loop_exit_at_end_p): New.
	(unroll_and_peel_loops): Call iv_analysis_done.
	(decide_peel_once_rolling, decide_peel_completely,
	decide_unroll_stupid, decide_unroll_constant_iterations,
	decide_unroll_runtime_iterations, decide_peel_simple,
	peel_loop_simple, unroll_loop_stupid, unroll_loop_constant_iterations,
	unroll_loop_runtime_iterations): Use new simple loop analysis.
	* loop-unswitch.c (compare_and_jump_seq): New.
	(may_unswitch_on_p): Renamed to ...
	(may_unswitch_on): Use new iv analysis.
	(reversed_condition): Export.
	(unswitch_single_loop, unswitch_loop): Use new iv analysis.
	* predict.c (estimate_probability): Use new simple loop analysis.
	* rtl.h (get_mode_bounds, reversed_condition,compare_and_jump_seq,
	canon_condition, simplify_using_condition): Declare.
	* stor-layout.c (get_mode_bounds): New.
	* toplev.c (rest_of_handle_loop2): Some parts of
	initialization/finalization moved here from loop-init.c.

From-SVN: r77951
2004-02-17 16:41:44 +00:00
Steven Bosscher d47cc544b6 backport: et-forest.h (et_forest_create, [...]): Declarations removed.
Backport from tree-ssa (relevant changes only):
	2003-12-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>

	* et-forest.h (et_forest_create, et_forest_delete,
	et_forest_add_node, et_forest_add_edge, et_forest_remove_node,
	et_forest_remove_edge, et_forest_parent,
	et_forest_common_ancestor, et_forest_node_value,
	et_forest_enumerate_sons): Declarations removed.
	(struct et_node): New.
	(et_new_tree, et_free_tree, et_set_father, et_split, et_nca,
	et_below): Declare.
	* et-forest.c (struct et_forest_occurrence, struct et_forest,
	struct et_forest_node): Removed.
	(et_forest_create, et_forest_delete,
	et_forest_add_node, et_forest_add_edge, et_forest_remove_node,
	et_forest_remove_edge, et_forest_parent,
	et_forest_common_ancestor, et_forest_node_value,
	et_forest_enumerate_sons, splay, remove_all_occurrences,
	find_leftmost_node, find_rightmost_node, calculate_value): Removed.
	(struct et_occ): New.
	(et_nodes, et_occurences): New.
	(set_depth, set_depth_add, set_prev, set_next, et_recomp_min,
	et_check_occ_sanity, et_check_sanity, et_check_tree_sanity,
	record_path_before_1, record_path_before, check_path_after_1,
	check_path_after, et_splay, et_new_occ, et_new_tree,
	et_free_tree, et_set_father, et_split, et_nca, et_below): New.
	* basic-block.h (struct basic_block_def): New field dom.
	(struct dominance_info): Type removed.
	(calculate_dominance_info, free_dominance_info,
	nearest_common_dominator, set_immediate_dominator,
	get_immediate_dominator, dominated_by_p, get_dominated_by,
	add_to_dominance_info, delete_from_dominance_info,
	recount_dominator, redirect_immediate_dominators,
	iterate_fix_dominators, verify_dominators): Declarations
	changed.
	(enum dom_state): New.
	(dom_computed): New variable.
	(first_dom_son, next_dom_son): Declare.
	* dominance.c (struct dominance_info): Removed.
	(BB_NODE, SET_BB_NODE): Removed.
	(calculate_dominance_info, free_dominance_info,
	nearest_common_dominator, set_immediate_dominator,
	get_immediate_dominator, dominated_by_p, get_dominated_by,
	add_to_dominance_info, delete_from_dominance_info,
	recount_dominator, redirect_immediate_dominators,
	iterate_fix_dominators, verify_dominators,
	debug_dominance_info): Work over new datastructure.  Access
	dominance datastructures through CFG.
	(assign_dfs_numbers, compute_dom_fast_query, first_dom_son,
	next_dom_son): New.
	* bt-load.c (dom): Variable removed.
	(augment_live_range, combine_btr_defs, migrate_btr_def,
	migrate_btr_defs, branch_target_load_optimize): Updated for the
	new interface for dominance information.
	* cfg.c {exit_entry_blocks): Update initializer.
	* cfglayout.c (copy_bbs): Removed loops argument. Updated for
	the new interface for dominance information.
	* cfglayout.h (copy_bbs): Declaration changed.
	* cfgloop.c (flow_loop_pre_header_find, flow_loops_cfg_dump,
	flow_loop_scan, canonicalize_loop_headers, flow_loops_find): Updated
	for the new interface for dominance information.
	(flow_loop_scan): Loops argument removed.
	(flow_loops_free): Don't release dominators.
	* cfgloop.h (struct cfg): Dom field removed.
	(flow_loop_scan, loop_split_edge_with, simple_loop_p,
	just_once_each_iteration_p, split_loop_bb): Declaration changed.
	* cfgloopanal.c (simple_loop_exit_p, simple_increment,
	just_once_each_iteration_p, simple_loop_p): Remove loops argument.
	Updated for the new interface for dominance information.
	* cfgloopmanip.c (remove_bbs, find_path, create_preheader,
	split_loop_bb, loopify, duplicate_loop_to_header_edge,
	force_single_succ_latches, loop_split_edge_with): Ditto.
	* gcse.c (dominators): Variable removed.
	(free_code_hoist_mem, compute_code_hoist_data, hoist_code):
	Updated for the new interface for dominance information.
	* ifcvt.c (post_dominators): Variable removed.
	(mark_loop_exit_edges, merge_if_block, find_if_header,
	find_cond_trap, find_if_case_1, find_if_case_2, if_convert):
	Updated for the new interface for dominance information.
	* loop-init.c (rtl_loop_optimizer_init,
	rtl_loop_optimizer_finalize): Ditto.
	* loop-unroll.c (decide_peel_simple, decide_peel_once_rolling,
	decide_peel_completely, decide_unroll_stupid,
	decide_unroll_constant_iterations,
	decide_unroll_runtime_iterations): Loops argument removed.
	Updated for the new interface for dominance information.
	(unroll_and_peel_loops, peel_loops_completely,
	unroll_loop_runtime_iterations): Updated for the new interface for
	dominance information.
	* loop-unswitch.c (may_unswitch_on_p, unswitch_loops,
	unswitch_single_loop, unswitch_loop): Updated for the new
	interface for dominance information.
	* predict.c (process_note_predictions, process_note_prediction,
	estimate_probability, note_prediction_to_br_prob): Ditto.
	* sched-rgn.c (find_rgns, init_regions): Ditto.
	* toplev.c (rest_of_handle_branch_prob): Free the dominators.

From-SVN: r75226
2003-12-30 10:40:56 +00:00
Andreas Jaeger 0c20a65f04 jump.c: Convert prototypes to ISO C90.
* jump.c: Convert prototypes to ISO C90.
	* langhooks-def.h: Likewise.  Add extern to prototypes.
	* langhooks.c: Likewise.
	* langhooks.h: Likewise.
	* lcm.c: Likewise.
	* local-alloc.c: Likewise.
	* loop-init.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* loop.c: Likewise.
	* loop.h: Likewise. Add extern to prototypes.
	* machmode.h: Likewise.
	* main.c: Likewise.
	* mbchar.c: Likewise.
	* mbchar.h: Likewise.
	* mkdeps.c: Likewise.
	* mkdeps.h: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* output.h: Likewise.
	* gccspec.c: Likwise.
	* postreload.c: Likewise.
	* prefix.c: Likewise.
	* prefix.h: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* read-rtl.c: Likewise.
	* real.c: Likewise.
	* real.h: Likewise.
	* recog.c: Likewise.
	* recog.h: Likewise.
	* reg-stack.c: Likewise.
	* regclass.c: Likewise.
	* regmove.c: Likewise.
	* regrename.c: Likewise.
	* regs.h: Likewise.
	* reload.c: Likewise.
	* reload.h: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* resource.h: Likewise.
	* rtl-error.c: Likewise.
	* rtl.c: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.

From-SVN: r68998
2003-07-06 11:56:09 +02:00
Kazu Hirata 4d6922ee32 bt-load.c: Fix comment typos.
* bt-load.c: Fix comment typos.
	* c-incpath.c: Likewise.
	* cfg.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* diagnostic.h: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* et-forest.h: Likewise.
	* expr.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* jump.c: Likewise.
	* langhooks.h: Likewise.
	* local-alloc.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* ra-build.c: Likewise.
	* regclass.c: Likewise.
	* regmove.c: Likewise.
	* rtl.def: Likewise.
	* rtlanal.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* simplify-rtx.c: Likewise.
	* ssa.c: Likewise.
	* tracer.c: Likewise.
	* tree.c: Likewise.

From-SVN: r68975
2003-07-05 15:17:36 +00:00
Kazu Hirata e0bb17a83f basic-block.h: Fix comment typos.
* basic-block.h: Fix comment typos.
	* bb-reorder.c: Likewise.
	* c-format.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfghooks.h: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphunit.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* dbxout.c: Likewise.
	* df.c: Likewise.
	* df.h: Likewise.
	* diagnostic.c: Likewise.
	* dwarf2out.c: Likewise.
	* et-forest.h: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.h: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genautomata.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* loop.c: Likewise.
	* mips-tfile.c: Likewise.
	* optabs.c: Likewise.
	* ra-build.c: Likewise.
	* ra-colorize.c: Likewise.
	* ra-rewrite.c: Likewise.
	* ra.h: Likewise.
	* regmove.c: Likewise.
	* reload.c: Likewise.
	* rtlanal.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-int.h: Likewise.
	* sched-vis.c: Likewise.
	* sreal.c: Likewise.
	* ssa-ccp.c: Likewise.
	* ssa.c: Likewise.
	* toplev.c: Likewise.
	* tree-inline.c: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.

From-SVN: r68770
2003-07-01 12:18:01 +00:00
Zdenek Dvorak 91f4cfe344 cfgloopanal.c (num_loop_insns, [...]): Count only real insns.
* cfgloopanal.c (num_loop_insns, average_num_loop_insns): Count only
	real insns.
	* loop-unroll.c (unroll_loop_runtime_iterations): Remove superfluous
	condition.

From-SVN: r66700
2003-05-11 22:54:33 +00:00
Zdenek Dvorak df86c7e2a5 loop-unroll.c (decide_peel_completely, [...]): Set loop->has_desc.
* loop-unroll.c (decide_peel_completely,
	decide_unroll_constant_iterations, decide_unroll_stupid,
	decide_unroll_runtime_iterations, decide_peel_simple): Set
	loop->has_desc.

From-SVN: r64500
2003-03-17 20:24:59 +00:00
Roger Sayle 6a87d63407 c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace.
* c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace.
	* c-typeck.c (c_tree_expr_nonnegative_p): Likewise.
	* cfgbuild.c (find_many_sub_basic_blocks): Likewise.
	(find_sub_basic_blocks): Likewise.
	* cgraphunit.c (cgraph_expand_functions): Likewise.
	* dwarf2out.c (prune_unused_types): Likewise.
	* expr.c (store_field): Likewise.
	* genextract.c (print_path): Likewise.
	* haifa-sched.c (schedule_insn): Likewise.
	* lcm.c (compute_antinout_edge): Likewise.
	* loop-unroll.c (decide_peel_once_rolling): Likewise.
	* ra-colorize.c (ra_colorize_free_all): Likewise.
	* ra-debug.c (dump_igraph): Likewise.
	(debug_hard_reg_set): Likewise.
	* reg-stack.c (reg_to_stack): Likewise.
	* rtlanal.c (refers_to_regno_p): Likewise.
	* tracer.c (layout_superblocks): Likewise.

	* cp/tree.c (count_functions): Fix whitespace.

	* f/ste.c (ffeste_R810): Fix whitespace.

From-SVN: r64402
2003-03-15 13:43:33 +00:00
Roger Sayle f937d5e67e builtins.def: Fix typo and improve grammar.
* builtins.def: Fix typo and improve grammar.
	* loop-unroll.c (decide_peel_completely): Tidy log message.

From-SVN: r64030
2003-03-09 15:22:56 +00:00
Zdenek Dvorak 72b8d451f1 gcse.c (bypass_block, [...]): Do not create irreducible loops.
* gcse.c (bypass_block, bypass_conditional_jumps): Do not create
	irreducible loops.

	* loop-unroll.c (unroll_loop_runtime_iterations): Update irreducible
	loops info correctly.

From-SVN: r63980
2003-03-08 09:47:28 +00:00
Kazu Hirata 3dc575ffdb calls.c: Fix comment formatting.
* calls.c: Fix comment formatting.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* combine.c: Likewise.
	* dwarf2out.c: Likewise.
	* ggc-common.c: Likewise.
	* langhooks.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop.c: Likewise.
	* ra-build.c: Likewise.
	* sbitmap.c: Likewise.
	* toplev.c: Likewise.

From-SVN: r63966
2003-03-08 01:38:27 +00:00
Zdenek Dvorak 35b0708052 basic-block.h (EDGE_IRREDUCIBLE_LOOP, [...]): New.
* basic-block.h (EDGE_IRREDUCIBLE_LOOP, EDGE_ALL_FLAGS): New.
	* cfg.c (dump_edge_info): Add EDGE_IRREDUCIBLE_LOOP flag dump.
	* cfgloop.c (flow_loop_free): Made global.
	(establish_preds): New static function.
	(flow_loop_tree_node_add): Handle subloops of added loop correctly.
	(get_loop_exit_edges): New.
	(verify_loop_structure): Verify EDGE_IRREDUCIBLE_LOOP flags.
	* cfgloop.h (flow_loop_free, get_loop_exit_edges, unloop): Declare.
	* cfgloopanal.c (mark_irreducible_loops): Mark edges in irreducible
	loops.
	* cfgloopmanip.c (loop_delete_branch_edge): Allow to test for
	removability of an edge.
	(fix_irreducible_loops): New static function.
	(find_path, remove_path): Add ability to remove enclosing loops.
	(unloop): New.
	(copy_bbs, duplicate_loop_to_header_edge): Use EDGE_IRREDUCIBLE_LOOP
	flags.
	* cfgrtl.c (verify_flow_info): Handle EDGE_IRREDUCIBLE_LOOP flag.
	* loop-unroll.c (peel_loops_completely): Do not duplicate loop if
	not neccessary.
	(decide_peel_completely, peel_loops_completely): Allow complete peeling
	of non-duplicable once rolling loops.
	* loop-unswitch.c (unswitch_loop): Update EDGE_IRREDUCIBLE_LOOP flags.

From-SVN: r63864
2003-03-05 22:05:18 +00:00
Zdenek Dvorak a29c7ea628 * loop-unroll.c: New.
From-SVN: r63470
2003-02-26 14:53:39 +00:00