summaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
Commit message (Collapse)AuthorAgeFilesLines
* 2001-06-22 Diego Novillo <dnovillo@redhat.com>dnovillo2001-06-221-0/+3
| | | | | | | | | | | | | | | | * basic-block.h (dump_edge_info): Declare. (clear_edges): Declare. (mark_critical_edges): Declare. * flow.c (dump_edge_info): Remove static declaration. (clear_edges): Ditto. (mark_critical_edges): Ditto. (free_basic_block_vars): Only clear edges and free basic block array if basic_block_info is not NULL. * ssa.c (compute_dominance_frontiers): Remove static declaration. * ssa.h (compute_dominance_frontiers): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43518 138bc75d-0d04-0410-961f-82ee72b054a4
* * regs.h (struct reg_info_def): Add freq field.hubicka2001-06-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (REG_N_REFS): Update comment. (REG_FREQ): New. * regclass.c (scan_one_insn): Update REG_FREQ. * flow.c (mark_set_1): Update REG_FREQ, make REG_N_SETS unweighted. (attempt_auto_inc): Likewise. (mark_used_reg): Likewise. (try_pre_increment_1): Likewise. * local-alloc.c (struct qty): Add freq field. (alloc_qty): Set freq. (update_equiv_regs): Set REG_FREQ. (QTY_CMP_PRI): Use freq. (combine_regs): Update qty->freq. * global.c (struct allocno): Update comment for n_refs; add freq field. (local_reg_freq): New array. (global_alloc): Update freq field; allocate and initialize local_reg_freq. (allocno_compare): Use freq field. (find_reg): Likewise. * reload1.c (count_pseudo): Use freq isntead of n_refs. (count_spilled_pseudo): Likewise. * tm.texi (GCOV_TYPE_SIZE): Document. * basic-block.h (gcov_type): Define. (struct edge_def): Use gcov_type for count field. (struct basic_block_def): Likewise. * defaults.h (GCOV_TYPE_SIZE): Define. * final.c (end_final): Use GCOV_TYPE_SIZE. * flow.c (dump_edge_info, dump_flow_info, dump_bb): Print count fields using HOST_WIDEST_INT_PRINT_DEC. * gcov-io.h (__fetch_gcov_type, __store_gcov_type, __read_gcov_type, __write_gcov_type): New. (store_long): Remove. * gcov.c (gcov_type): Set default. (struct adj_list): Use gcov_type for arc_count. (bb_info): Use gcov_type for succ_count, pred_count and exec_count. (create_program_flow_graph): Read arc_count properly. (solve_program_flow_graph): 'total' is gcov_type. (output_data): Line_counts is gcov_type, print it properly. * libgcc2.c (struct bb): Counts is gcov_type. (__bb_exit_func): Use __read_gcov_type and __write_gcov_type. * profile.c (LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE): Set default. (GCOV_TYPE_SIZE): Define. (struct bb_info): succ_count and pred_count is gcov_type. (compute_branch_probabilities): Use __read_gcov_type, print read edges to the dump file. (total): Is gcov_type. (gen_edge_profiler): Use GCOV_TYPE_SIZE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43505 138bc75d-0d04-0410-961f-82ee72b054a4
* * predict.c (estimate_loops_at_level, propagate_freqhubicka2001-06-201-0/+5
| | | | | | | | | | estimate_bb_frequencies, count_to_freqs): New functions. (estimate_probability): Call estimate_bb_frequencies. * basic-block.h (basic_block_def): Add field "freq". (BB_FREQ_MAX): New constant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43476 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (find_unreachable_blocks): New function.law2001-06-181-0/+1
| | | | | | | | (delete_unreachable_blocks): Use find_unreachable_blocks. * basic-block.h (find_unreachable_blocks): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43448 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Improve comments.mmitchel2001-06-081-5/+27
| | | | | | | | | | | | | * except.c (expand_eh_region_end_allowed): Remove redundant call to do_pending_stack_adjust. * flow.c (life_analysis): Fix typo in comment. (calculate_global_regs_live): Add documentation. (mark_set_1): Likewise. (debug_regset): Likewise. * doc/rtl.texi (cond_exec): Document it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43049 138bc75d-0d04-0410-961f-82ee72b054a4
* Standardize header guards.rth2001-05-261-3/+3
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42615 138bc75d-0d04-0410-961f-82ee72b054a4
* 2001-04-09 Andrew MacLeod <amacleod@redhat.com>amacleod2001-04-091-1/+1
| | | | | | | | | | | | | | | | | * basic-block.h (set_new_block_for_insns): New Prototype. (set_block_num): Delete prototype. * flow.c (set_block_num): Remove obsolete function. (set_block_for_new_insns): Set BB for single or multiple insns. * gcse.c (handle_avail_expr): Use set_block_for_new_insns. (process_insn_end_bb): Use set_block_for_new_insns or set_block_for_insn instead of set_block_num. (pre_insert_copy_insn): Use set_block_for_new_insns. (update_ld_motion_stores): Use set_block_for_new_insns. (insert_insn_start_bb): Use set_block_for_new_insns. (replace_store_insn): Use set_block_for_new_insns. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41208 138bc75d-0d04-0410-961f-82ee72b054a4
* IA-64 ABI Exception Handling.rth2001-03-281-6/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40924 138bc75d-0d04-0410-961f-82ee72b054a4
* Partially undo a previous patchbernds2001-01-111-1/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38908 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (flow_call_edges_add): New.m.hayes2001-01-111-0/+1
| | | | | | | * basic_block.h (flow_call_edges_add): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38899 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (flow_loop_scan): Break out of ...m.hayes2001-01-091-3/+6
| | | | | | | | | | (flow_loops_find) ... here. * basic-block.h (flow_loop_scan): New. (LOOP_ENTRY_EDGES, LOOP_EXIT_EDGES): Add. (LOOP_EDGES, LOOP_EXITS_DOMS, LOOP_ALL): Redefine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38822 138bc75d-0d04-0410-961f-82ee72b054a4
* * hard-reg-set.h: Add multiple include guard.m.hayes2001-01-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h (struct loop): Add `sink' field. * loop.h: Include sbitmap.h, hard-reg-set.h, and basic-block.h. (emit_iv_add_mult): Delete. (loop_iv_add_mult_hoist, loop_iv_add_mult_sink): Define. (loop_iv_add_mult_emit_before, loop_insn_sink): Define. (unroll_loop): Remove end_insert_before argument. * loop.c (loop_givs_rescan): Remove end_insert_before argument. (maybe_eliminate_biv_1): Likewise. (emit_iv_add_mult): Delete. (gen_add_mult, loop_regs_update): New. (loop_insn_emit_after, loop_insn_emit_before): New. (loop_insn_sink, loop_insn_sink_or_swim): New. (emit_iv_add_mult): Delete. (scan_loop): Set loop->sink. (loop_givs_reduce): Use loop_insn_sink and its ilk. (loop_givs_rescan, strength_reduce, check_dbra_loop): Likewise. (maybe_eliminate_biv_1): Likewise. (maybe_eliminate_biv_1): Add basic block argument. * unroll.c (unroll_loop): Remove end_insert_before argument. (find_splittable_regs): Likewise. (find_splittable_regs): Use loop_insn_sink and its ilk. (find_splittable_givs, final_biv_value, final_giv_value): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38766 138bc75d-0d04-0410-961f-82ee72b054a4
* Add a commentbernds2000-12-291-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38548 138bc75d-0d04-0410-961f-82ee72b054a4
* While building global lifetime information, keep track of which registers arebernds2000-11-271-2/+4
| | | | | | | | only conditionally set. Use this to force rescans in more cases where they are needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37801 138bc75d-0d04-0410-961f-82ee72b054a4
* Michael Matz <matzmich@cs.tu-berlin.de>rth2000-11-141-4/+11
| | | | | | | | | | | | | | | | | | | | | | | * dominance.c: New file. * Makefile.in (OBJS): Add dominance.o. * flow.c (compute_flow_dominators): Remove. (compute_immediate_dominators): Remove. (compute_immediate_postdominators): Remove. * basic-block.h: Remove their prototypes. (calculate_dominance_info): Add prototype. * dce.c (eliminate_dead_code): Change calls to above functions. Don't compute dominators but only immediate dominators. * flow.c (flow_loops_find): Change callers. * gcse.c (compute_code_hoist_data): Likewise. * haifa-sched.c (schedule_insns): Likewise. * ifcvt.c (if_convert): Likewise. * ssa.c (convert_to_ssa): Likewise, and only compute immediate dominators. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37449 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (struct loop): Delete fields pre_header_rootm.hayes2000-10-181-4/+6
| | | | | | | | | | | and pre_header_trace and replace with pre_header_edges and num_pre_header_edges. * flow.c (flow_loop_dump): Dump pre_header_edges. (flow_loops_free): Free pre_header_edges. (flow_loop_pre_header_scan): Calculate pre_header_edges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36934 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove obstacks.mmitchel2000-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (ggc-callbacks.o): Remove target. (flow.o): Depend on GGC_H. * alias.c (init_alias_analysis): Remove ggc_p conditionals. (end_alias_analysis): Likewise. * basic-block.h (init_flow): New function. (allocate_reg_life_data): Declare. * bb-reorder.c (function_obstack): Replace with ... (flow_obstack): ... new variable. (fixup_reorder_chain): Use it. * c-decl.c (ggc_p): Remove. (caller-save.c): Don't call oballoc/obfree. * combine.c (struct undobuf): Remove storage. (try_combine): Don't call oballoc. (undo_all): Don't call obfree. * cse.c (insert): Use xmalloc, not oballoc. (cse_main): Adjust accordingly. * dwarf2out.c (save_rtx): Remove obstack code. (dwarf2out_init): Remove ggc_p conditionals. * emit-rtl.c (rtl_obstack): Remove. (gen_rtx_CONST_INT): Remove ggc_p conditionals. (make_insn_raw): Likewise. (emit_insn_before): Likewise. (emit_insn_after): Likewise. (emit_insn): Likewise. (gen_sequence): Likewise. (copy_insn_1): Remove handling of `b' RTL components. (init_emit_once): Remove ggc_p conditionals. * except.c (create_rethrow_ref): Don't fool with obstacks. (add_partial_entry): Likewise. (call_get_eh_context): Likewise. (begin_protect_partials): Likewise. (protect_with_terminate): Likewise. * explow.c (plus_constant_wide): Likewise. * expr.c (init_expr_once): Likewise. (emit_block_move): Likewise. (clear_storage): Likewise. (expand_expr): Likewise. * flow.c (function_obstack): Remove. (flow_obstack): New variable. (flow_firstobj): Likewise. (create_base_block): Use the flow_obstack. (split_block): Likewise. (split_edge): Likewise. (calculate_global_regs_live): Likewise. (allocate_bb_life_data): Make it static. Likewiwse. (init_flow): New function. (size_int_type_wide): Remove ggc_p conditionals. * function.c (push_function_context_to): Don't call save_tree_status. (pop_function_context_from): Or restore_tree_status. (assign_stack_local_1): Don't call push_obstacks. (find_fixup_replacement): Use xmalloc. (fixup_var_refs_insns): Free the storage. (insns_for_mem_walk): Don't mess with obstacks. (instantiate_decls): Likewise. (trampoline_address): Likewise. (expand_function_end): Likewise. * function.h (sturct function): Remove obstack-related variables. (save_tree_status): Don't declare. (restore_tree_status): Likewise. * gcse.c (compute_can_copy): Don't call oballoc/obfree. * genattrtab.c (operate_exp): Remove ggc_p conditionals. (simplify_cond): Likewise. (simplify_test_exp): Don't mess with obstacks. (optimize_attrs): Likewise. * gengenrtl.c (gendef): Don't include ggc_p conditionals. * ggc-callbacks.c (ggc_p): Remove. * ggc-none.c (ggc_p): Remove. * ggc.h (ggc_p): Don't declare. * integrate.c (save_for_inline): Don't mess with obstacks. (integrate_decl_tree): Likewise. (output_inline_function): Likewise. * lists.c (init_EXPR_INSN_LIST_cache): Likewise. * loop.c (temp_obstack): Remove. (rtl_obstack): Likewise. (init_loop): Don't mess with obstacks. (reg_address_cost): Free BIVs and GIVs. (check_insns_for_bivs): Use xmalloc, not oballoc. (find_mem_givs): Likewise. (record_biv): Likewise. (general_induction_var): Likewise. (product_cheap_p): Likewse. * optabs.c (init_one_libfunc): Remove ggc_p conditional. * print-tree.c (debug_tree): Don't use oballoc/obfree. (print_node): Likewise. * profile.c (output_func_start_profiler): Remove call to temporary_allocation. * reload1.c (eliminate_regs_in_insn): Don't mess with obstacks. * resource.c (mark_target_live_regs): Use xmalloc. (free_resource_info): Free the memory. * rtl.c (rtl_obstack): Remove. (rtvec_alloc): Don't mess with obstacks. (rtx_alloc): Likewise. (rtx_free): Remove. (copy_rtx): Don't handle `b' cases. (read_rtx): Use a local rtl_obstack. * rtl.h (oballoc): Remove. (obfree): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (allocate_bb_life_data): Likewise. (allocate_reg_life_data): Likewise. (rtx_free): Likewise. * sdbout.c (sdbout_queue_anonymous_type): Use tree_cons, not saveable_tree_cons. * simplify-rtx.c (cselib_init): Don't mess with obstacks. * stmt.c (mark_block_nesting): Mark the label_chain. (epxand_label): Use ggc_alloc, not oballoc. (clear_last_expr): Don't mess with obstacks. (expand_decl_cleanup): Likewise. (expand_dcc_cleanup): Likewise. (expand_dhc_cleanup): Likewise. (expand_anon_union_decl): Likewise. (add_case_node): Use xmalloc, not oballoc. (free_case_nodes): New function. (expand_end_case): Call it. * stor-layout.c (layout_type): Don't mess with obstacks. (layout_type): Likewise. * toplev.c (wrapup_global_declarations): Likewise. (compile_file): Remove ggc_p conditionals. (rest_of_compilation): Call init_flow. Remove ggc_p conditionals. (decode_f_option): Remove ggc_p conditionals. * tree.c (function_maybepermanent_obstack): Remove. (maybepermanent_obstack): Likewise. (function_obstack): Likewise. (tmeporary_obstack): Likewise. (momentary_obstack): Likewise. (temp_decl_obstack): Likewise. (saveable_obstack): Likewise. (rtl_obstack): Likewise. (current_obstack): Likewise. (expression_obstack): Likewise. (struct obstack_stack): Likewise. (obstack_stack): Likewise. (obstack_stack_obstack): Likewise. (maybepermanent_firstobj): Likewise. (temporary_firstobj): Likewise. (momentary_firstobj): Likewise. (temp_decl_firstobj): Likewise. (momentary_function_firstobj): Likewise. (all_types_permanent): Likewise. (struct momentary_level): Likewise. (momentary_stack): Likewise. (init_obstacks): Remove initialization of removed obstacks. (save_tree_status): Remove. (restore_tree_status): Likewise. (temporary_allocation): Liekwise. (end_temporary_allocation): Liekwise. (resume_temporary_allocation): Likewise. (saveable_allocation): Likewise. (push_obstacks): Likewise. (push_obstacks_nochange): Likewise. (pop_obstacks): Likewise. (allocation_temporary_p): Likewise. (permanent_allocation): Likewise. (preserve_data): Likewise. (preserve_initializer): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (oballoc): Likewise. (obfree): Likewise. (savealloc): Likewise. (expralloc): Likewise. (print_obstack_name): Likewise. (debug_obstack): Likewise. (object_permanent_p): Likewise. (push_momentary): Likewise. (perserve_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (pop_momentary_nofree): Likewise. (suspend_momentary): Likewise. (resume_momentary): Likewise. (make_node): Don't set TREE_PERMANENT. (copy_node): Remove ggc_p conditionals. Don't set TYPE_OBSTACK. Don't set TREE_PERMANENT. (get_identifier): Remove ggc_p conditionals. (build_string): Likewise. (make_tree_vec): Likewise. (build_decl_list): Remove. (build_expr_list): Likewise. (tree_cons): Remove ggc_p conditionals. (decl_tree_cons): Remove. (expr_tree_cons): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (build1): Remove ggc_p conditionals. (build_parse_node): Likewise. (build_type_attribute_variant): Don't mess with obstacks. (build_type_copy): Likewise. (type_hash_canon): Likewise. (build_pointer_type): Likewise. (build_reference_type): Likewise. (build_index_type): Likewise. (build_range_type): Likewise. (dump_tree_statistics): Don't print obstack information. * tree.h (struct tree_common): Remove permanent_flag. (TREE_PERMANENT): Remove. (TREE_SET_PERMANENT): Likewise. (TYPE_OBSTACK): Likewise. (struct tree_type): Remove obstack. (oballoc): Remove. (savealloc): Likewise. (build_decl_list): Likewise. (build_expr_list): Likewise. (perm_tree_cons): Likewise. (temp_tree_cons): Likewise. (saveable_tree_cons): Likewise. (decl_tree_cons): Likewise. (expr_tree_cons): Likewise. (suspend_momentary): Likewise. (allocation_temporary_p): Likewise. (resume_momentary): Likewise. (push_obstacks_nochange): Likewise. (permanent_allocation): Likewise. (push_momentary): Likewise. (clear_momentary): Likewise. (pop_momentary): Likewise. (end_temporary_allocation): Likewise. (pop_obstacks): Likewise. (push_obstacks): Likewise. (pop_momentary_nofree): LIkewise. (preserve_momentary): Likewise. (saveable_allocation): Likewise. (temporary_allocation): Likewise. (resume_temporary_allocation): Likewise. (perserve_initializer): Likewise. (debug_obstack): Likewise. (rtl_in_current_obstack): Likewise. (rtl_in_saveable_obstack): Likewise. (obfree): Likewise. * varasm.c (current_obstack): Remove. (saveable_obstack): Remove. (rtl_obstack): Remove. (immed_double_const): Don't mess with obstacks. (immed_real_cons): Likewise. (output_constant_def): Likewise. (init_varasm_status): Use xcalloc. (mark_pool_constant): Mark the pool constant itself. (free_varasm_status): Free memory. (decode_rtx_const): Call bzero directly, rather than expanding it inline. (record_rtx_const): Don't mess with obstacks. (force_const_mem): Likewise. * config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p conditionals. (aof_pic_entry): Likewise. * config/ia64/ia64.c (ia64_encode_section_info): Likewise. * config/m32r/m32r.c (m32r_encode_section_info): Likewise. * config/pa/pa.c (saveable_obstack): Remove. (rtl_obstack): Likewise. (current_obstack): Likewise. (output_call): Don't mess with obstacks. (hppa_encode_label): Remove ggc_p conditionals. * config/romp/romp.c (get_symref): Don't mess with obstacks. * config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional. (rs6000_encode_section_info): Likewise. * config/sh/sh.c (get_fpscr_rtx): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36856 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-09-12 Michael Hayes <mhayes@cygnus.com>m.hayes2000-09-111-1/+20
| | | | | | | | | | | | | | | | | * basic-block.h (LOOP_TREE, LOOP_PRE_HEADER, LOOP_EDGES): New. (LOOP_EXITS_DOMS, LOOP_ALL): Likewise. (flow_loops_update): New prototype. (flow_loops_find): Add flags to prototype. (struct loop): Add `pre_header_root' and `pre_header_trace' fields. * flow.c (flow_loop_pre_header_scan): New. (flow_loop_dump): Dump pre-header root and trace and exit dominators. (flow_loop_free): Free pre-header root and trace and exit dominators. (flow_loops_find): New argument flags. (flow_loops_update): New function. * toplev.c (rest_of_compilation): Add flag argument to flow_loops_find. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36333 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (split_block, update_bb_for_insn): New prototypes.m.hayes2000-09-111-0/+2
| | | | | | | * flow.c (split_block, update_bb_for_insn): New functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36332 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (struct loop): Rename `exits' field tom.hayes2000-08-251-1/+7
| | | | | | | | | | | | | | `exit_edges'. Add `entry_edges' and `num_entries' fields. * flow.c (flow_loop_exit_edges_find): Rename from flow_loop_exits_find. (flow_loop_entry_edges_find): Add. (flow_edge_list_print): Rename from flow_exits_print. (flow_loops_find): Call flow_loop_entry_edges_find. (flow_loop_dump): Dump entry_edges list. (flow_loops_free): Free entry_edges. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35980 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (loop_dump_aux, debug_loop): New functions.m.hayes2000-08-251-2/+6
| | | | | | | | | | | | | | | | | (LOOP_BLOCK_NUM_1, LOOP_BLOCK_NUM, LOOP_INSN_UID): New macros. * flow.c (flow_loops_dump): Add callback parameter. (flow_loop_dump): Add callback parameter and call it. Move loop note debugging code to loop_dump_aux. * basic-block.h (flow_loop_dump): Add callback parameter (flow_loops_dump): Likewise. * toplev.c (rest_of_compilation): Add NULL callback function pointer to call to flow_loops_dump. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35979 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (OBJS): Added dce.o.mmitchel2000-08-021-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (ssa.o): Updated target to include ssa.h. (flow.o): Likewise. (toplev.o): Likewise. (dce.o): Created target. * basic-block.h: Added comments. (INVALID_BLOCK): Added definition. (connect_infinite_loops_to_exit): Added declaration. Moved SSA declarations to ssa.h. * flow.c: Added inclusion of ssa.h. (struct depth_first_search_dsS, depth_first_search_ds): Added definitions. (compute_immediate_postdominators): Added definition. (connect_infinite_loops_to_exit): Likewise. (flow_dfs_compute_reverse_init): Likewise. (flow_dfs_compute_reverse_add_bb): Likewise. (flow_dfs_compute_reverse_execute): Likewise. (flow_dfs_compute_reverse_finish): Likewise. * rtl.h (rtx/in_struct): Added use to determine insn necessity. (LABEL_P): Added definition. (JUMP_P): Likewise. (NOTE_P): Likewise. (BARRIER_P): Likewise. (JUMP_TABLE_DATA_P): Likewise. (INSN_DEAD_CODE_P): Likewise. * ssa.c: Replaced inclusions with ssa.h inclusion. (CONVERT_HARD_REGISTER_TO_SSA_P): Moved to ssa.h. (rename_registers): Removed unnecessary variables. * ssa.h: Created by moving declarations from ssa.c and basic-block.h. * timevar.def: Defined TV_DEAD_CODE_ELIM. * toplev.c: Added ssa.h inclusion. (dump_file_index): Added DFI_dce. (dump_file): Added "dce" entry. Defined flag_ssa. (f_options): Added dce entry. * invoke.texi: Document -fdce. Emphasize experimental status of -fssa. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35419 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (ssa.o): Updated header files in dependences.mmitchel2000-07-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h: Added compute_immediate_postdominators declaration. * config/i386/i386.h (CONVERT_HARD_REGISTER_TO_SSA_P): Added definition. * flow.c (compute_immediate_dominators): Updated comment. (compute_immediate_postdominators): Added definition. * rtl.h (HARD_REGISTER_P): Added definition. * ssa.c: Include additional header files. (assert): Added definition. (ssa_rename_to_lookup): Added to reimplement ssa_rename_to to include select hard registers. (ssa_rename_to_insert): Likewise. (ssa_rename_from_initialize): Likewise. (ssa_rename_from_lookup): Likewise. (original_register): Likewise. (ssa_rename_from_insert): Added to reimplement ssa_rename_from to include select hard reigsters. (ssa_rename_from_traverse): Likewise. (ssa_rename_from_free): Likewise. (ssa_rename_from_print): Likewise. (ssa_rename_from_print_1): Likewise. (ssa_rename_from_hash_function): Likewise. (ssa_rename_from_equal): Likewise. (ssa_rename_from_delete): Likewise. (simplify_to_immediate_dominators): Removed in favor of flow.c:compute_immediate_dominators. (find_evaluations_1): Modified to work with hard registers. (insert_phi_node): Likewise. (insert_phi_nodes): Likewise. (struct rename_set_data): Updated prev_reg comment. (create_delayed_rename): Modified to work with hard registers. (RENAME_NO_RTX): Updated comment. (apply_delayed_renames): Modified to work with hard registers. (rename_insn_1): Likewise and added handling of CLOBBER rtls. (rename_block): Updated to use revised ssa_rename_to interface. (rename_registers): Updated to use revised ssa_rename_to and ssa_rename_from interface. (convert_to_ssa): Revised to use compute_immediate_dominators and deal with hard registers. (make_regs_equivalent_over_bad_edges): Modified to work with hard registers. Added check for illegal unification of hard register. (make_equivalent_phi_alternatives_equivalent): Modified to work with hard registers. (compute_conservative_reg_partition): Likewise. (coalesce_if_unconflicting): Modified to work with hard registers and check for conflicting hard registers. (mark_phi_and_copy_regs): Revised loop to work only on pseudo registers. (rename_equivalent_regs_in_insn): Modified to work with hard registers. (record_canonical_element_1): Added definition. (check_hard_regs_in_partition): Added definition. (convert_from_ssa): Added data structure deallocation and check for illegal hard register unification. (conflict_hard_regs_p): Added definition. * toplev.c (rest_of_compilation): Added comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35384 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (struct loops): New field rc_order.m.hayes2000-07-301-0/+5
| | | | | | | | | | | * flow.c (flow_loops_cfg_dump): Dump rc_order if computed. (flow_loops_free): Free rc_order. (flow_depth_first_order_compute): New parameter rc_order. (flow_loops_find): Allocate rc_order and swap usage with dfs_order. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35342 138bc75d-0d04-0410-961f-82ee72b054a4
* * ifcvt.c (EDGE_COMPLEX): Move definition ...wehle2000-06-141-0/+2
| | | | | | | | | | * basic-block.h (EDGE_COMPLEX): ... here. * loop.c (check_dbra_loop): Specify the register when generating REG_NONNEG notes and don't generate duplicates. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34542 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix formatting of commentkenner2000-05-311-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34293 138bc75d-0d04-0410-961f-82ee72b054a4
* * bb-reorder.c (reorder_block_def): Reorder elements for size.rth2000-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove add_jump; add next; replace flags with visited. (rbd_init): Remove. (REORDER_BLOCK_HEAD, REORDER_BLOCK_VISITED): Remove. (REORDER_BLOCK_FLAGS, REORDER_BLOCK_INDEX): Remove. (REORDER_BLOCK_ADD_JUMP, REORDER_BLOCK_EFF_HEAD): Remove. (REORDER_BLOCK_EFF_END, REORDER_BLOCK_SCOPE): Remove. (RBI): New. (reorder_index, reorder_last_visited): Remove. (skip_insns_after_block): Rewrite to use a switch. (get_common_dest): Remove. (chain_reorder_blocks): Remove. (record_effective_endpoints): Split out from reorder_basic_blocks. (make_reorder_chain): Likewise. Loop until all blocks are placed. (make_reorder_chain_1): Renamed from old make_reorder_chain. Only construct the reorder chain, do not move insns. Try harder to tail recurse. (label_for_bb, emit_jump_to_block_after): New. (fixup_reorder_chain): Use them. Do bulk block movement. Examine and adjust the jump insns appropriately. Fixup basic_block_info. (verify_insn_chain): Always define. (relate_bbs_with_scopes): Call xmalloc, not xcalloc. Fix thinko in allocation size. (make_new_scope): Don't write zeros to calloc'd space. (build_scope_forest): Rely on xrealloc to DTRT. (reorder_basic_blocks): Don't build loop nest. Don't fail if profile_arc_flag. Streamline EH test. * flow.c (redirect_edge_succ, redirect_edge_pred): New. * basic-block.h: Declare them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34186 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.kenner2000-05-191-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * reload.c (find_equiv_reg): Likewise. * alias.c (init_alias_analysis): Likewise. Only call prologue_epilogue_contains on insns. * basic-block.h (REG_SET_TO_HARD_REG_SET): Call new function. * bb-reorder.c (hard-reg-set.h): Include earlier. * haifa-sched.c (hard-reg-set.h): Likewise. * ifcvt.c (hard-reg-set.h): Likewise. * local-alloc.c (hard-reg-set.h): Likewise. * loop.c (hard-reg-set.h): Likewise. * predict.c (hard-reg-set.h): Likewise. * regrename.c (hard-reg-set.h): Likewise. * flow.c (hard-reg-set.h): Likewise. (reg_set_to_hard_reg_set): New function. * bitmap.c (regs.h, basic-block.h): No longer include. (bitmap.h): Now include. * conflict.c (hard-reg-set.h): Include. * profile.c (hard-reg-set.h): Likewise. * print-rtl.c (hard-reg-set.h): Likewise. * sbitmap.c (hard-reg-set.h): Likewise. * toplev.c (hard-reg-set.h): Likewise. * unroll.c (hard-reg-set.h, basic-block.h): Likewise. * hard-reg-set.h (reg_names): Now constant. * regs.h (reg_names): Likewise. * regclass.c (reg_names): Likewise. * loop.h (basic-block.h): No longer include. (bitmap.h): Now include. * reload1.c (order_regs_for_reload): Avoid loop over reg sets. * Makefile.in (LOOP_H, sbitmap.o, profile.o): Reflect above changes. (toplev.o, print-rtl.o, conflict.o, unroll.o, bitmap.o): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34039 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (struct edge_def): New field "count".rth2000-05-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct basic_block_def): Likewise. * flow.c (entry_exit_blocks): Add count fileds. (split_edge): Keep count information up-to-date. (dump_edge_info, dump_flow_info): Dump count fields. * final.c (count_instrumented_edges): Rename to edge from arc. (end_final): Update users. * profile.c: Include expr.h, basic-block.h. (struct adj_list, ARC_TARGET, ARC_SOURCE, ARC_COUNT): Kill. (struct bb_info, label_to_bb, label_to_bb_size, bb_graph): Kill. (ignore_next_note, return_label_execution_count): Kill. (bbg_file_name, da_file_name): Kill. (edge_info, bb_info): New structures. (EDGE_INFO, BB_INFO, GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX): New macros. (count_instrumented_edges, total_num_edges): Rename to edge from arc. (total_num_edges_instrumented): Likewise. (init_arc, expand_spanning_tree): Kill. (fill_spanning_tree, tablejump_entry_p): Kill. (instrument_edges): Rewrite from instrument_arcs to use commit_edge_insertions infrastructure. (compute_branch_probabilities): Remove arguments; rewrite for CFG infrastructure; use rtl_dump_file directly. (branch_prob, find_spanning_tree): Likewise. (union_groups, find_group): New. (init_branch_prob): Make bbg_file_name and da_file_name local. (end_branch_prob): Use rtl_dump_file directly. (init_edge_profiler): Rename to edge from arc. (output_arc_profiler): Kill. (gen_edge_profiler): New. (output_func_start_profiler): Turn off profiling. Make the constructor static when we can. * rtl.h (branch_prob, end_branch_prob): Update prototypes. * toplev.c (DFI_flow): Remove. (DFI_cfg, DFI_life): New. (dump_file): Update accordingly. (compile_file): Call end_branch_prob if profile_arc_flag too. (rest_of_compilation): Move flow1 cfg creation to DFI_cfg. Do edge profiling after the CFG is built. Move flow1 life analysis to DFI_life. Always estimate remaining probabilities. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34037 138bc75d-0d04-0410-961f-82ee72b054a4
* * toplev.c (rest_of_compilation): Don't call optimize_mode_switchingrth2000-05-171-1/+1
| | | | | | | | | | | unless OPTIMIZE_MODE_SWITCHING. Conditionally set no_new_pseudos. Don't call recompute_reg_usage if no_new_pseudos is true. * lcm.c (optimize_mode_switching): Move ifdefs outside function. Return true if we did work; update global life information. * basic-block.h (optimize_mode_switching): Update decl. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33965 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (propagate_one_insn): Break out from propagate_block.rth2000-04-271-0/+7
| | | | | | | | | | (init_propagate_block_info): Likewise. (free_propagate_block_info): Likewise. (propagate_block): Use them. Export. * basic-block.h: Declare them all. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33460 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (life_analysis): Declare here ...rth2000-04-271-0/+1
| | | | | | | | | | | | | | * output.h: ... not here. * flow.c (life_analysis): Remove nregs parameter; replace remove_dead_code with flags. Remove ssa dead code check. Only init alias analysis if we'll use it. * reg-stack.c (reg_to_stack): Update life_analysis arguments. * ssa.c (convert_to_ssa): Likewise. (convert_from_ssa): Likewise. * toplev.c (rest_of_compilation): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33459 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (flow_delete_block): Rename from delete_block. Export.rth2000-04-271-0/+1
| | | | | | | * basic-block.h (flow_delete_block): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33458 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (expand_builtin_expect): New.rth2000-04-171-0/+1
| | | | | | | | | | | | | | | | | | | | | (expand_builtin): Call it. * builtins.def (BUILT_IN_EXPECT): New. * c-common.c (c_common_nodes_and_builtins): Declare __builtin_expect. * extend.texi: Document it. * predict.c (expected_value_to_br_prob): New. (find_expected_value): New. * basic-block.h (expected_value_to_br_prob): Declare. * toplev.c (rest_of_compilation): Invoke it. * rtl.h (NOTE_EXPECTED_VALUE): New. (NOTE_INSN_EXPECTED_VALUE): New. * rtl.c (note_insn_name): Update. * print-rtl.c (print_rtx): Reorg NOTE_LINE_NUMBER special cases; handle NOTE_INSN_EXPECTED_VALUE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33211 138bc75d-0d04-0410-961f-82ee72b054a4
* * ssa.c (convert_to_ssa): Eliminate dead code when callingsamuel2000-04-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | life_analysis. (convert_from_ssa): Call compute_bb_for_insn before life_analysis. (for_each_successor_phi): Change parameter to basic_block. (coalesce_regs_in_successor_phi_nodes): Likewise. (coalesce_regs_in_copies): Likewise. (compute_coalesced_reg_partition): Use basic_block instead of index. * rtl.h (convert_to_ssa): Delete. (convert_from_ssa): Likewise. (successor_phi_fn): Likewise. (for_each_successor_phi): Likewise. (in_ssa_form): Likewise. * basic-block.h (convert_to_ssa): Moved from rtl.h. (convert_from_ssa): Likewise. (successor_phi_fn): Likewise. (in_ssa_form): Likewise. (for_each_successor_phi): Likewise. Change parameter to basic_block. * flow.c (calculate_global_regs_live): Pass a basic_block to for_each_successor_phi. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33032 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (conflict_graph_enum_fn): K&R fix.ghazi2000-04-081-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33021 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (merge_blocks_nomove): Declare.rth2000-04-071-1/+3
| | | | | | | | | | (tidy_fallthru_edge): Declare. * flow.c (merge_blocks_nomove): Document as merging into previous blocks. Remove cruft from between blocks; remove all edges out of A. (tidy_fallthru_edge): Export. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32994 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (INSN_P): New macro.samuel2000-04-061-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (successor_phi_fn): New typedef. (for_each_successor_phi): New prototype. (in_ssa_form): New variable. (PHI_NODE_P): Likewise. * flow.c (calculate_global_regs_live): Add to new_live_at_end from phi nodes in successors. (mark_used_regs): Add PHI case. (set_phi_alternative_reg): New function. (life_analysis): Assert that dead code elimination is not selected when in SSA form. * toplev.c (to_ssa_time): New variable. (from_ssa_time): Likewise. (compile_file): Zero to_ssa_time and from_ssa_time. Print time to convert to and from SSA. (rest_of_compilation): Time convert_to_ssa and convert_from_ssa. (print_time): Compute percent fraction as integer. * ssa.c (PHI_NODE_P): Moved to rtl.h. (convert_to_ssa): Check if we're already in SSA. Don't eliminate dead code in life_analysis. Rerun flow and life analysis at bottom. (eliminate_phi): Use canonical regnos when adding nodes. (mark_reg_in_phi): New function. (mark_phi_and_copy_regs): Likewise. (convert_from_ssa): Rerun life analysis at top. Use coalesced partition. Check for removing a phi node at the end of the block. (compute_coalesced_reg_partition): New function. (coalesce_regs_in_copies): Likewise. (coalesce_reg_in_phi): Likewise. (coalesce_regs_in_sucessor_phi_nodes): Likewise. (for_each_successor_phi): Likewise. (rename_context): New struct. (rename_block): Use a rename_context with rename_insn_1. When renaming sets of a subreg, emit a copy of the entire reg first. (rename_insn_1): Treat data as a rename_context *. Save current insn in set_data. (rename_set_data): Add field set_insn. * Makefile.in (HASHTAB_H): Move up in file. (OBSTACK_H): New macro. (collect2.o): Use OBSTACK_H in dependencies. (sdbout.o): Likewise. (emit-rtl.o): Likewise. (simplify-rtx.o): Likewise. (fix-header.o): Likewise. (OBJS): Add conflict.o. (conflict.o): New rule. * basic-block.h: Include partition.h. (conflict_graph): New typedef. (conflict_graph_enum_fn): Likewise. (conflict_graph_new): New prototype. (conflict_graph_delete): Likewise. (conflict_graph_add): Likewise. (conflict_graph_conflict_p): Likewise. (conflict_graph_enum): Likewise. (conflict_graph_merge_regs): Likewise. (conflict_graph_print): Likewise. (conflict_graph_compute): Likewise. * conflict.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32979 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (verify_flow_info): Declare.law2000-04-051-0/+6
| | | | | | | | | (flow_loop_outside_edge_p): Declare. * flow.c (verify_flow_info): Remove declaration. (clear_log_links, flow_loop_outside_edge_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32932 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c: Move all basic block reordering code into its own file.jle2000-03-161-0/+1
| | | | | | | | | | | | | (create_basic_block): Externalize. * bb-reorder.c: New file. Copy all basic block reordering code from flow.c to this file. (reorder_basic_blocks): Fix fencepost error in for-loop. (reorder_basic_blocks): Remove braces from single statement for-loops. * basic-block.h: Add declaration for create_basic_block. * Makefile.in: Add rules for bb-reorder.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32585 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (ALLOCA_REG_SET): Remove.mmitchel2000-03-051-2/+2
| | | | | | | | | | | | (INITIALIZE_REG_SET): New macro. * flow.c (update_life_info): Use it. (calculate_global_regs_live): Likewise. (propagate_block): Likewise. * global.c (build_insn_chain): Likewise. * haifa-sched.c (schedule_region): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32350 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (dump_regset, debug_regset, dump_bb, debug_bb,zack2000-02-171-0/+5
| | | | | | | | | debug_bb_n): New functions. (dump_flow_info, print_rtl_with_bb): Use dump_regset. * basic-block.h: Prototype new functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32024 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (lcm.o): Depend on insn-attr.h.amylaar2000-02-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic-block.h (optimize_mode_switching): Declare. * lcm.c (tm_p.h, insn-attr.h): #include. (seginfo, bb_info): New structs. (antic, transp, comp, delete, insert) : New file-scope static variables. (new_seginfo, add_seginfo, make_preds_opaque, reg_dies): New functions. (reg_becomes_live, optimize_mode_switching): Likewise. * tm.texi: Add description of mode switching macros. * toplev.c (rest_of_compilation): Call optimize_mode_switching. * sh-protos.h (remove_dead_before_cse): Remove prototype. (fldi_ok, fpscr_set_from_mem): New prototypes. * sh.h (OPTIMIZATION_OPTION): Remove sh_flag_remove_dead_before_cse set. (CONST_DOUBLE_OK_FOR_LETTER_P, SECONDARY_INPUT_RELOAD_CLASS): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD). (sh_flag_remove_dead_before_cse): Remove declaration. (NUM_MODES_FOR_MODE_SWITCHING, OPTIMIZE_MODE_SWITCHING): New macros. (MODE_USES_IN_EXIT_BLOCK, MODE_NEEDED, MODE_AT_ENTRY): Likewise. (MODE_PRIORITY_TO_MODE, EMIT_MODE_SET): Likewise. * sh.c (broken_move): Disable fldi for (TARGET_SH4 && ! TARGET_FMOVD). (barrier_align): Allow for JUMP_INSNS containing a parallel. (machine_dependent_reorg): Remove sh_flag_remove_dead_before_cse set. (fldi_ok): New function. (get_fpscr_rtx): Add fpscr_rtx as GC root. (emit_sf_insn): Only generate fpu switches when optimize < 1. (emit_df_insn): Likewise. (expand_fp_branch, emit_fpscr_use, remove_dead_before_cse): Delete. (sh_flag_remove_dead_before_cse): Delete. (get_free_reg, fpscr_set_from_mem): New functions. * sh.md (movdf, movsf): Remove no_new_pseudos code. (return): Remove emit_fpscr_use / remove_dead_before_cse calls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31990 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic_block.h: Added prototype for reorder_basic_blocks.jle2000-02-141-0/+4
| | | | | | | | | | | | | | * toplev.c: Changes to add -freorder-blocks and graph dump after block reordering is done. * flow.c (reorder_block_def): New structure for use during block reordering. (REORDER_BLOCK_*): New macros to access members of above structure. (skip_insns_between_block, get_common_dest, chain_reorder_blocks, make_reorder_chain, fixup_reorder_chain, reorder_basic_blocks): New functions for block reordering. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31968 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h (FLOW_LOOP_FIRST_BLOCK, FLOW_LOOP_LAST_BLOCK): Delete.m.hayes2000-02-121-2/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31947 138bc75d-0d04-0410-961f-82ee72b054a4
* * flow.c (flow_delete_insn, make_edge, remove_edge): Export.rth2000-02-061-0/+4
| | | | | | | | | | | | | | | * basic-block.h: Declare them. * emit-rtl.h (active_insn_p): New. (next_active_insn, prev_active_insn): Use it. * rtl.h: Declare it. * function.c (emit_return_into_block): New. (thread_prologue_and_epilogue_insns): Insert return insns instead of epilogues when possible. * jump.c (jump_optimize_1): Remove code to insert a return insn on the fallthru to the exit block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31826 138bc75d-0d04-0410-961f-82ee72b054a4
* Fri Jan 7 19:48:04 CET 2000 Jan Hubicka <jh@suse.cz>jle2000-01-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | * sbitmap.c (sbitmap_first_set_bit, sbitmap_last_set_bit): New function. * sbitmap.h (sbitmap_first_set_bit, sbitmap_last_set_bit): Declare. * basic_block.h (FLOW_LOOP_FIRST_BLOCK): New macro. (FLOW_LOOP_LAST_BLOCK): Likewise. 2000-01-21 Michael Hayes <m.hayes@elec.canterbury.ac.nz> * basic-block.h (struct loop): New fields 'first' and 'last'. * flow.c (flow_loops_find): Compute loop->first and loop->last. (flow_loops_dump): Use loop->first to check for NOTE_INSN_LOOP_BEG and loop->last to check for NOTE_INSN_LOOP_END. Fri Jan 28 10:57:58 2000 Jason Eckhardt <jle@cygnus.com> * predict.c (estimate_probability): Use the new FIRST and LAST fields of the loop descriptor rather than HEADER and LATCH. Also added missing break statements as well making some coding style modifications as suggested by Michael Hayes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31679 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-01-25 Michael Hayes <m.hayes@elec.canterbury.ac.nz>m.hayes2000-01-251-1/+1
| | | | | | | | | | | * loop.h (LOOP_INFO): New accessor macro. * basic-block.h (struct loop): Rename field `info' to `aux'. * loop.c (scan_loop): Replace loop->info with LOOP_INFO (loop). (prescan_loop, strength_reduce, check_dbra_loop, insert_bct): Likewise. * unroll.c (loop_iterations, unroll_loop): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31596 138bc75d-0d04-0410-961f-82ee72b054a4
* 2000-01-24 Michael Hayes <m.hayes@elec.canterbury.ac.nz>m.hayes2000-01-231-0/+3
| | | | | | | | | | | * basic-block.h (struct loops): New field `levels'. * flow.c (flow_loops_level_compute): Traverse all outer loops. (flow_loop_level_compute): Initialise level to 1. (flow_loops_find): Set loops->levels. (flow_loops_dump): Print loops->levels. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31577 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (this_loop_info): Delete.m.hayes2000-01-151-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (uid_loop): Add in place of uid_loop_num. All uses updated. (loop_number_exit_count): Delete and replace with entry in loop structure. All uses updated. (loop_number_loop_starts, loop_number_loop_ends): Likewise. (loop_number_loop_cont, loop_number_cont_dominator): Likewise. (loop_outer_loop): Likewise. (loop_invalid, loop_number_exit_labels): Likewise. (loop_used_count_register): Delete and replace with entry in loop_info structure. (find_and_verify_loops): Add loops argument. (verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start, loop_end, etc. arguments with loop structure pointer. All callers changed. (loop_reg_used_before_p, scan_loop, strength_reduce): Likewise. (check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise. (load_mems_and_recount_loop_regs_set, load_mems): Likewise. (insert_bct): Likewise. (basic_induction_var): New argument level. * loop.h (struct loop_info): Delete fields num, loops_enclosed, vtop, and cont. Add used_count_register. (uid_loop): Delete declaration. (loop_number_exit_count): Likewise. (loop_number_loop_starts, loop_number_loop_ends): Likewise. (loop_number_loop_cont, loop_number_cont_dominator): Likewise. (loop_outer_loop, loop_used_count_register): Likewise. (loop_invalid, loop_number_exit_labels): Likewise. (unroll_loop): Replace loop_start and loop_end arguments with loop structure pointer. (loop_precondition_p, loop_iterations): Likewise. Include basic-block.h. * unroll.c: (unroll_loop): Replace loop_start and loop_end arguments with loop structure pointer. (loop_precondition_p, loop_iterations): Likewise. * basic-block.h (struct loop): New entries vtop, cont, cont_dominator, start, end, top, scan_start, exit_labels, exit_count. * Makefile.in (LOOP_H): Add basic-block.h to dependencies. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31434 138bc75d-0d04-0410-961f-82ee72b054a4