aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgrtl.c
AgeCommit message (Collapse)AuthorFilesLines
2004-01-29Makefile.in (cfghooks.o): Add TIMEVAR_H and toplev.h dependency.Zdenek Dvorak1-127/+81
* 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-21alias.c, [...]: Update copyright.Kazu Hirata1-1/+1
* alias.c, basic-block.h, c-common.c, c-common.h, c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c, calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c, combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c, cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h, defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c, expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c, genautomata.c, genconditions.c, genemit.c, genflags.c, gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c, ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c, langhooks-def.h, langhooks.c, langhooks.h, line-map.c, line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c, ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c, rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h, target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h, unwind.h, varray.c, varray.h: Update copyright. From-SVN: r76302
2004-01-18basic-block.h (try_redirect_by_replacing_jump): Declare.Jan Hubicka1-13/+11
* basic-block.h (try_redirect_by_replacing_jump): Declare. * cfgcleanup.c (try_optimize_cfg): Use it. * cfgrtl.c (try_redirect_by_replacing_jump): Export. (rtl_redirect_edge_and_branch, cfg_layout_redirect_edge_and_branch): Kill hack. (cfg_layout_merge_blocks): Use try_redirect_by_replacing_jump. Revert: 2004-01-16 Geoffrey Keating <geoffk@apple.com> * cfgrtl.c (try_redirect_by_replacing_jump): Optimize tablejumps even after reload, just don't remove the actual jump tables. From-SVN: r76115
2004-01-17cfgrtl.c (try_redirect_by_replacing_jump): Optimize tablejumps even after ↵Geoffrey Keating1-2/+2
reload, just don't remove the actual jump tables. * cfgrtl.c (try_redirect_by_replacing_jump): Optimize tablejumps even after reload, just don't remove the actual jump tables. From-SVN: r76028
2004-01-16re PR rtl-optimization/11350 (undefined labels with -Os -fPIC)Jan Hubicka1-3/+3
PR opt/11350 * cfgcleanup.c (try_optimize_cfg): Suppress tablejump removal after reload. * cfgrtl.c (rtl_can_merge_blocks, cfglayout_can_merge_blocks, rtl_try_redirect_by_replacing_branch): Likewise. From-SVN: r75968
2004-01-12re PR rtl-optimization/12826 (Optimizer removes reference through volatile ↵Jan Hubicka1-2/+10
pointer) PR opt/12826 * loop.c (insert_loop_mem): Preffer VOLATILE memory references to be stored. PR opt/12863 * cfgcleanup.c (label_is_jump_target_p): Move to... * rtlanal.c (label_is_jump_target_p): ... here. * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Fix redirecting of fallthru edges unified with branch edges. From-SVN: r75733
2003-12-11basic-block.h (BLOCK_HEAD, BLOCK_END): Remove.Steven Bosscher1-138/+140
2003-12-11 Steven Bosscher <steven@gcc.gnu.org> * basic-block.h (BLOCK_HEAD, BLOCK_END): Remove. (BLOCK_HEAD_TREE, BLOCK_END_TREE): Remove. (basic_block_def): Rename `head' to `head_' and `end' to `end_'. (BB_HEAD, BB_END): New accessor macros for the `head_' and `end_' fields of a basic block. * bb-reorder.c, bt-load.c, caller-save.c, cfg.c, cfganal.c, cfgbuild.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgloopanal.c, cfgloopmanip.c, cfgrtl.c, combine.c, conflict.c, df.c, emit-rtl.c, final.c, flow.c, function.c, gcse.c, global.c, graph.c, haifa-sched.c, ifcvt.c, lcm.c, local-alloc.c, loop-unswitch.c, loop.c, postreload.c, predict.c, profile.c, ra-build.c, ra-debug.c, ra-rewrite.c, ra.c, recog.c, reg-stack.c, regclass.c, regmove.c, regrename.c, reload1.c, resource.c, sched-ebb.c, sched-rgn.c, sibcall.c, tracer.c, config/frv/frv.c, config/i386/i386.c, config/ia64/ia64.c: Use the BB_HEAD and BB_END macros instead of accessing the `head' and `end' fields of a basic block directly. * gengtype.c: Add missing piece from earlier patch. Dunno what I was thinking... From-SVN: r74520
2003-10-31cfgrtl.c (delete_insn): Decrease LABEL_NUSES for all REG_LABEL notes.Josef Zlomek1-3/+9
PR/10239 * cfgrtl.c (delete_insn): Decrease LABEL_NUSES for all REG_LABEL notes. From-SVN: r73145
2003-10-31cfgrtl.c (try_redirect_by_replacing_jump): Move jump immediatelly before ↵Josef Zlomek1-0/+24
BARRIER. PR/11640 * cfgrtl.c (try_redirect_by_replacing_jump): Move jump immediatelly before BARRIER. From-SVN: r73142
2003-09-17re PR rtl-optimization/11646 (ICE in commit_one_edge_insertion with ↵Eric Botcazou1-2/+6
-fnon-call-exceptions -fgcse -O) PR optimization/11646 * cfgrtl.c (purge_dead_edges) [JUMP_INSN]: Rematerialize the EDGE_ABNORMAL flag for EH edges. * toplev.c (rest_of_handle_cse): Delete unreachable blocks if dead edges were purged. From-SVN: r71455
2003-08-22c-decl.c: Fix comment formatting.Kazu Hirata1-1/+1
* c-decl.c: Fix comment formatting. * cfgrtl.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * dominance.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * expmed.c: Likewise. * fold-const.c: Likewise. * gcov.c: Likewise. * genattrtab.c: Likewise. * ggc-common.c: Likewise. * mips-tfile.c: Likewise. * regmove.c: Likewise. From-SVN: r70677
2003-07-19alias.c [...]: Remove unnecessary casts.Kaveh R. Ghazi1-7/+4
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. From-SVN: r69587
2003-07-18Makefile.in (ifcvt.o): Add cfgloop.h.Zdenek Dvorak1-1/+4
* Makefile.in (ifcvt.o): Add cfgloop.h. * basic-block.h (EDGE_LOOP_EXIT): New flag. * cfgrtl.c (rtl_verify_flow_info_1): Handle it correctly. * ifcvt.c: Include cfgloop.h. (mark_loop_exit_edges): New static function. (if_convert): Call it. (find_if_header): Ignore branches out of loops. From-SVN: r69572
2003-07-18cfgrtl.c (force_nonfallthru_and_redirect): Use tablejump_p to skip the addr_vec.Richard Henderson1-10/+7
* cfgrtl.c (force_nonfallthru_and_redirect): Use tablejump_p to skip the addr_vec. From-SVN: r69569
2003-07-07genextract.c: Convert remaining prototypes to ISO C90.Andreas Jaeger1-3/+1
2003-07-07 Andreas Jaeger <aj@suse.de> * genextract.c: Convert remaining prototypes to ISO C90. * cpplex.c (_cpp_free_buff): Convert prototype to ISO C90. * fold-const.c (fold_single_bit_test): Likewise. * diagnostic.c (default_diagnostic_finalizer): Likewise. * cfgrtl.c (rtl_redirect_edge_and_branch): Likewise. * gengtype.c (write_array): Generate ISO C90 prototypes. * genflags.c (gen_proto): Generate ISO C90 prototypes. For cp: 2003-07-07 Andreas Jaeger <aj@suse.de> * friend.c: Convert to ISO C90 prototypes. * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output language. * cfns.h: Regenerate. * typeck.c: Convert remaining prototypes to ISO C90. * search.c: Likewise. * decl2.c (build_expr_from_tree): Convert prototype to ISO C90. * semantics.c (expand_or_defer_fn): Likewise * mangle.c (discriminator_for_string_literal): Likewise. * g++spec.c (lang_specific_driver): Likewise. * search.c (lookup_base_r): Remove unused variable. From-SVN: r69050
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-91/+325
* 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-01c-semantics.c (genrtl_case_label): Fix format specifier bug.Kaveh R. Ghazi1-1/+1
* c-semantics.c (genrtl_case_label): Fix format specifier bug. * cfgrtl.c (rtl_verify_flow_info_1): Likewise. From-SVN: r68784
2003-07-01basic-block.h: Fix comment typos.Kazu Hirata1-3/+3
* 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-06-30* cfgrtl.c (mark_killed_regs): Cast HARD_REGNO_NREGS to int.Rainer Orth1-1/+1
From-SVN: r68697
2003-06-30cfgrtl.c (verify_flow_info): Accept degenerated condjumps in cfglayout mode.Jan Hubicka1-3/+3
* cfgrtl.c (verify_flow_info): Accept degenerated condjumps in cfglayout mode. From-SVN: r68694
2003-06-29alloc-pool.c: Fix comment formatting.Kazu Hirata1-1/+1
* alloc-pool.c: Fix comment formatting. * bitmap.c: Likewise. * bitmap.h: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * cfganal.c: Likewise. * cfgrtl.c: Likewise. * collect2.c: Likewise. * cse.c: Likewise. * df.c: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * expmed.c: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * libgcov.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * prefix.c: Likewise. * rtlanal.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * toplev.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r68672
2003-06-28* c-format.c (check_format_string, get_constant)Zack Weinberg1-1/+1
* cfgrtl.c (rtl_split_edge): Mark the definition static, matching the forward declaration. cp: * decl.c (build_typename_type) * mangle.c (write_template_template_arg) * parser.c (cp_parser_scope_through_which_access_occurs) * pt.c (push_access_scope_real, push_access_scope, pop_access_scope) * repo.c (get_base_filename) * semantics.c (maybe_convert_cond): Mark the definition static, matching the forward declaration. java: * class.c (build_method_symbols_entry) * expr.c (get_offset_table_index) * jcf-parse.c (jcf_parse): Mark the definition static, matching the forward declaration. From-SVN: r68622
2003-06-26Makefile.in (cfgrtl.o): Add expr.h dependency.Zdenek Dvorak1-0/+97
* Makefile.in (cfgrtl.o): Add expr.h dependency. * cfgrtl.c: Include expr.h. (mark_killed_regs, safe_insert_insn_on_edge): New functions. * config/i386/i386.h (AVOID_CCMODE_COPIES): Define. * basic-block.h (safe_insert_insn_on_edge): Declare. From-SVN: r68518
2003-06-23ChangeLog.1: Fix a typo.Kazu Hirata1-1/+1
* ChangeLog.1: Fix a typo. * cfgrtl.c: Fix comment typos. * dwarf2out.c: Likewise. * expmed.c: Likewise. * genrecog.c: Likewise. * jump.c: Likewise. * rtlanal.c: Likewise. * ssa-dce.c: Likewise. * toplev.c: Likewise. From-SVN: r68374
2003-06-22caller-save.c: Convert to ISO C90.Andreas Jaeger1-111/+63
* 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-13cfgbuild.c (make_edges): Set ABNORMAL with SIBCALL.Richard Henderson1-1/+1
* cfgbuild.c (make_edges): Set ABNORMAL with SIBCALL. * cfgrtl.c (purge_dead_edges): Expect it too. From-SVN: r67917
2003-06-12basic-block.h (flow_delete_block_noexpunge): Kill.Jan Hubicka1-9/+2
* basic-block.h (flow_delete_block_noexpunge): Kill. * cfgrtl.c (flow_delete_block_noexpunge): Merge to rtl_delete_block. From-SVN: r67846
2003-06-08i386.md (subsi_3_zext, [...]): Fix predicates.Jan Hubicka1-209/+93
* 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-07basic-block.h (EDGE_SIBCALL): New.Richard Henderson1-0/+13
* basic-block.h (EDGE_SIBCALL): New. (EDGE_ALL_FLAGS): Update. * cfg.c (dump_edge_info): Add sibcall name. * cfgbuild.c (make_edges): Use EDGE_SIBCALL. * cfgrtl.c (purge_dead_edges): Handle sibcalls. From-SVN: r67602
2003-06-06function.c (FLOOR_ROUND, CEIL_ROUND): Fix.Jan Hubicka1-19/+194
* 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-04-22re PR middle-end/8866 (Bug in switch statement code generation -- missing label)Richard Henderson1-3/+5
PR 8866 * rtl.h (MEM_NOTRAP_P): New. (MEM_COPY_ATTRIBUTES): Copy it. * rtlanal.c (may_trap_p): Check it. * expr.c (do_tablejump): Set it. * doc/rtl.texi (Flags): Document it. * cfgrtl.c (try_redirect_by_replacing_jump): Revert last three changes. From-SVN: r65967
2003-04-18cfgrtl.c (try_redirect_by_replacing_jump): Create a basic block for orphaned ↵Mark Mitchell1-1/+4
jump tables. * cfgrtl.c (try_redirect_by_replacing_jump): Create a basic block for orphaned jump tables. From-SVN: r65792
2003-04-16re PR middle-end/8866 (Bug in switch statement code generation -- missing label)Mark Mitchell1-8/+3
PR middle-end/8866 * cfgtrl.c (try_redirect_by_replacing_jump): Do not delete jumptables. PR middle-end/8866 * libjava.lang/PR8866.java: New test. From-SVN: r65698
2003-04-14re PR rtl-optimization/10024 ([HP-PA] inline optimization ICE)Jan Hubicka1-1/+1
PR opt/10024 * cfgrtl.c (force_nonfallthru_and_redirect): Use unchecked_make_edge. From-SVN: r65571
2003-04-07re PR rtl-optimization/10024 ([HP-PA] inline optimization ICE)Jan Hubicka1-0/+3
PR opt/10024 * cfglayout.c (cfg_layout_redirect_edge): Redirect any branch edges unified with the fallthru one. * cfgrtl.c (force_nonfallthru_and_redirect): Do not special case fallthru edges when called via cfglayout.c From-SVN: r65330
2003-04-03* cfgrtl.c (update_bb_for_insn): Do not set block for barriers.Jan Hubicka1-1/+2
From-SVN: r65214
2003-03-30cfgbuild.c (make_edges): Use tablejump_p.Richard Henderson1-26/+7
* cfgbuild.c (make_edges): Use tablejump_p. * cfgcleanup.c (label_is_jump_target_p): Likewise. * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise. * cfgrtl.c (flow_delete_block_noexpunge): Likewise. (try_redirect_by_replacing_jump): Likewise. (redirect_edge_and_branch): Likewise. * cse.c (fold_rtx): Likewise. * jump.c (delete_related_insns): Likewise. * rtlanal.c (get_jump_table_offset): Likewise. * ssa-ccp.c (ssa_ccp_df_delete_unreachable_insns): Likewise. From-SVN: r65054
2003-03-25re PR rtl-optimization/10056 ([HP-PA] ICE at -O2 when building c++ code from ↵Jan Hubicka1-2/+30
doxygen) PR opt/10056 * cfglayout.c (fixup_reorder_chain): Fix dealing with the conditional jump jumping to the next instruction. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. From-SVN: r64854
2003-03-23cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps before flow2.Richard Henderson1-1/+1
* cfgcleanup.c (try_optimize_cfg): Allow merging of tablejumps before flow2. * cfgrtl.c (try_redirect_by_replacing_jump): Similarly. From-SVN: r64754
2003-03-05basic-block.h (EDGE_IRREDUCIBLE_LOOP, [...]): New.Zdenek Dvorak1-3/+5
* 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-21cfgrtl.c (commit_edge_insertions): Call find_many_sub_basic_block only when ↵Jan Hubicka1-2/+32
some code has been emitted. * cfgrtl.c (commit_edge_insertions): Call find_many_sub_basic_block only when some code has been emitted. (commit_edge_insertions_watch_calls): Bring into sync with commit_edge_insertions From-SVN: r63248
2003-02-21cfgrtl.c (commit_one_edge_insertion): Only mark BB for splitting.Jan Hubicka1-1/+18
* cfgrtl.c (commit_one_edge_insertion): Only mark BB for splitting. (commit_edge_insertions): Call find_many_sub_basic_blocks * reg-stack.c (convert_regs): Cleax aux for blocks. From-SVN: r63216
2003-02-09cfgrtl.c (verify_flow_info): Use control_flow_insn_p.Jan Hubicka1-3/+1
* cfgrtl.c (verify_flow_info): Use control_flow_insn_p. * reload1.c (fixup_abnormal_edges): Split basic blocks when EH edges possibly got duplicated. From-SVN: r62599
2003-01-18alias.c: Fix comment typos.Kazu Hirata1-1/+1
* alias.c: Fix comment typos. * basic-block.h: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.h: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfglayout.c: Likewise. * cfgrtl.c: Likewise. * convert.c: Likewise. * cpphash.h: Likewise. * cpplex.c: Likewise. * cpplib.h: Likewise. * df.h: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dwarf2.h: Likewise. From-SVN: r61462
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-3/+4
From-SVN: r60174
2002-12-13c-decl.c: Fix a comment typo.Kazu Hirata1-1/+1
* c-decl.c: Fix a comment typo. * cfg.c: Likewise. * cfgcleanup.c: Likewise. * cfglayout.c: Likewise. * cfgrtl.c: Likewise. * c-typeck.c: Likewise. * dominance.c: Likewise. * dwarf2asm.c: Likewise. * dwarfout.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * flow.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * genautomata.c: Likewise. * integrate.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. * output.h: Likewise. * profile.c: Likewise. * ra.h: Likewise. * reload1.c: Likewise. * reload.c: Likewise. * sched-rgn.c: Likewise. * stmt.c: Likewise. * tree.h: Likewise. * vmsdbgout.c: Likewise. From-SVN: r60085
2002-12-04cfgrtl.c (force_nonfallthru_and_redirect): Allow abnormal edge to be forced ↵Jan Hubicka1-3/+17
into nonfallthru. * cfgrtl.c (force_nonfallthru_and_redirect): Allow abnormal edge to be forced into nonfallthru. From-SVN: r59816
2002-09-17cfgrtl.c (flow_delete_block_noexpunge): Delete orphaned NOTE_INSN_LOOP_CONT ↵Roger Sayle1-2/+4
notes when deleting basic blocks. * cfgrtl.c (flow_delete_block_noexpunge): Delete orphaned NOTE_INSN_LOOP_CONT notes when deleting basic blocks. From-SVN: r57243
2002-06-21bb-reorder.c (make_reorder_chain_1): Search harder for the vax casesi ↵Richard Henderson1-2/+14
fallthru edge. 2002-06-21 Richard Henderson <rth@redhat.com> * bb-reorder.c (make_reorder_chain_1): Search harder for the vax casesi fallthru edge. * cfglayout.c (cleanup_unconditional_jumps): Use redirect_edge_succ_nodup. Do not delete ADDR_VEC insns as dead. * cfgrtl.c (force_nonfallthru_and_redirect): Place redirection block after ADDR_VEC. From-SVN: r54885