summaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
Commit message (Collapse)AuthorAgeFilesLines
* * basic-block.h: Remove duplicate prototype ofaj2003-06-161-1/+0
| | | | | | | note_prediction_to_br_prob. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68019 138bc75d-0d04-0410-961f-82ee72b054a4
* * alloc-pool.c: Convert to ISO C90 prototypes.aj2003-06-151-1/+3
| | | | | | | | | | | | | | | | | | * alloc-pool.h: Likewise. * alias.c: Likewise. * attribs.c: Likewise. * bb-reorder.c: Likewise. * bitmap.h: Likewise. * bitmap.c: Likewise. * builtins.c: Likewise. * tree.h: Convert prototypes of attribs.c to ISO C90. * basic-block.h: Convert prototypes of bb-reorder.c to ISO C90. * rtl.h: Convert prototypes of alias.c and builtins.c to ISO C90. * expr.h: Convert prototypes of builtins.c to ISO C90. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67975 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (flow_delete_block_noexpunge): Kill.hubicka2003-06-121-1/+0
| | | | | | | | * cfgrtl.c (flow_delete_block_noexpunge): Merge to rtl_delete_block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67846 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (EDGE_SIBCALL): New.rth2003-06-071-1/+2
| | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67602 138bc75d-0d04-0410-961f-82ee72b054a4
* * function.c (FLOOR_ROUND, CEIL_ROUND): Fix.hubicka2003-06-061-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67535 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (LIBGCC_DEPS): Add gcov headers.nathan2003-04-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (libgcov.a): Depends on LIBGCC_DEPS. * basic-block.h (profile_info): Moved here from coverage.h. Made a pointer. * coverage.c (struct function_list): Fixed array of counter types. (struct counts_entry): Keyed by counter type, contains summary. (profile_info): Moved to profile.c. (prg_ctr_mask, prg_n_ctrs, fn_ctr_mask, fn_n_ctrs): New global vars. (profiler_label): Remove. (ctr_labels): New. (set_purpose, label_for_tag, build_counter_section_fields, build_counter_section_value, build_counter_section_data_fields, build_counter_section_data_values, build_function_info_fields, build_function_info_value, gcov_info_fields, gcov_info_value): Remove. (build_fn_info_type, build_fn_info_value, build_ctr_info_type, build_ctr_info_value, build_gcov_info): New. (htab_counts_entry_hash, htab_counts_entry_eq): Adjust. (reads_counts_file): Adjust. (get_coverage_counts): Takes counter number. Add summary parameter. Adjust. (coverage_counter_ref): Tkaes counter number. Adjust. Lazily create counter array labels. (coverage_end_function): Adjust. (create_coverage): Adjust. (find_counters_section): Remove. * coverage.h (MAX_COUNTER_SECTIONS): Remove. (struct section_info, struct profile_info): Remove. (profile_info): Moved to basic-block.h. (coverage_counter_ref): Takes a counter number. (get_coverage_counts): Takes a counter number. Added summary parameter. (find_counters_section): Remove. * gcov-dump.c (tag_arc_counts): Rename to ... (tag_counters): ... here. Adjust. (tag_table): Move tag_counters to 3rd entry. Remove PROGRAM_PLACEHOLDER and PROGRAM_INCORRECT entries. (dump_file): Check for counter tag values here. (tag_summary): Adjust. * gcov-io.c (gcov_write_summary, gcov_read_summary): Adjust. * gcov-io.h (GCOV_LOCKED): New. (GCOV_TAG_ARC_COUNTS): Rename to ... (GCOV_TAG_COUNTS_BASE): ... here. (GCOV_TAG_PLACEHOLDER_SUMMARY, GCOV_TAG_INCORRECT_SUMMARY): Remove. (GCOV_COUNTER_ARCS, GCOV_COUNTERS, GCOV_NAMES): New. (GCOV_TAG_FOR_COUNTER, GCOV_COUNTER_FOR_TAG, GCOV_TAG_IS_COUNTER): New. (struct gcov_ctr_summary): New. (struct gcov_summary): Adjust. (struct gcov_counter_section): Remove. struct gcov_counter_section_data): Remove. (struct gcov_function_info): Rename to ... (struct gcov_fn_info): ... here. Adjust. (struct gcov_ctr_info): New. (struct gcov_info): Adjust. * gcov.c (read_count_file): Adjust. (output_lines): Adjust. * libgcov.c (gcov_exit): Adjust. (__gcov_flush): Adjust. * mklibgcc.in (libgcc2_c_dep): Add gcov headers. * predict.c (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, compute_frequency_function): Adjust profile_info use. * profile.c (struct counts_entry): Remove. (profile_info): Define here. (get_exec_counts): Adjust get_coverage_counts call. (compute_branch_probablilities): Remove find_counters_section call. (gen_edge_profiler): Adjust coverage_counter_ref call. * tracer.c (tail_duplicate): Adjust profile_info use. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65990 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfg.c (unchecked_make_edge): New.matz2003-03-101-0/+2
| | | | | | | | | (cached_make_edge): Use it. * basic-block.h (unchecked_make_edge): Declare. * cfglayout.c (cfg_layout_duplicate_bb): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64077 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (EDGE_IRREDUCIBLE_LOOP, EDGE_ALL_FLAGS): New.rakdver2003-03-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63864 138bc75d-0d04-0410-961f-82ee72b054a4
* * i386.c (x86_inter_unit_moves): New variable.hubicka2003-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | (ix86_secondary_memory_needed): Fix 64bit case, honor TARGET_INTER_UNIT_MOVES * i386.h (x86_inter_unit_moves): Declare. (TARGET_INTER_UNIT_MOVES): New macro. * i386.md (movsi_1): Cleanup constraints; disable when not doing inter-unit moves. (movsi_1_nointernunit): New. (movdi_1_rex64): Fix constraints; deal with SSE->GPR moves. (movdi_1_rex64_nointerunit): New. (mivsf_1): disable when not doing inter-unit moves. (movsf_1_nointerunit): New. * basic-block.h (inside_basic_block_p): Declare. * cfgbuild.c (inside_basic_block_p): Make global. * haifa-sched.c (unlink_other_notes0: Deal with NOT_INSN_BASIC_BLOCK. * scheudle-ebb.c (schedule_ebb): Return last basic block of trace; update CFG. (fix_basic_block_boundaries, add_missing_bbs): New. (rank): Use profile. (scheudle_ebbs): Rely on CFG; update coments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62477 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfgloopanal.c: New file.rakdver2003-01-241-201/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61730 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Fix comment formatting.kazu2003-01-181-1/+1
| | | | | | | | | | | | | | | * calls.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * gcov.c: Likewise. * haifa-sched.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * profile.c: Likewise. * system.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61478 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Fix comment typos.kazu2003-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61462 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (optabs.o): Add dependency on basic-block.h.zlomek2003-01-091-1/+2
| | | | | | | | | | * basic-block.h (control_flow_insn_p): Fuction was exported. * cfgbuild.c (control_flow_insn_p): Fuction was made non-static. * optabs.c (emit_libcall_block): Emit REG_LIBCALL and REG_RETVAL notes only when the region is contained in a single basic block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61101 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (PARTITION_H): New.zlomek2003-01-081-0/+1
| | | | | | | | (BASIC_BLOCK_H): Added hard-reg-set.h and $(PARTITION_H). * basic-block.h: Include hard-reg-set.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61041 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (flow_bb_inside_loop_p): Correct prototype.sayle2002-12-191-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60279 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Follow spelling conventions.kazu2002-09-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.0: Likewise. * ChangeLog.1: Likewise. * ChangeLog.2: Likewise. * ChangeLog.3: Likewise. * ChangeLog.4: Likewise. * ChangeLog.5: Likewise. * ChangeLog.6: Likewise. * FSFChangeLog.10: Likewise. * FSFChangeLog.11: Likewise. * alias.c: Likewise. * basic-block.h: Likewise. * c-aux-info.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-semantics.c: Likewise. * c-typeck.c: Likewise. * calls.c: Likewise. * cfganal.c: Likewise. * cfgloop.c: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * conflict.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.h: Likewise. * cppinit.c: Likewise. * cpplex.c: Likewise. * cpplib.c: Likewise. * cpplib.h: Likewise. * cppmacro.c: Likewise. * cse.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57398 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Fix comment formatting.kazu2002-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-common.c: Likewise. * c-common.h: Likewise. * c-lex.c: Likewise. * c-pretty-print.c: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * defaults.h: Likewise. * et-forest.c: Likewise. * explow.c: Likewise. * function.h: Likewise. * gcov.c: Likewise. * genattrtab.c: Likewise. * gengtype.c: Likewise. * ifcvt.c: Likewise. * libgcc2.c: Likewise. * loop.c: Likewise. * profile.c: Likewise. * ra-build.c: Likewise. * real.c: Likewise. * rtl.h: Likewise. * tracer.c: Likewise. * tree-inline.c: Likewise. * varasm.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56952 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (struct loop): Remove unused cont_dominator field.sayle2002-09-081-3/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56935 138bc75d-0d04-0410-961f-82ee72b054a4
* * profile.c: Add file comment describing the overall algorithm andnathan2002-07-291-7/+10
| | | | | | | | | | | structures. (struct edge_info): Add comments. (struct bb_info): Add comments. * basic-block.h (EDGE_*): Add comments. * doc/gcov.texi (Gcov Data Files): Document bit flags. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55842 138bc75d-0d04-0410-961f-82ee72b054a4
* Enhancements for the if-conversion passbernds2002-07-211-0/+27
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55624 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-07-15 Michael Matz <matz@suse.de>,matz2002-07-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Daniel Berlin <dberlin@dberlin.org>, Denis Chertykov <denisc@overta.ru> Add a new register allocator. * ra.c: New file. * ra.h: New file. * ra-build.c: New file. * ra-colorize.c: New file. * ra-debug.c: New file. * ra-rewrite.c: New file. * Makefile.in (ra.o, ra-build.o, ra-colorize.o, ra-debug.o, (ra-rewrite.o): New .o files for libbackend.a. (GTFILES): Add basic-block.h. * toplev.c (flag_new_regalloc): New. (f_options): New option "new-ra". (rest_of_compilation): Call initialize_uninitialized_subregs() only for the old allocator. If flag_new_regalloc is set, call new allocator, instead of local_alloc(), global_alloc() and friends. * doc/invoke.texi: Document -fnew-ra. * basic-block.h (FOR_ALL_BB): New. * config/rs6000/rs6000.c (print_operand): Write small constants as @l+80. * df.c (read_modify_subreg_p): Narrow down cases for a rmw subreg. (df_reg_table_realloc): Make size at least as large as max_reg_num(). (df_insn_table_realloc): Size argument now is absolute, not relative. Changed all callers. * gengtype.c (main): Add the pseudo-type "HARD_REG_SET". * regclass.c (reg_scan_mark_refs): Ignore NULL rtx's. 2002-06-20 Michael Matz <matz@suse.de> * df.h (struct ref.id): Make unsigned. * df.c (df_bb_reg_def_chain_create): Remove unsigned cast. 2002-06-13 Michael Matz <matz@suse.de> * df.h (DF_REF_MODE_CHANGE): New flag. * df.c (df_def_record_1, df_uses_record): Set this flag for refs involving subregs with invalid mode changes, when CLASS_CANNOT_CHANGE_MODE is defined. 2002-05-07 Michael Matz <matz@suse.de> * reload1.c (fixup_abnormal_edges): Don't insert on NULL edge. 2002-05-03 Michael Matz <matz@suse.de> * sbitmap.c (sbitmap_difference): Accept sbitmaps of different size. Sat Feb 2 18:58:07 2002 Denis Chertykov <denisc@overta.ru> * regclass.c (regclass): Work with all regs which have sets or refs. (reg_scan_mark_refs): Count regs inside (clobber ...). 2002-01-04 Michael Matz <matzmich@cs.tu-berlin.de> * df.c (df_ref_record): Correctly calculate SUBREGs of hardregs. (df_bb_reg_def_chain_create, df_bb_reg_use_chain_create): Only add new refs. (df_bb_refs_update): Don't clear insns_modified here, ... (df_analyse): ... but here. * sbitmap.c (dump_sbitmap_file): New. (debug_sbitmap): Use it. * sbitmap.h (dump_sbitmap_file): Add prototype. 2001-08-07 Daniel Berlin <dan@cgsoftware.com> * df.c (df_insn_modify): Grow the UID table if necessary, rather than assume all emits go through df_insns_modify. 2001-07-26 Daniel Berlin <dan@cgsoftware.com> * regclass.c (reg_scan_mark_refs): When we increase REG_N_SETS, increase REG_N_REFS (like flow does), so that regclass doesn't think a reg is useless, and thus, not calculate a class, when it really should have. 2001-01-28 Daniel Berlin <dberlin@redhat.com> * sbitmap.h (EXECUTE_IF_SET_IN_SBITMAP_REV): New macro, needed for dataflow analysis. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55458 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-06-24 David S. Miller <davem@redhat.com>davem2002-06-241-1/+2
| | | | | | | | | * Makefile.in (GTFILES): Add basic-block.h * basic-block.h (label_value_list, tail_recursion_label_list): Mark with GTY. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54964 138bc75d-0d04-0410-961f-82ee72b054a4
* Mon Jun 10 20:42:34 CEST 2002 Jan Hubicka <jh@suse.cz>hubicka2002-06-201-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h: Do not include et-forest.h (dominance_info): Declare as struct dominance-info. * cfglayout.c (cleanup_unconditional_jumps): Remove the edge before deleting block. * dominance.c (struct dominance_info): Define. (BB_NODE, SET_BB_NODE): New macros. (bb_hash_func, bb_eq_func): Kill. (calculate_dominace_info, free_dominacne_info, set_immediate_dominator, nearest_common_dominator, dominated_by_p, recount_dominator, add_to_dominance_info, delete_from_dominance_info): update for new representation. (get_dominated_by, redirect_immediate_dominators): Rewrite using enumerate_sons. * ifcvt.c (process_double_test_block, merge_if_block, find_cond_trap, find_if_case_1, find_if_case_2): Remove killed blocks from dominance structure. * et-forest.h: Update copyright; revamp all function to operate on nodes (et_forest_value): Kill. (et_forest_enumerate_sons, et_forest_node_value): New. * et-forest.c: Update copyright. * et-forest.h: Update copyright; revamp all function to operate on nodes (et_forest_value): Kill. (et_forest_enumerate_sons, et_forest_node_value): New. Thu Jun 6 22:43:43 CEST 2002 Jan Hubicka <jh@suse.cz> * basic-block.h: Inlude et-forest.h (basic_block_def): Kill dominator. (dominance_info): New type. (loops): Use dominace_info. (dominace handling functions): Take dominace_info as argument instead of bitmaps. (create_preheader): Likewise. * cfg.c (entry_exit_blocks): Kill dominator. (dump_flow_info): Do not dump dominators. * cfglayout.c (cleanup_unconditonal_jumps): Delete deleted block from dominators. * cfgloop.c (flow_pre_header_find): Use dominacne_info. (flow_loops_pre_header_scan, make_forwarder_block, canonicale_loop_headers, flow_loops_find): Likewise. * dominance.c: Include error.h (idoms_to_doms): Kill. (bb_hash_func, bb_eq_func): New static functions. (debug_dominace_info): New global function. (calculate_dominance_info): Use new et forest structure. (free_dominace_info, get_immediate_dominator, set_immediate_dominator, get_dominated_by, redirect_immediate_dominators, nearest_common_dominator, dominated_by_p, verify_dominators, recount_dominator, iterate_fix_dominators, add_to_dominace_info, delete_from_dominance_info): New global functions. * gcse.c (domnators): CHange to dominance_info. (alloc_hoist_mem): Do not alloc dominators (free_code_hoist_mem): Use free_dominance_info. (compute_code_hoist_data): Use dominance_info. (hoist_code): Likewise. * ifcvt.c (post_dominators): Likewise. (find_if_case_2, if_convert): Likewise. * predict.c (process_note_predictions, process_note_prediction, estimate-probability): Likewise. * sched-rgn.c (find_rgns, init_regions): Likewise. * ssa-dce.c (find_all_control_dependences, fint_control_depemndence, find_pdom, delete_insn_bb, ssa_eliminate_dead_code): Likewise. * ssa.c (compute_dominance_frontiers_1, rename_block, rename_registers, find_evaluations, convert_to_ssa): Likewise. * ssa.h (compute_dominance_frontiers): Likewise. Thu Jun 6 22:57:34 CEST 2002 Pavel Nejedly <bim@atrey.karlin.mff.cuni.cz> * Makefile.in (et-forest.c): Add. * et-forest.c: New file. * at-forest.h: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54843 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-06-10 Roger Sayle <roger@eyesopen.com>sayle2002-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | Andreas Jaeger <aj@suse.de> * cfgrtl.c (create_basic_block_structure): Remove index argument and use last_basic_block++ instead. (create_basic_block): Update. * cfgbuild.c (find_basic_blocks_1): Likewise. * cfgrtl.c (compute_bb_for_insn): Remove unused "max" argument. * haifa-sched.c (sched_init): Update compute_bb_for_insn caller. * sched-ebb.c (schedule_ebbs): Likewise. * sched-rgn.c (schedule_insns): Likewise. * ssa-ccp.c (ssa_const_prop): Likewise. * ssa-dcs.c (ssa_eliminate_dead_code): Likewise. * toplev.c (rest_of_compilation): Likewise. * config/ia64/ia64.c (ia64_reorg): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54477 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge from pch-branch up to tag pch-commit-20020603.geoffk2002-06-041-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54232 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (emit_prefetch_instructions): Properly place the address computation.hubicka2002-06-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill. (set_block_for_insn): Turn into macro. * cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn. * cfglayout.c (insn_scopes): Kill. (scope_to_insns_initialize): Do not use insn_scopes. (scope_to_insns_finalize): Likewise. (duplicate_insn_chain): Likewise. (cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes. * cfgrtl.c (basic_block_for_insn): Kill. (delete_insn_and_edges, delete_insn_chain_and_edges): Simplify. (create_basic_block_structure): Use reorder_insns. (compute_bb_for_insn): Do not use basic_block_for_insn. (merge_blocks_nomove): Likewise. (update_bb_for_insn): Likewise. (verify_flow_info): Likewise. (set_block_for_insn): Kill. * combine.c (try_combine): Update gen_rtx_INSN call. * emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call. (mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear scopes and BBs. (add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify. (emit_note_before, emit_note_after, emit_line_note_after, emit_note): Clear BB. (emit_insns_after): Simplify. (emit_copy_of_insn_after): Copy scope. * final.c (final_start_function): Lower scopes. * flow.c (check_function_return_warnings): Do not rely on deleted insn. * integrate.c (copy_insn_list): Cope scopes. * jump.c (duplicate_loop_exit_test): LIkewise; simplify. * loop.c (loop_optimize): Do not care block notes. * print-rtl.c (print_rtx): Print BB. * recog.c (apply_change_group): Simplify. * rtl.c (copy_rtx): Handle 'B'. * rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields. * rtl.h (Field accessors): Update indexes. * sched-ebb.c (schedule_ebbs): Do not lower notes. * sched-rgn.c (schedule_insns): Likewise. * toplev.c (rest_of_compilation): Lower notes. * unroll.c (unroll_loop): Do not care scoping notes. (copy_loop_body): Copy scopes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54188 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (struct basic_block_def): New field loop_father.hubicka2002-06-011-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (BB_VISITED): New flag. (struct loop): New field pred, removed field shared. (struct loops): New field parray. (LOOP_EXITS_DOMS): Removed. (flow_loop_tree_node_add, flow_loop_tree_node_remove, flow_loop_nested_p, flow_bb_inside_loop_p, get_loop_body, dfs_enumerate_from, loop_preheader_edge, loop_latch_edge, add_bb_to_loop, remove_bb_from_loops, find_common_loop, verify_loop_structure): Declare. * cfg.c (entry_exit_blocks): Initialize loop_father field. * cfganal.c (dfs_enumerate_from): New function. * cfgloop.c (HEAVY_EDGE_RATIO): New constant. (flow_loop_entry_edges_find, flow_loop_exit_edges_find, flow_loop_nodes_find, flow_loop_level_compute, flow_loop_nested_p, flow_loop_dump, flow_loops_dump, flow_loops_free, flow_loop_tree_node_add, flow_loop_level_compute, flow_loops_level_compute, flow_loop_scan, flow_loops_update, flow_loop_outside_edge_p): Modified for new infrastructure. (make_forwarder_block, canonicalize_loop_headers, glb_enum_p, redirect_edge_with_latch_update, flow_loop_free): New static functions. (flow_loop_tree_node_remove, flow_bb_inside_loop_p, get_loop_body, add_bb_to_loop, remove_bb_from_loops, find_common_loop, verify_loop_structure, loop_latch_edge, loop_preheader_edge): New functions. (flow_loops_cfg_dump): Do not show dominators, as this information does not remain up to date long. (flow_loops_find): Store results in new format. * predict.c (propagate_freq, estimate_probability, estimate_loops_at_level, estimate_bb_frequencies): Use new loop infrastructure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54142 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (last_basic_block): Declare.rakdver2002-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (expunge_block_nocompact): Declaration removed. (compact_blocks): Declare. * cfg.c (last_basic_block): New variable. (expunge_block_nocompact): Removed. (expunge_block): Do not compact basic blocks. (compact_blocks): New. * cfganal.c (flow_call_edges_add): Use the fact that bb indices no longer change. * cfgbuild.c (find_basic_blocks_1, find_basic_blocks): Set last_basic_block. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Do not change real positions of blocks. (delete_unreachable_blocks): Simplified -- quadratic behavior now cannot occur. (cleanup_cfg): Compact blocks. * cfgrtl.c (create_basic_block): Insert basic blocks to the end of basic_block_info varray. (flow_delete_block): Comment update. (back_edge_of_syntactic_loop_p): Modify position check code. (verify_flow_info): Update checking. * flow.c (calculate_global_regs_live): Use FOR_EACH_BB. * ifcvt.c (SET_ORIG_INDEX, ORIG_INDEX): Removed. (find_if_case_1, find_if_case_2, if_convert): Use the fact that bb indices no longer change. * lcm.c (optimize_mode_switching): Replace n_basic_blocks with last_basic_block. * predict.c (estimate_bb_frequencies): Remove unneccessary code. * profile.c (branch_prob): Compact blocks. * sched-rgn.c (find_rgns): Replace n_basic_blocks with last_basic_block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53957 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (last_basic_block): Defined as synonym forrakdver2002-05-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | n_basic_blocks. * cfganal.c (mark_dfs_back_edges, flow_reverse_top_sort_order_compute, flow_depth_first_order_compute, flow_preorder_transversal_compute, flow_dfs_compute_reverse_init): Replaced relevant occurences of n_basic_blocks with last_basic_block. * cfgbuild.c (make_edges): Likewise. * cfgloop.c (flow_loop_scan, flow_loops_find): Likewise. * cfgrtl.c (verify_flow_info, purge_all_dead_edges): Likewise. * combine.c (combine_instructions): Likewise. * df.c (df_alloc, df_analyse_1, df_analyse, iterative_dataflow_sbitmap, iterative_dataflow_bitmap): Likewise. * dominance.c (init_dom_info, calc_dfs_tree_nonrec, calc_dfs_tree, calc_idoms, idoms_to_doms): Likewise. * flow.c (update_life_info_in_dirty_blocks, free_basic_block_vars): Likewise. * gcse.c (gcse_main, alloc_gcse_mem, compute_local_properties, compute_hash_table, expr_reaches_here_p, one_classic_gcse_pass, one_cprop_pass, compute_pre_data, pre_expr_reaches_here_p, one_pre_gcse_pass, compute_transpout, delete_null_pointer_checks_1, delete_null_pointer_checks, compute_code_hoist_vbeinout, hoist_expr_reaches_here_p, hoist_code, one_code_hoisting_pass, compute_store_table, build_store_vectors): Likewise. * haifa-sched.c (sched_init): Likewise. * ifcvt.c (if_convert): Likewise. * lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete, pre_edge_lcm, compute_available, compute_nearerout, compute_rev_insert_delete, pre_edge_rev_lcm, optimize_mode_switching): Likewise. * predict.c (estimate_probability, process_note_prediction, note_prediction_to_br_prob): Likewise. * profile.c (GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX): Likewise. * recog.c (split_all_insns, peephole2_optimize): Likewise. * regrename.c (copyprop_hardreg_forward): Likewise. * resource.c (init_resource_info): Likewise. * sched-rgn.c (build_control_flow, find_rgns, compute_trg_info, init_regions, schedule_insns): Likewise. * ssa-ccp.c (ssa_const_prop): Likewise. * ssa-dce.c (ssa_eliminate_dead_code): Likewise. * ssa.c (compute_dominance_frontiers, compute_iterated_dominance_frontiers, convert_to_ssa): Likewise. * df.c (df_refs_unlink): Fix FOR_EACH_BB usage (in #if 0'ed code) * gcse.c (alloc_rd_mem, alloc_avail_expr_mem): Use n_blocks for vector sizes consistently. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53924 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (can_hoist_p, hoist_insn_after, hoist_insn_to_edge):hubicka2002-05-271-0/+3
| | | | | | | | | new. * rtlanal.c (hoist_test_store, can_hoist_insn_p, hoist_update_store, hoist_insn_after, hoist_insn_to_edge): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53923 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (PEOP_SCAN_DEAD_STORES): New.hubicka2002-05-271-1/+6
| | | | | | | | | | (PROP_FINAL): Include. * flow.c (life_analysis, update_life_info, init_propagate_block_info, mark_set_1, mark_used_rgs): Support SCAN_DEAD_STORE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53920 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-05-23 David S. Miller <davem@redhat.com>davem2002-05-231-0/+2
| | | | | | | | | | | | * basic-block.h (CLEANUP_NO_INSN_DEL): Define it. * cfgcleanup.c (cleanup_cfg): If it is set do not attempt to delete trivially dead insns. * except.c (finish_eh_generation): Pass it to cleanup_cfg. * toplev.c (rest_of_compilation): Document non-trivial aspect the RTL before optimize_save_area_alloca is run. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53789 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic_block.h (struct basic_block_def): Added prev_bb and next_bbrakdver2002-05-191-2/+17
| | | | | | | | | | | | | | | | | | | | | fields. (FOR_BB_BETWEEN, FOR_ALL_BB, FOR_ALL_BB_REVERSE): New macros for traversing basic block chain. (create_basic_block_structure, create_basic_block): Declaration changed. (link_block, unlink_block): Declare. * cfg.c (entry_exit_blocks): Initialize new fields. (link_block, unlink_block): New. (expunge_block_nocompact): Unlink basic block. (dump_flow_info): Print prev_bb/next_bb fields. * cfgbuild.c (find_basic_blocks_1, find_basic_blocks): Modified. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Modified. * cfglayout.c (fixup_reorder_chain, cfg_layout_duplicate_bb): Modified. * cfgrtl.c (create_basic_block_structure, create_basic_block, split_block, force_nonfallthru_and_redirect, split_edge): Modified. (verify_flow_info): Check that list agrees with numbering. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53642 138bc75d-0d04-0410-961f-82ee72b054a4
* Revert "Basic block renumbering removal", and two followup patches.rth2002-05-171-27/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53537 138bc75d-0d04-0410-961f-82ee72b054a4
* Basic block renumbering removal.rth2002-05-161-7/+27
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53522 138bc75d-0d04-0410-961f-82ee72b054a4
* * invoke.texi (-malign-double): Re-add lost warning.hubicka2002-05-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * i386-protos.h (x86_output_mi_thunk): Declare. * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ... * i386.c (x86_output_mi_thunk): ... here; handle 64bits. * dwarf2out.c (output_call_frame_info): Do not skip unwind info when flag_asynchronous_unwind_tables is set. * flags.h (flag_reorder_functions): Declare. * function.c (prepare_function_start): Initialize frequnecy. * params.def (HOT_BB_COUNT_FRACTION, HOT_BB_FREQUENCY_FRACTION): New paramters. * Makefile.in (predict.o): Add dependency on target.h and params.h * defaults.h (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): New macros. * predict.c (choose_function_section): New function. (estimate_bb_frequencies): Use it. * toplev.c (flag_reorder_functions): New global variable. (lang_independent_options): New. (parse_options_and_default_flags): Set. * varasm.c (assemble_start_function): Bypass functdion alignment for never executed functions. * invoke.texi (-freorder-blocks, -freorder-functions): Document. (param hot-bb-count-fraction, hot-bb-frequency-fraction): New. * tm.texi (HOT_TEXT_SECTION_NAME, UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Document. Thu Jan 3 21:52:09 CET 2002 Jan Hubicka <jh@suse.cz> * predict.c: Inlude profile.h (MIN_COUNT): Rename to MIN_COUNT_FRACTION (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): Use the information about maximal counter in the program. Thu Dec 20 22:14:00 CET 2001 Jan Hubicka <jh@suse.cz> * basic-block.h (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * cfgcleanup.c (outgoing_edges_match): Use them. * predict.c (MIN_COUNT, MIN_FREQUENCY): New macros. (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p): New functions. * function.h (function): Add new field function_frequency. * predict.c (compute_function_frequency): New function. (estimate_probability): Call it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53478 138bc75d-0d04-0410-961f-82ee72b054a4
* * i386.md (testsi to testqi spliters): New.hubicka2002-05-111-0/+2
| | | | | | | | | | | | | | | | | | | | 2002-01-14 Josef Zlomek <zlomek@matfyz.cz> cfg.c (dump_edge_info): added dumping of EDGE_CAN_FALLTHRU. Wed Jan 9 2002 Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz> * basic-block.h: New flag EDGE_CAN_FALLTHRU * cfganal.c (set_edge_can_fallthru_flag): New function; marks the edges that can be made fallthru. Mon Nov 12 16:25:53 CET 2001 Jan Hubicka <jh@suse.cz> * cfglayout.c (cleanup_unconditional_jumps): New static function. (cfg_layout_initialize): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53383 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfglayout.c (function_tail_eff_head): Rename to ...hubicka2002-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (function_footer): ... this one. (unlink_insn_chain): New functions. (label_for_bb): Only call block_label and emit debug message. (record_effective_endpoints): Actually unlink the headers and footers. (fixup_reorder_cahin): Re-insert the unlinked sequences. (cfg_layout_duplicate_bb): Use duplicate_insn_chain. * cfglayout.h (struct reorder_block_def): New fields footer/header; remove eff_head/eff_end. * rtl.h (set_first_insn): Declare. * emit-rtl.c (set_first_insn): New function. * cfglayout.c (fixup_reorder_chain): Dump duplicated (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge, cfg_layout_duplicate_bb): New global function. (duplicate_insn_chain): New static function. * cfglayout.h (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge, cfg_layout_duplicate_bb): Declare. (struct reorder_block_def): Add "original" field. * emit-rtl.c (emit_copy_of_insn_after): New function. * rtl.h (emit_copy_of_insn_after): Declare. * cfglayout.c (fixup_fallthru_exit_predecessor): Kill. (fixup_reorder_chain): properly handle edges to exit block. Wed May 8 11:10:31 CEST 2002 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> Jan Hubicka <jh@suse.cz> * basic-block.h (note_prediction_to_br_prob): declare. * c-semantics.c: Inlucde predit.h (expand_stmt): predict GOTO_STMT as not taken. * cfgcleanup.c: (delete_unreachable_blocks): Make global. (cleanup_cfg): Do not free tail_recursion_list. * cfgrtl.c (can_delete_note_p): Delete NOTE_INSN_PREDICTION. (flow_delete_block): Kill predictions past end of basic block. * output.h (delete_unreachable_blocks): Declare. * predict.c (predicted_by_p, process_note_predictions, process_note_prediction, last_block_p): New function. (estimate_probability): Bypass loop on PRED_CONTINUE; do not handle noreturn heuristics; kill PRED_RETURN; add PRED_EARLY_RETURN. * predict.def (PRED_CONTINUE, PRED_EARLY_RETURN, PRED_GOTO, PRED_CONST_RETURN, PRED_NEGATIVE_RETURN, PRED_NULL_RETURN): New. * predict.h (IS_TAKEN): New constant. * print-rtl.c (print_rtx): Pretty print NOTE_INSN_PREDICTION. * rtl.c (NOTE_INSN_PREDICTION): New. * rtl.h (NOTE_PREDICTION, NOTE_PREDICTION_ALG, NOTE_PREDICTION_FLAGS): New macro. (insn_note): add NOTE_INSN_PREDICTION. * sibcall.c (optimize_sibling_and_tail_recursive_call): Do not build CFG; free tail_recursion_label_list. * stmt.c: Include predict.h; (return_prediction): New. (expand_value_return): Use it. * toplev.c: Lower NOTE_INSN_PREDICTION before sibcall. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53285 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (flow_delete_block_noexpunge): Declare.rth2002-04-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (expunge_block_nocompact): Declare. * cfg.c (expunge_block_nocompact): Split out from ... (expunge_block): ... here. * cfgrtl.c (can_delete_label_p): Don't use exception_handler_labels. (flow_delete_block_noexpunge): Split out from ... (flow_delete_block): ... here. * cfgcleanup.c (delete_unreachable_blocks): Compact while removing dead blocks. * except.c (exception_handler_labels): Remove. (exception_handler_label_map): New. (struct eh_region): Add aka member. (mark_ehl_map_entry, mark_ehl_map, free_region): New. (ehl_hash, ehl_eq, ehl_free, add_ehl_entry): New. (for_each_eh_label, for_each_eh_label_1): New. (init_eh): Register exception_handler_label_map. (free_eh_status): Use free_region. (find_exception_handler_labels): Use the map, not the list. (remove_exception_handler_label): Likewise. (maybe_remove_eh_handler): Likewise. (remove_eh_handler): Use the region aka bitmap. * except.h (exception_handler_labels): Remove. (for_each_eh_label): Declare. * jump.c (rebuild_jump_labels): Don't check exception_handler_labels. * loop.c (invalidate_loops_containing_label): New. (find_and_verify_loops): Use it. Use for_each_eh_label. * sched-rgn.c (is_cfg_nonregular): Use current_function_has_exception_handlers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52100 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (fixup_abnormal_edges): Declare.hubicka2002-03-071-0/+1
| | | | | | | | | | | | * reload1.c (fixup_abnormal_edges): New function. * reg-stack.c (convert_regs): Use it. * gcse.c (insert_insn_end_bb): Handle trapping insns. * gcse.c (hash_scan_set): Refuse instructions with EH edges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50405 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfgrtl.c (delete_insn_and_edges, delete_insn_chain_and_edges): New.hubicka2002-03-061-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rtl.h (delete_insn_and_edges, delete_insn_chain_and_edges): Declare * basic-block.h (update_life_info, update_life_info_in_dirty_blocks, delete_noop_moves): Return indeger. * flow.c (ndead): New variable. (propagate_block_delete_insn): Use delete_insn_and_edges; remove BB argument; update callers. (propagate_block_delete_libcall): Use delete_insn_chain_and_edges. (life_analysis): Do not call purge_all_dead_edges. (update_life_info): Return number of deleted insns; print statistics. (update_life_info_in_dirty_blocks): likewise. (delete_noop_moves): Use delete_insn_and_edges; print statistics; return number of insns deleted. * cse.c: Include timevar.h (delete_trivially_dead_insns): Kill preserve_basic_blocks argument; iterate until stabilizes; print statistics; return number of killed insns. * Makefile.in: (cse.o): Add timevar.h dependency * rtl.h (delete_trivially_dead_insns): New. * timever.def: Add TV_DELETE_TRIVIALLY_DEAD timer. * toplev.c (rest_of_compilation): Update callers. * cfgcleanup.c (try_optimize_cfg): Kill blocks. (try_optimize_cfg): Do not update liveness. (cleanup-cfg): Loop until try_optimize_cfg and dead code removal stabilizes; use delete_trivially_dead_insns. * cfgrtl.c (verify_flow_info): Sanity check outgoing edges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50355 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (BB_REACHABLE): Renumber.hubicka2002-02-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (BB_DIRTY, BB_NEW): New flags. (clear_bb_flags): Declare. (update_life_info_in_dirty_blocks): Declare. * cfg.c (clear_bb_flags): New function. * cfgrtl.c (create_basic_block_structure): Set flags to BB_NEW. * emit-rtl.c (add_insn_after, add_insn_before, remove_insn, reorder_insns, emit_insn_after): Mark block as dirty. * flow.c (update_life_info): Fix clearing of PROP_LOG_LINKS. (update_life_info_in_dirty_blocks): New function. * recog.c (apply_change_group): Dirtify block. * cse.c (cse_insn): Reorder emitting of jump insn to keep cfg consistent. * gcse.c (delete_null_pointer_checks): Likewise. * toplev.c (dump_file_index): Move cse2 after bp, add DFI_null (dump_file_info): Similary. (rest_of_compilation): Avoid most of CFG rebuilds; do first if converision after null pointer checks, do cse2 after branch prediction; avoid full liveness rebuild after initializing subregs. * invoke.texi (-d options): Document -du, renumber. * cfgcleanup.c (bb_flags): Remove BB_UPDATE_LIFE. (notice_new_block): Do not set BB_UPDATE_LIFE. (try_forward_edges, merge_blocks_move_predecessor_nojumps, merge_blocks_move_successor_nojumps, merge_blocks, try_crossjump_to_edge): Likewise. (try_optimize_cfg): Likewise; use update_life_info_in_dirty_blocks. * cfgrtl.c (merge_blocks_nomove): Copy b's flags to a. * ifcvt.c (SET_UPDATE_LIFE, UPDATE_LIFE): Kill. (merge_of_block): Do not use life_data_ok. (find_if_case_1): Do not use SET_UPDATE_LIFE. (if_convert): Use BB_DIRTY mechanizm to update life. * lcm.c (optimize_mode_switching): Update update_life_info_in_dirty_blocks git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50127 138bc75d-0d04-0410-961f-82ee72b054a4
* * df.c (df_ref_create, df_ref_record_1, df_ref_record): Kill BB argument.hubicka2002-01-251-0/+1
| | | | | | | | | | | | * df.h (struct ref): Kill B. (DF_REF_BB, DF_REF_BBNO): Use BLOCK_FOR_INSN. * basic-block.h (PROP_EQUAL_NOTES): New flag. * flow.c (propagate_one_insn): Use it. (mark_used_regs): Handle NIL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49220 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (update_br_prob_note): Declare.hubicka2002-01-101-0/+1
| | | | | | | | | | | | | | | | | | | | * cfgcleanup.c (try_simplify_condjump): Call update_br_prob_note. (try_forward_edges): Care negative frequencies and update note. (outgoing_edges_match): Tweek conditional merging heuristics. (try_crossjump_to_edge): use update_br_prob_note. * cfglayout.c (fixup_reorder_chain): Likewise. * cfrtl.c (update_br_prob_note): New. * ifcvt.c (dead_or_predicable): Call update_br_prob_note. * i386.c (ix86_decompose_address): Return -1 if address contains shift. (legitimate_address_p): Require ix86_decompose_address to return 1. * gcse.c (hash_scan_set): Use CONSTANT_INSN_P. (cprop_insn): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48750 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Remove forward def of tree_node andgrahams2001-12-311-5/+0
| | | | | | | define of tree. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48415 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (cfgcleanup.o): Add cselib.h dependancy.hubicka2001-12-171-0/+1
| | | | | | | | | | | | | | | * basic-block.h (CLEANUP_THREADING): New constant. * cfgcleanup.c: Include cselib.h (thread_jump, mark_effect): New functions. (try_forward_edges): Do jump threading when asked for. * jump.c (mark_modified_reg, save_regs, num_same_regs, modified_regs, modified_mem, thread_jumps, rtx_equal_for-thread_p): Kill. * rtl.h (thread_jumps, rtx_equal_for_thread_p): Kill. * toplev.c (rest_of_compilation): Do now call thread_jumps; use CLEANUP_THREAD instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48108 138bc75d-0d04-0410-961f-82ee72b054a4
* Add newline in copyright block.kenner2001-12-161-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48057 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (flow_preorder_transversal_compute): Declare.wehle2001-12-121-0/+1
| | | | | | | * cfganal.c (flow_preorder_transversal_compute): Implement. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47920 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfgrtl.c (purge_all_dead_edges): Use int as argument foraj2001-11-151-1/+1
| | | | | | | | portability. * basic-block.h: Adjust prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47041 138bc75d-0d04-0410-961f-82ee72b054a4