Commit Graph

23 Commits

Author SHA1 Message Date
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Zdenek Dvorak 14fa2cc057 cfgloopmanip.c (loop_delete_branch_edge): Removed.
* cfgloopmanip.c (loop_delete_branch_edge): Removed.
	(remove_path): Use can_remove_branch_p and remove_branch instead
	of loop_delete_branch_edge.
	* tree-ssa-loop-manip.c (scale_dominated_blocks_in_loop): New function.
	(tree_transform_and_unroll_loop): Remove dead branches immediately.
	Update profile using scale_dominated_blocks_in_loop.
	* cfghooks.c (can_remove_branch_p, remove_branch): New functions.
	* cfghooks.h (struct cfg_hooks): Add can_remove_branch_p.
	(can_remove_branch_p, remove_branch): Declare.
	* tree-cfg.c (tree_can_remove_branch_p): New function.
	(tree_cfg_hooks): Add tree_can_remove_branch_p.
	* cfgrtl.c (rtl_can_remove_branch_p): New function.
	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hook): Add rtl_can_remove_branch_p.

From-SVN: r121583
2007-02-04 23:47:09 +00:00
Zdenek Dvorak ee8c1b05d5 loop-unswitch.c (unswitch_loop): Update arguments of duplicate_loop_to_header_edge call.
* loop-unswitch.c (unswitch_loop): Update arguments of
	duplicate_loop_to_header_edge call.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Ditto.
	* loop-unroll.c (peel_loop_completely, unroll_loop_constant_iterations,
	unroll_loop_runtime_iterations, peel_loop_simple, unroll_loop_stupid):
	Ditto.
	* cfgloopmanip.c (loop_version): Ditto.
	(duplicate_loop_to_header_edge): Change
	type of to_remove to VEC(edge), remove n_to_remove argument.
	* tree-ssa-loop-manip.c (tree_duplicate_loop_to_header_edge):
	Change type of to_remove to VEC(edge), remove n_to_remove argument.
	(tree_unroll_loop): Update arguments of
	tree_duplicate_loop_to_header_edge call.
	* cfghooks.c (cfg_hook_duplicate_loop_to_header_edge):
	Change type of to_remove to VEC(edge), remove n_to_remove argument.
	* cfghooks.h (struct cfg_hooks): Type of
	cfg_hook_duplicate_loop_to_header_edge changed.
	(cfg_hook_duplicate_loop_to_header_edge): Declaration changed.
	* cfgloop.h (duplicate_loop_to_header_edge): Ditto.
	* tree-flow.h (tree_duplicate_loop_to_header_edge): Ditto.

From-SVN: r120074
2006-12-20 14:15:53 +00:00
Zdenek Dvorak d73be2683d tree-vrp.c (execute_vrp): Do not pass loops structure through arguments.
* tree-vrp.c (execute_vrp): Do not pass loops structure through
	arguments.
	* loop-unswitch.c (unswitch_loops, unswitch_single_loop,
	unswitch_loop): Ditto.
	* tree-loop-linear.c (linear_transform_loops): Ditto.
	* tree-ssa-loop-im.c (determine_lsm, tree_ssa_lim_initialize,
	tree_ssa_lim): Ditto.
	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations,
	free_numbers_of_iterations_estimates): Ditto.
	* tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops,
	tree_unswitch_single_loop, tree_unswitch_loop): Ditto.
	* cfgloopmanip.c (fix_bb_placement, fix_bb_placements,
	remove_path, add_loop, loopify, unloop, fix_loop_placements,
	place_new_loop, duplicate_loop, duplicate_subloops,
	update_single_exit_for_duplicated_loops, copy_loops_to,
	duplicate_loop_to_header_edge, create_preheaders,
	force_single_succ_latches, loop_version, fix_loop_structure):
	Ditto.
	* tree-ssa-loop-manip.c (tree_duplicate_loop_to_header_edge,
	tree_unroll_loop): Ditto.
	* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* tree-scalar-evolution.c (select_loops_exit_conditions,
	scev_initialize, scev_analysis): Ditto.
	* tree-scalar-evolution.h (scev_initialize): Ditto.
	* cfghooks.c (cfg_hook_duplicate_loop_to_header_edge): Ditto.
	* cfgloopanal.c (mark_irreducible_loops, mark_loop_exit_edges): Ditto.
	* tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Ditto.
	* modulo-sched.c (sms_schedule): Ditto.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto.
	* loop-init.c (loop_optimizer_init, rtl_move_loop_invariants,
	rtl_unswitch, rtl_unroll_and_peel_loops, rtl_doloop): Ditto.
	* ifcvt.c (if_convert): Ditto.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely,
	canonicalize_loop_induction_variables,
	canonicalize_induction_variables,
	tree_unroll_loops_completely, remove_empty_loops): Ditto.
	* tree-ssa-loop.c (tree_ssa_loop_init, tree_ssa_loop_im,
	tree_ssa_loop_unswitch, tree_vectorize, tree_linear_transform,
	tree_ssa_loop_ivcanon, tree_ssa_empty_loop, tree_ssa_loop_bounds,
	tree_complete_unroll, tree_ssa_loop_prefetch, tree_ssa_loop_ivopts,
	tree_ssa_loop_done): Ditto.
	* predict.c (predict_loops, tree_estimate_probability, estimate_loops,
	estimate_bb_frequencies): Ditto.
	* tree-vectorizer.c (slpeel_tree_duplicate_loop_to_edge_cfg,
	slpeel_tree_peel_loop_to_edge, vectorize_loops): Ditto.
	* loop-unroll.c (unroll_and_peel_loops, peel_loops_completely,
	decide_unrolling_and_peeling, peel_loop_completely,
	unroll_loop_constant_iterations, unroll_loop_runtime_iterations,
	peel_loop_simple, unroll_loop_stupid): Ditto.
	* loop-doloop.c (doloop_optimize_loops): Ditto.
	* tree-cfgcleanup.c (cleanup_tree_cfg_loop): Ditto.
	* loop-invariant.c (move_loop_invariants): Ditto.
	* tree-ssa-dce.c (tree_ssa_dce_loop): Ditto.
	* tree-ssa-loop-prefetch.c (loop_prefetch_arrays,
	tree_ssa_prefetch_arrays): Ditto.
	* lambda-code.c (gcc_loopnest_to_lambda_loopnest, perfect_nestify):
	Ditto.
	* tree-vect-transform.c (vect_do_peeling_for_loop_bound,
	vect_do_peeling_for_alignment, vect_transform_loop): Ditto.
	* cfgloop.c (flow_loops_cfg_dump, flow_loops_dump,
	mark_single_exit_loops, cancel_loop, cancel_loop_tree,
	verify_loop_structure): Ditto.
	* tree-flow.h (vectorize_loops, tree_ssa_lim, tree_ssa_unswitch_loops,
	canonicalize_induction_variables, tree_unroll_loops_completely,
	tree_ssa_prefetch_arrays, remove_empty_loops, tree_ssa_iv_optimize,
	estimate_numbers_of_iterations, free_numbers_of_iterations_estimates,
	tree_duplicate_loop_to_header_edge, tree_ssa_loop_version,
	tree_unroll_loop, linear_transform_loops): Declaration changed.
	* basic-block.h: Remove declaration of struct loops.
	* cfghooks.h (struct cfg_hooks): Change type of
	cfg_hook_duplicate_loop_to_header_edge.
	(cfg_hook_duplicate_loop_to_header_edge): Declaration changed.
	* tree-vectorizer.h (slpeel_tree_peel_loop_to_edge,
	vect_transform_loop): Declaration changed.
	* lambda.h (gcc_loopnest_to_lambda_loopnest): Declaration changed.
	* cfgloop.h (flow_loops_dump, fix_loop_structure,
	mark_irreducible_loops, mark_single_exit_loops, mark_loop_exit_edges,
	cancel_loop_tree, create_preheaders, force_single_succ_latches,
	verify_loop_structure, duplicate_loop, duplicate_loop_to_header_edge,
	loopify, loop_version, remove_path, unswitch_loops,
	unroll_and_peel_loops, doloop_optimize_loops, move_loop_invariants):
	Declaration changed.

From-SVN: r119189
2006-11-25 10:34:13 +00:00
Steven Bosscher 52bca9998a tree-dump.c (dump_enable_all): Rename local variable ir_type to avoid name conflicts.
* tree-dump.c (dump_enable_all): Rename local variable
	ir_type to avoid name conflicts.
	* cfgloopmanip.c (lv_adjust_loop_entry_edge): Check for IR_GIMPLE
	instead of using ir_type().
	* profile.c (tree_register_profile_hooks): Likewise.
	* value-prof.c (tree_register_value_prof_hooks): Likewise.
	* basic-block.h (struct edge_def): Likewise.
	* config/arm/arm.c (legitimize_pic_address): Likewise.
	* coretypes.h (ir_type): New enum of all intermediate languages
	used in GCC.
	* cfghooks.c (ir_type): Rename to...
	(current_ir_type): ...this.  Distinguish between cfgrtl and
	cfglayout mode when the current IR is RTL.  Return enum ir_type.
	* cfghooks.h (ir_type): Replace with current_ir_type prototype.

From-SVN: r118465
2006-11-03 22:12:37 +00:00
Mike Stump c22cacf346 Whitespace fixups
From-SVN: r113893
2006-05-18 22:16:23 +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
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Kazu Hirata 0fa2e4df47 c-common.c, [...]: Fix comment typos.
* c-common.c, c-parser.c, cfgbuild.c, cfghooks.c, cfghooks.h,
	cfgrtl.c, cgraphunit.c, ddg.c, expr.h, gcse.c, ggc-page.c,
	ggc-zone.c, gimplify.c, ipa-inline.c, longlong.h, targhooks.c,
	tree-flow-inline.h, tree-pass.h, tree-ssa-dse.c,
	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c,
	tree-ssa-operands.c, tree-vect-analyze.c,
	tree-vect-transform.c, tree-vectorizer.c, tree.c,
	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
	config/frv/frv.md, config/i386/i386.c, config/i386/sse.md,
	config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
	config/mcore/mcore.c, config/mips/mips.c, config/mips/mips.md,
	config/rs6000/darwin-ldouble.c, config/rs6000/rs6000.c,
	config/rs6000/rs6000.h, config/sh/sh.c, config/sh/sh.md,
	config/sh/ushmedia.h, config/sparc/sparc.c,
	config/sparc/sparc.md, config/stormy16/stormy-abi: Fix comment
	typos.  Follow spelling conventions.
	* doc/invoke.texi, doc/tm.texi, doc/tree-ssa.texi: Fix typos.
	Follow spelling conventions.

From-SVN: r100218
2005-05-26 18:15:27 +00:00
Kazu Hirata fe9565ed02 attribs.c, [...]: Update copyright.
* attribs.c, c-pragma.c, caller-save.c, cfghooks.h,
	coverage.c, cselib.h, domwalk.c, domwalk.h, errors.c,
	errors.h, gcov-dump.c, gcov-io.c, gcov-io.h, gen-protos.c,
	genattrtab.h, genextract.c, gthr-win32.h, insn-notes.def,
	integrate.c, lambda-mat.c, lambda.h, libgcov.c, local-alloc.c,
	machmode.def, mips-tfile.c, params.c, pretty-print.c,
	print-rtl.c, protoize.c, regmove.c, sched-vis.c, tree-chrec.h,
	tree-data-ref.h, vec.h, config/darwin-c.c, config/sol2-c.c,
	config/sol2.c, config/arm/arm-cores.def, config/arm/cirrus.md,
	config/arm/symbian.h, config/c4x/c4x.c, config/c4x/c4x.h,
	config/i386/cygming.h, config/i386/djgpp.h,
	config/i386/lynx.h, config/i386/netware.c,
	config/i386/winnt.c, config/ia64/ia64-c.c,
	config/iq2000/iq2000.c, config/m32r/little.h,
	config/m68k/m68k-protos.h, config/m68k/m68k.h,
	config/m68k/m68k.md, config/mcore/mcore.c,
	config/mcore/mcore.h, config/mmix/mmix.c, config/mmix/mmix.md,
	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
	config/mn10300/mn10300.h, config/ns32k/netbsd.h,
	config/ns32k/ns32k.c, config/ns32k/ns32k.h,
	config/pa/pa-hpux11.h, config/pdp11/pdp11.c,
	config/pdp11/pdp11.h, config/rs6000/darwin.h,
	config/rs6000/default64.h, config/rs6000/rs6000-c.c,
	config/s390/2064.md, config/s390/2084.md,
	config/s390/s390-modes.def, config/s390/s390-protos.h,
	config/s390/tpf.h, config/sh/sh.h, config/sh/symbian.c,
	config/stormy16/stormy16.c, config/vax/vax-protos.h,
	config/vax/vax.c, config/vax/vax.h,
	config/xtensa/lib1funcs.asm, config/xtensa/xtensa.md: Update
	copyright.

From-SVN: r98914
2005-04-28 05:38:50 +00:00
Nathan Sidwell 0e61db61a0 lambda.h (lambda_vector_min_nz): Likewise.
* lambda.h (lambda_vector_min_nz): Likewise.
	* langhooks.h (struct lang_hooks_for_types,
	struct lang_hooks): Likewise.
	* output.h (assemble_integer, this_is_asm_operands): Likewise.
	* tree.h: Likewise.
	* vec.h: Likewise.
	* tree-flow-inline.h (relink_imm_use): Use gcc_assert.

	* optabs.c (prepare_cmp_insn, emit_cmp_and_jump_insns): Reword
	comments to avoid 'abort'.  Use gcc_assert as necessary.
	* opts.c (common_handle_option): Likewise.
	* pretty-print.c (pp_base_format_text): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* read-rtl.c (read_rtx_filename, read_rtx_1): Likewise.
	* regmove.c (try_auto_increment): Likewise.
	* reload.c (find_valid_class, find_reloads_toplev,
	find_equiv_reg): Likewise.
	* reload1.c (reload, forget_old_reloads_1, function_invariant_p,
	merge_assigned_reloads): Likewise.
	* tree-inline.c (inline_forbidden_p_1,
	estimate_num_insns_1): Likewise.
	* tree-optimize.c (execute_todo): Likewise.
	* tree-outof-ssa.c (eliminate_phi): Likewise.
	* tree-ssa-alias.c (add_pointed_to_expr): Likewise.
	* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Likewise.
	* tree-ssa-operands.c (parse_ssa_operands,
	get_indirect_ref_operands, create_ssa_artficial_load_stmt): Likewise.
	* tree-ssa-pre.c (find_or_generate_expression): Likewise.
	* tree-ssanames.c (release_ssa_name): Likewise.
	* tree.c (int_bit_position, int_byte_position, tree_low_cst,
	walk_tree): Likewise.

	* tree-ssa-operands.c (verify_abort): Fold into ..
	(verify_imm_links): ... here.

From-SVN: r98519
2005-04-21 18:05:34 +00:00
Mostafa Hagog 1cb7dfc3b3 cfghooks.c (lv_flush_pending_stmts, [...]): New.
2005-03-30 Mostafa Hagog <mustafa@il.ibm.com>

        * cfghooks.c (lv_flush_pending_stmts,
        cfg_hook_duplicate_loop_to_header_edge, extract_cond_bb_edges,
        lv_adjust_loop_header_phi, lv_add_condition_to_bb): New.
        * cfghooks.h (cfg_hook_duplicate_loop_to_header_edge,
        lv_add_condition_to_bb,
        lv_adjust_loop_header_phi, extract_cond_bb_edges,
        flush_pending_stmts): New in cfg_hooks structure.
        (cfg_hook_duplicate_loop_to_header_edge, lv_flush_pending_stmts,
        extract_cond_bb_edges, lv_adjust_loop_header_phi,
        lv_add_condition_to_bb): New declarations.
        * cfgloop.h (duplicate_loop_to_header_edge): Change return type to
        bool.
        (loop_version): Declare.
        * cfgloopmanip.c (cfghooks.h): Include.
        (duplicate_loop_to_header_edge): Change return type to bool.
        (loop_version, lv_adjust_loop_entry_edge): Move here.
        * cfgrtl.c (cfgloop.h): Include.
        (rtl_verify_flow_info_1): Fix.
        (rtl_lv_add_condition_to_bb, rtl_extract_cond_bb_edges): New.
        (rtl_cfg_hooks, cfg_layout_rtl_cfg_hook): Add hooks to
        initialization.
        * tree-cfg.c (tree_lv_adjust_loop_header_phi,
        tree_lv_add_condition_to_bb): New.
        (tree_cfg_hooks): Add new hooks to initialization.
        * tree-ssa-loop-manip.c (lv_adjust_loop_header_phi,
        lv_adjust_loop_entry_edge, tree_ssa_loop_version): Remove.

From-SVN: r97481
2005-04-03 08:44:33 +00:00
Kazu Hirata d9d4706fa5 cfg.c (unchecked_make_edge): Call execute_on_growing_pred after making an edge.
* cfg.c (unchecked_make_edge): Call execute_on_growing_pred
	after making an edge.
	(remove_edge): Call execute_on_shrinking_pred before removing
	an edge.
	(redirect_edge_succ): Call execute_on_growing_pred and
	execute_on_shrinking_pred.
	* cfghooks.c (execute_on_growing_pred): New.
	(execute_on_shrinking_pred): Likewise.
	* cfghooks.h (cfg_hooks): Add execute_on_growing_pred and
	execute_on_shrinking_pred.
	Add prototypes for execute_on_growing_pred and
	execute_on_shrinking_pred.
	* cfgrtl.c (rtl_cfg_hooks): Add NULL hooks to
	execute_on_growing_pred and execute_on_shrinking_pred.
	(cfg_layout_rtl_cfg_hook): Likewise.
	* tree-cfg.c (tree_cfg_hooks): Likewise.

From-SVN: r91035
2004-11-22 22:04:21 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Kazu Hirata 283334f011 alloc-pool.c, c-lex.c, c-pragma.h, c-semantics.c, cfghooks.c,
cfghooks.h, cfglayout.c, cfgloopmanip.c, debug.c, debug.h,
	flow.c, genextract.c, ggc-common.c, ggc-page.c, ggc.h,
	ifcvt.c, jump.c, loop-unswitch.c, timevar.c, timevar.def,
	tree-optimize.c, vmsdbgout.c, config/fp-bit.c,
	config/alpha/alpha.c, config/alpha/alpha.h,
	config/alpha/alpha.md, config/alpha/unicosmk.h,
	config/alpha/vms.h, config/arm/linux-elf.h, config/avr/avr.c,
	config/c4x/c4x-protos.h, config/c4x/c4x.md,
	config/d30v/d30v.h, config/frv/frv.md, config/frv/frvbegin.c,
	config/frv/frvend.c, config/i386/cygming.h,
	config/i386/djgpp.h, config/i386/emmintrin.h,
	config/i386/gthr-win32.c, config/i386/i386-interix.h,
	config/i386/i386-protos.h, config/i386/openbsd.h,
	config/i386/winnt.c, config/i386/xm-mingw32.h,
	config/i386/xmmintrin.h, config/ia64/ia64.md,
	config/iq2000/iq2000.md, config/m32r/m32r.md,
	config/m68k/m68k.md, config/mcore/mcore-elf.h,
	config/mcore/mcore.md, config/mips/elf.h, config/mips/elf64.h,
	config/mips/iris5gas.h, config/mips/iris6.h,
	config/mips/iris6gas.h, config/mips/linux.h,
	config/mips/mips.md, config/mips/netbsd.h,
	config/mips/openbsd.h, config/mips/windiss.h,
	config/pa/fptr.c, config/rs6000/aix.h,
	config/rs6000/altivec.h, config/rs6000/darwin.h,
	config/rs6000/xcoff.h, config/s390/s390-protos.h,
	config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
	config/sh/netbsd-elf.h, config/sh/sh.h, config/sh/vxworks.h,
	config/sparc/sol2.h: Update copyright.

From-SVN: r77018
2004-01-31 02:07:12 +00:00
Zdenek Dvorak f470c378ac Makefile.in (cfghooks.o): Add TIMEVAR_H and toplev.h dependency.
* Makefile.in (cfghooks.o): Add TIMEVAR_H and toplev.h dependency.
	* basic-block.h (tidy_fallthru_edge, tidy_fallthru_edges, dump_bb,
	verify_flow_info): Declaration removed.
	* cfg.c (verify_flow_info, dump_bb): Moved to cfghooks.c.
	(debug_bb, debug_bb_n): Add argument to dump_bb call.
	* cfgcleanup.c (try_simplify_condjump, try_crossjump_to_edge,
	try_optimize_cfg, delete_unreachable_blocks): Use delete_basic_block
	instead of delete_block.
	* cfghooks.c: Include timevar.h and toplev.h.
	(cfg_hooks): Define here.
	(verify_flow_info, dump_bb): Moved from cfg.c.
	(redirect_edge_and_branch, redirect_edge_and_branch_force,
	split_block, split_block_after_labels, move_block_after,
	delete_basic_block, split_edge, create_basic_block,
	create_empty_bb, can_merge_blocks_p, merge_blocks,
	make_forwarder_block, tidy_fallthru_edge, tidy_fallthru_edges):
	New functions.
	* cfghooks.h (struct cfg_hooks): Added fields name,
	make_forwarder_block, tidy_fallthru_edge and
	move_block_after. Changed type of verify_flow_info, dump_bb,
	split_block fields. Renamed cfgh_split_edge and delete_block
	fields.
	(redirect_edge_and_branch, redirect_edge_and_branch_force,
	split_block, delete_block, split_edge, create_basic_block,
	can_merge_blocks_p, merge_blocks): Macros removed.
	(cfg_hooks): Do not export.
	(verify_flow_info, dump_bb, redirect_edge_and_branch,
	redirect_edge_and_branch_force, split_block, split_block_after_labels,
	move_block_after, delete_basic_block, split_edge, create_basic_block,
	create_empty_bb, can_merge_blocks_p, merge_blocks,
	make_forwarder_block, tidy_fallthru_edge, tidy_fallthru_edges):
	Declare.
	(cfg_layout_rtl_cfg_hooks): Declare.
	* cfgloop.c (update_latch_info, mfb_keep_just, mfb_keep_nonlatch):
	New functions.
	(canonicalize_loop_headers): Use new semantics of make_forwarder_block.
	(redirect_edge_with_latch_update): Removed.
	(make_forwarder_block): Moved to cfghooks.c, semantics changed.
	* cfgloopmanip.c (remove_bbs): Do not update dominators here.
	* cfgrtl.c (cfg_layout_split_block, rtl_split_block, rtl_dump_bb,
	rtl_delete_block, rtl_split_block, rtl_merge_blocks,
	tidy_fallthru_edge, rtl_split_edge, cfg_layout_delete_block,
	cfg_layout_merge_blocks, cfg_layout_split_edge): Partly moved to
	cfghooks.c.
	(rtl_create_basic_block): Coding style fix.
	(rtl_tidy_fallthru_edge, rtl_move_block_after,
	rtl_make_forwarder_block): New functions.
	(update_cfg_after_block_merging): Removed.
	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Fill in new entries.
	* flow.c (verify_wide_reg, verify_local_live_at_start): Add argument
	to dump_bb.
	* ifcvt.c (merge_if_block, find_cond_trap, find_if_case_1,
	find_if_case_2): Don't update dominators.
	* timevar.def (TV_CFG_VERIFY): New.
	* loop-unswitch.c (unswitch_loop): Don't call add_to_dominance_info.
	* cfglayout.c (copy_bbs): Don't call add_to_dominance_info.
	* cfgloopmanip.c (split_loop_bb): Don't update dominators.
	(remove_bbs): Don't call remove_bbs.
	(create_preheader): Use make_forwarder_block.
	(mfb_keep_just, mfb_update_loops): New static functions.

From-SVN: r76851
2004-01-29 07:47:56 +00:00
Kazu Hirata 6614fd40d2 alias.c: Fix comment formatting.
* alias.c: Fix comment formatting.
	* alloc-pool.c: Likewise.
	* bitmap.c: Likewise.
	* bitmap.h: Likewise.
	* bt-load.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-decl.c: Likewise.
	* c-opts.c: Likewise.
	* c-pretty-print.c: Likewise.
	* caller-save.c: Likewise.
	* cfghooks.h: Likewise.
	* cgraph.c: Likewise.
	* collect2.c: Likewise.
	* cppfiles.c: Likewise.
	* cpplib.h: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* final.c: Likewise.
	* function.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genemit.c: Likewise.
	* ggc.h: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* libgcc2.h: Likewise.
	* loop.c: Likewise.
	* predict.h: Likewise.
	* unwind-libunwind.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r74907
2003-12-21 14:08:35 +00:00
Andreas Jaeger f55ade6e34 basic-block.h: Convert prototypes to ISO C90.
* basic-block.h: Convert prototypes to ISO C90.
	* c-parse.in: Likewise.
	* c-pragma.h: Likewise.
	* c-typeck.c: Likewise.
	* cfghooks.h: Likewise.
	* cfgloopanal.c: Likewise.
	* dbxout.h: Likewise.
	* debug.h: Likewise.
	* dwarf2asm.h: Likewise.
	* gcov.c: Likewise.
	* gengtype-lex.l: Likewise.
	* sched-int.h: Likewise.
	* timevar.c: Likewise.

From-SVN: r69010
2003-07-06 20:59:38 +02:00
Jan Hubicka bc35512f09 basic-block.h (create_basic_block, [...]): Kill.
* basic-block.h (create_basic_block, merge_blocks_nomove): Kill.
	* cfgcleanup.c (merge_blocks): Rename to merge_blocks_move.
	(merge_blocks_move_predecessor_nojumps,
	 merge_blocks_move_successor_nojumps): Use merge_blocks.
	(try_optimize_cfg): Use merge_blocks_move.
	* cfgrtl.c (create_basic_block): Rename to rtl_create_basic_block.
	(merge_blocks_nomove): Rename to rtl_merge_blocks.
	(cfg_layout_create_basic_block): New.
	(rtl_can_merge_blocks): New.
	(cfg_layout_split_block): Do not alloc aux by hand.
	* cfghooks.h (cfg_hooks): Add create_basic_block, can_merge_blocks_p,
	merge_blocks.
	(create_basic_block, can_merge_blocks_p, merge_blocks): New macros.
	* cfglayout.c (cfg_layout_duplicate_bb): Do not allocate aux by hand.
	* cfgloopmanip.c (loop_split_edge_with): Likewise.
	* ifcvt.c (merge_if_block): Use merge_blocks_nomove.

	* basic-block.h (basic_block_def): Add field 'rbi'.
	* bb-reorder.c (find_traces, rotate_loop, mark_bb_visited,
	find_traces_1_round, copy_bb, connect_traces): Update use of rbi.
	* cfg.c (entry_exit_blocks): Add new field.
	* cfglayout.c: Include alloc-pool.h;
	(cfg_layout_pool): New.
	(record_effective_endpoints, fixup_reorder_chain,
	fixup_fallthru_exit_predecessor, cfg_layout_duplicate_bb): Update use
	of rbi.
	(cfg_layout_initialize_rbi): New function.
	(cfg_layout_initialize): Use it.
	(cfg_layout_finalize): Clear rbi fields.
	* cfglayout.h (RBI): Kill.
	(cfg_layout_initialize_rbi): Declare.
	* cfgloopmanip.c (copy_bbs): Use rbi.
	(record_exit_edges): Likewise.
	(duplicate_loop_to_header_edge): Likewise.
	* cfgrtl.c (cfg_layout_create_basic_block): Use
	cfg_layout_initialize_rbi.
	(cfg_layout_split_block): Use rbi.
	(cfg_layout_delete_block): Likewise.
	* loop-init.c (loop_optimizer_finalize): Likewise.
	* loop-unswitch.c (unswitch_loop): Likewise.
	* tracer.c (seen, tail_duplicate, layout_superblocks): Likewise.

	* cfgrtl.c: Update comments.
	(try_redirect_by_replacing_jump): New argument.
	(redirect_branch_edge): Break out from ...
	(rtl_redirect_edge_and_branch): ... this one.
	(update_cfg_after_block_merging): Break out from ...
	(rtl_merge_blocks): ... this one.
	(cfg_layout_split_edge): New.
	(cfg_layout_merge_blocks): New.
	(cfg_layout_can_merge_blocks_p): New.
	(cfg_layout_redirect_edge_and_branch): Reorganize.
	(cfg_layout_rtl_cfg_hooks): Fill in.
	(cfg_layout_delete_block): Kill barriers.
	* cfganal.c (can_fallthru): Deal with exit blocks
	* cfglayout.c (cfg_layout_function_header): New function
	(record_effective_endpoints): Record function header.
	(fixup_reorder_chain): Fixup dead jumptables; place header

	* basic-block.h (CLEANUP_CFGLAYOUT): New flag.
	* bb-reorder.c (cfg_layout_initialize): Update call.
	* cfgcleanup.c (try_optimize_cfg): Supress optimizations of fallthru
	edges in cfglayout mode.
	* cfglayout.c (cleanup_unconditional_jumps): Kill.
	(cfg_layout_initialize): Kill agrument loops; use cfgcleanup.
	* cfglayout.h (cfg_layout_initialize): Update prototype.
	* cfgloop.h (CP_INSIDE_CFGLAYOUT): Kill.
	* cfgloopmanip.c (loop_split_edge_with): Use split_edge.
	* flow.c (propagate_block): Do not crash when basic block ends
	by first insn in the chain.
	* loop-init.c (loop_optimizer_init):  First enter cfglayout mode; later
	do loop discovery.
	* tracer.c (tracer): Update call of cfg_layout_initialize.

From-SVN: r68899
2003-07-03 18:40:29 +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
Andreas Jaeger d329e058f2 caller-save.c: Convert to ISO C90.
* caller-save.c: Convert to ISO C90.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfghooks.c: Likewise.
	* cfglayout.c: Likewise.
	* cfglayout.h: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmainip.c: Likewise.
	* cfgrtl.c: Likewise.

From-SVN: r68331
2003-06-22 17:03:27 +02:00
Jan Hubicka 10e9fecc62 i386.md (subsi_3_zext, [...]): Fix predicates.
* i386.md (subsi_3_zext, sse2_nandv2di3): Fix predicates.
	* i386.c (k8_avoid_jump_misspredicts): Fix debug output.

	* cfg.c (verify_flow_info): Move IL independent checks from cfgrtl here.
	(dump_bb): New based on old dump_bb in cfgrtl.c
	(debug_bb, debug_bb_n): Move the functions from cfgrtl.c here.
	* cfghooks.h (cfgh_verify_flow_info): Return status.
	* cfglayout.c (cfg_layout_finalize): Verify CFG correctness.
	* cfgrtl.c (debug_bb, debug_bb_n): Move to cfg.c
	(dump_bb): Remove generic parts.
	(rtl_verify_flow_info_1): Break out from rtl_verify_flow_info.
	(rtl_verify_flow_info): Only check things dependeing on linearized RTL.

	* i386-cmov1.c: Fix regular expression.
	* i386-cvt-1.c: Likewise.
	* i386-local.c: Likewise.
	* i386-local2.c: Likewise.
	* i386-mul.c: Likewise.
	* i386-ssetype-1.c: Likewise.
	* i386-ssetype-3.c: Likewise.
	* i386-ssetype-5.c: Likewise.

From-SVN: r67630
2003-06-08 14:50:18 +00:00
Jan Hubicka 9ee634e345 function.c (FLOOR_ROUND, CEIL_ROUND): Fix.
* function.c (FLOOR_ROUND, CEIL_ROUND): Fix.
	* i386.md (gen_pro_epilogue_adjust_stack): Deal with gigantic stack frames.
	(pro_epilogue_adjust_stack_rex64_2): New pattern

	* cfghooks.h, cfghooks.c: New files.
	* Makefile.in (BASIC_BLOCK_H): Depends on cfghooks.h.
	(OBJS): Add cfghooks.o.
	(cfghooks.o): New rule.
	* basic-block.h (split_edge): Rename to rtl_split_edge.
	(verify_flow_info): Rename to rtl_verify_flow_info.
	(cfghooks.h): Included here.
	* cfgrtl.c (split_edge): Renamed rtl_split_edge.
	(verify_flow_info): Renamed rtl_verify_flow_info.
	* toplev.c (rest_of_compilation): Call rtl_register_cfg_hooks.

	* basic-block.h (split_block, split_edge, flow_delete_block,
	redirect_edge_and_branch, redirect_edge_and_branch_force): Delete.
	(flow_delete_block_noexpunge):  Return void.
	* cfg.c (verify_flow_info): New function.
	* cfgcleanup.c (try_simplify_condjump, outgoing_edges_match,
	try_crossjump_to_edge, try_optimize_cfg, delete_unreachable_blocks):
	Use delete_block.
	* cfglayout.c (function_footer): Rename to...
	(cfg_layout_function_footer): ... this variable
	(unlink_insn_chain): Make global.
	(fixup_reorder_chain, record_effective_endpoints): Update.
	(cleanup_unconditional_jumps): Use delete_block.
	(cfg_layout_redirect_edge, cfg_layout_split_block): Move to cfgrtl.c
	(cfg_layout_duplicate_bb): Use redirect_edge_and_branch_force.
	(cfg_layout_initialize, cfg_layout_finalize): Update hooks.
	* cfglayout.h (cfg_layout_redirect_edge, cfg_layout_split_block):  Delete.
	(cfg_layout_function_footer): Declare.
	* cfgloopmanip (split_loop_bb): Do not update RBI.
	(remove_bbs): Use delete_block.
	(loop_reidrect_edge, loop_delete_branch_edge): Use
	redirect_edge_and_branch.
	(create_preheader): Use split_block and redirect_edge_and_branch_force.
	(split_edge_with): Likewise.
	* cfgrtl.c: Include cfglayout.h
	(split_edge): Rename to ...
	(rtl_split_edge) ... this one; make local.
	(redirect_edge_and_branch): Rename to ...
	(rtl_redirect_edge_and_branch) ... this one; make local.
	(redirect_edge_and_branch_force): Rename to ...
	(rtl_redirect_edge_and_branch_force) ... this one; make local.
	(cfg_layout_delete_block, cfg_layout_delete_edge_and_branch_force): New.
	(cfg_layout_redirect_edge_and_branch, cfg_layout_split_block): Move here from
	cfglayout.c; update to directly call RTL counterparts.
	(rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): New functions.
	* ifcvt.c (find_cond_trap): Use delete_block.
	(find_if_case_1): Use delete_block.
	(find_if_case_2): Use delete_block.
	* rtl.h (unlink_insn_chain): Declare.
	* toplev.c (rtl_reigster_cfg_hooks): New.

From-SVN: r67535
2003-06-06 09:24:26 +00:00