aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloop.h
AgeCommit message (Collapse)AuthorFilesLines
2003-07-05bt-load.c: Fix comment typos.Kazu Hirata1-1/+1
* 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-03basic-block.h (create_basic_block, [...]): Kill.Jan Hubicka1-2/+1
* 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-06-22caller-save.c: Convert to ISO C90.Andreas Jaeger1-57/+48
* 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-12ChangeLog: Follow spelling conventions.Kazu Hirata1-3/+3
* ChangeLog: Follow spelling conventions. * ChangeLog.2: Likewise. * c-decl.c: Likewise. * cfgloop.h: Likewise. * cgraph.c: Likewise. * coverage.c: Likewise. * cppcharset.c: Likewise. * cpphash.h: Likewise. * cpplex.c: Likewise. * cpplib.c: Likewise. * dbxout.c: Likewise. * df.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gengtype.c: Likewise. * ggc.h: Likewise. * opts.c: Likewise. * real.c: Likewise. * reload.c: Likewise. * stmt.c: Likewise. From-SVN: r67849
2003-03-05basic-block.h (EDGE_IRREDUCIBLE_LOOP, [...]): New.Zdenek Dvorak1-0/+3
* 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-02-26cse.c (count_reg_usage): Fix handling of REG_EQUAL notes.Zdenek Dvorak1-0/+8
* cse.c (count_reg_usage): Fix handling of REG_EQUAL notes. * Makefile.in (loop-unroll.o): New. * cfgloop.h (UAP_PEEL, UAP_UNROLL, UAP_UNROLL_ALL): New. (unroll_and_peel_loops): Declare. * alias.c (init_alias_analysis): Flag_unroll_loops renamed to flag_old_unroll_loops. * loop.c (loop_invariant_p): Ditto. * unroll.c (unroll_loop): Flag_unroll_all_loops renamed to flag_old_unroll_all_loops. * flags.h (flag_unroll_loops): Renamed to flag_old_unroll_loops. (flag_unroll_all_loops): Renamed to flag_old_unroll_all_loops. * params.def (PARAM_MAX_UNROLLED_INSNS): Default value changed. (PARAM_MAX_AVERAGE_UNROLLED_INSNS, PARAM_MAX_UNROLL_TIMES, PARAM_MAX_PEELED_INSNS, PARAM_MAX_PEEL_TIMES, PARAM_MAX_COMPLETELY_PEELED_INSNS, PARAM_MAX_COMPLETELY_PEEL_TIMES, PARAM_MAX_ONCE_PEELED_INSNS): New. * toplev.h (flag_old_unroll_loops, flag_old_unroll_all_loops): New. (flag_unroll_loops, flag_unroll_all_loops): Used for new unroller instead of old one. (flag_peel_loops): New. (lang_independent_options): The new flags added. (rest_of_compilation): Call new unroller. (process_options): Setup flags for coexistence of old and new unroller. * doc/invoke.texi: Document new options. * doc/passes.texi: Document new unroller pass. From-SVN: r63462
2003-02-08cfgloop.h (fix_loop_placement, [...]): Declare.Zdenek Dvorak1-0/+25
* cfgloop.h (fix_loop_placement, can_duplicate_loop_p, duplicate_loop_to_header_edge, loopify, remove_path, split_loop_bb): Declare. (DLTHE_FLAG_UPDATE_FREQ): New. * cfgloopmanip.c (duplicate_loop, duplicate_subloops, copy_loops_to, loop_redirect_edge, loop_delete_branch_edge, copy_bbs, remove_bbs, rpe_enum_p, find_branch, alp_enum_p, add_loop, fix_loop_placements, fix_bb_placement, fix_bb_placements, place_new_loop, scale_loop_frequencies, scale_bbs_frequencies, record_exit_edges): New static functions. (fix_loop_placement, can_duplicate_loop_p, duplicate_loop_to_header_edge, loopify, remove_path, split_loop_bb): New functions. * cfgloop.h (loop_optimizer_init, loop_optimizer_finalize, unswitch_loops): Declare. * loop-init.c: New file. * loop-unswitch.c: New file. * Makefile.in (loop-init.o, loop-unswitch.o): New. * params.def (PARAM_MAX_UNSWITCH_INSNS, PARAM_MAX_UNSWITCH_LEVEL): New. * toplev.c (DFI_loop2): New dump. (flag_unswitch_loops): New. (lang_independent_options): Add it. (rest_of_compilation): Call new loop optimizer. (parse_options_and_default_flags): Turn flag_unswitch_loops on with -O3. From-SVN: r62578
2003-02-05* cfgloop.h (flow_bb_inside_loop_p): Correct prototype again.Roger Sayle1-2/+2
From-SVN: r62447
2003-01-24cfgloopanal.c: New file.Zdenek Dvorak1-0/+314
* cfgloopanal.c: New file. * cfgloopmanip.c: New file. * Makefile.in (cfgloopanal.o, cfgloopmanip.o): New. (toplev.o, loop.o, doloop.o, unroll.o, cfgloop.o, predict.o, cfglayout.o): Add dependency on cfgloop.h. (cfgloop.o): Add flags.h dependency. * basic-block.h (BB_IRREDUCIBLE_LOOP, BB_SUPERBLOCK): New flags. (VLS_EXPECT_PREHEADERS, VLS_EXPECT_SIMPLE_LATCHES): Removed. (struct loop, struct loops, flow_loops_find, flow_loops_update, flow_loops_free, flow_loops_dump, flow_loop_dump, flow_loop_scan, flow_loop_tree_node_add, flow_loop_tree_node_remove, LOOP_TREE,,LOOP_PRE_HEADER, LOOP_ENTRY_EDGES, LOOP_EXIT_EDGES, LOOP_ALL, flow_loop_outside_edge_p, flow_loop_nested_p, flow_bb_inside_loop_p, get_loop_body, loop_preheader_edge, loop_latch_edge, add_bb_to_loop, remove_bb_from_loops, find_common_loop, verify_loop_structure): Declarations moved to ... * cfgloop.h: New file. * bb-reorder.c (reorder_basic_blocks): Modified. * cfglayout.c: Include cfgloop.h. (cleanup_unconditional_jumps, cfg_layout_redirect_edge, cfg_layout_duplicate_bb, cfg_layout_initialize): Update loop structure. (break_superblocks): New static function. (cfg_layout_finalize): Use it. (cfg_layout_split_block): New function. * cfglayout.h (struct reorder_block_def): Add copy and duplicated fields. (cfg_layout_initialize, cfg_layout_redirect_edge): Declaration changed. (cfg_layout_split_block): Declare. * cfgloop.c: Include cfgloop.h and flags.h. (flow_loop_dump, flow_loops_free, flow_loop_exit_edges_find, get_loop_body): Avoid signed versus unsigned comparison warnings. (make_forwarder_block, flow_loops_find, loop_preheader_edge, loop_latch_edge): Modified. (verify_loop_structure): Modified to use flags stored in loop structure; check irreducible loops. (cancel_loop, cancel_loop_tree): New functions. (estimate_probability): Use loop analysis code for predictions. (estimate_loops_at_level): Avoid signed versus unsigned comparison warnings. * doloop.c: Include cfgloop.h. * loop.c: Include cfgloop.h. * predict.c: Include cfgloop.h. * toplev.c: Include cfgloop.h. * unroll.c: Include cfgloop.h. * tracer.c (tracer): Modified. From-SVN: r61730