aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
AgeCommit message (Collapse)AuthorFilesLines
2000-05-31flow.c (merge_blocks_nomove): Remove a barrier not following a jump as well.Richard Henderson1-0/+2
* flow.c (merge_blocks_nomove): Remove a barrier not following a jump as well. From-SVN: r34315
2000-05-31flow.c (propagate_block): Move initialization of mem_set_list ...Richard Henderson1-21/+27
* flow.c (propagate_block): Move initialization of mem_set_list ... (init_propagate_block_info): ... here. Also track blocks with no successors; don't scan insns if ! PROP_SCAN_DEAD_CODE. From-SVN: r34310
2000-05-31flow.c (propagate_block): If block has no successors, stores to frame are ↵Richard Kenner1-0/+20
dead if not used. * flow.c (propagate_block): If block has no successors, stores to frame are dead if not used. From-SVN: r34296
2000-05-29flow.c (mark_used_reg): If a register is unconditionally live, remove any ↵Richard Earnshaw1-0/+18
conditional death information. * flow.c (mark_used_reg): If a register is unconditionally live, remove any conditional death information. From-SVN: r34259
2000-05-26flow.c (find_label_refs): New function.Richard Earnshaw1-5/+55
* flow.c (find_label_refs): New function. (find_basic_blocks_1): Call it for each alternative of a call placeholder. From-SVN: r34193
2000-05-25bb-reorder.c (reorder_block_def): Reorder elements for size.Richard Henderson1-0/+40
* bb-reorder.c (reorder_block_def): Reorder elements for size. 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. From-SVN: r34186
2000-05-25* flow.c (mark_set_1): Don't record conditionally dead memory.Richard Henderson1-0/+2
From-SVN: r34176
2000-05-25combine.c (try_combine): Use any_condjump_p...Jan Hubicka1-4/+4
* combine.c (try_combine): Use any_condjump_p, any_uncondjump_p and pc_set at the place of simplejump_p and condjump_p. * cse.c (record_jump_equiv): Likewise. * emit-rtl.c (emit): Likewise. * explow.c (find_next_ref): Likewise. * flow.c (tidy_fallthru_edge): Likewise. (init_propagate_block_info): Likewise. * gcse.c (delete_null_pointer_checks): Likewise. * ifcvt.c (cond_exec_get_condition, noce_get_condition, dead_or_predicable): Likewise. * integrate.c (copy_insn_list): Likewise. * loop.c (scan_loop, verify_dominator, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, get_condition, insert_bct, load_mems): Likewise. * resource.c (find_dead_or_set_registers): Likewise. * sibcalls.c (simplejump_p): Likewise. * unroll.c (copy_loop_body, reg_dead_after_loop): Likewise. From-SVN: r34175
2000-05-19cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.Richard Kenner1-1/+25
* cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0. * 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. From-SVN: r34039
2000-05-19basic-block.h (struct edge_def): New field "count".Jan Hubicka1-7/+14
* basic-block.h (struct edge_def): New field "count". (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. Co-Authored-By: Richard Henderson <rth@cygnus.com> From-SVN: r34037
2000-05-19* flow.c (make_edges): The sibling call edge to exit is abnormal.Richard Henderson1-1/+2
From-SVN: r34035
2000-05-19jump.c (redirect_jump): Add delete_unused argument.Richard Henderson1-1/+1
* jump.c (redirect_jump): Add delete_unused argument. Don't remove labels and code following when LABEL_NUSES goes to zero. (invert_jump): Likewise. (jump_optimize_1): Fix redirect/invert arguments. (do_cross_jump, thread_jumps): Likewise. * flow.c (split_edge): Likewise. * reorg.c (optimize_skip): Likewise. (reorg_redirect_jump, relax_delay_slots, dbr_schedule): Likewise. * profile.c (instrument_arcs): Likewise. * loop.c (find_and_verify_loops): Likewise. Fix indentation. * rtl.h: Update prototypes. From-SVN: r34033
2000-05-16flow.c (commit_one_edge_insertion): Be prepared for a return insn to be ↵Richard Henderson1-28/+32
inserted on the edge with a normal jump. * flow.c (commit_one_edge_insertion): Be prepared for a return insn to be inserted on the edge with a normal jump. * jump.c (jump_optimize_1): Don't look to create return isns. * flow.c (flow_delete_insn): Don't adjust reference count of notes. * jump.c (jump_optimize_1): Likewise. (returnjump_p): Verify the argument is a JUMP_INSN. * rtl.def (NOTE): Add 5th element for NOTE_INSN_DELETED_LABEL. From-SVN: r33950
2000-05-12Makefile.in (final.o): Depend on BASIC_BLOCK_H.Richard Henderson1-59/+68
* Makefile.in (final.o): Depend on BASIC_BLOCK_H. * final.c (final_end_function): Use app_disable. Rearrange note handling into a switch. Emit deleted labels. (output_asm_label): Generate label strings for deleted labels. * flow.c (tail_recursion_label_list): New. (find_basic_blocks_1): Set label_value_list directly. Collect list of tail recursion labels from call_placeholders. Don't add deleted labels to the label value list. (cleanup_cfg): Use free_EXPR_LIST_list. (flow_delete_insn_chain): Turn non-removable labels into notes. (flow_delete_block): Don't disable deleting the block because of a non-removable label. (tail_recursion_label_p): New. (merge_blocks_move_predecessor_nojumps): Don't disable the merge because of a label. (merge_blocks_move_successor_nojumps): Likewise. Also move a jump table. (merge_blocks): Disable a merge because of tail recursion labels. * ifcvt.c (merge_if_block): Don't disable a merge because of a label. Use a more accurate measure of not merging the join block. (find_if_block): Don't disable conversion because of a label. (find_if_case_1, find_if_case_2): Likewise. * jump.c (duplicate_loop_exit_test): Preserve the kind of list element when copying. (squeeze_notes): Also leave EH notes. (mark_jump_label): Ignore deleted labels. Use an INSN_LIST for REG_LABEL notes. (delete_insn): Preserve LABEL_NAME in NOTE_SOURCE_FILE when deleting a label. * print-rtl.c (print_rtx): Print NOTE_SOURCE_FILE for NOTE_INSN_DELETED_LABEL. Print `[# deleted]' for a label_ref referring to a deleted label. Convert tail handling to a switch. * rtl.def (CODE_LABEL): Rearrange elements to be compatible with NOTE for NOTE_INSN_DELETED_LABEL. (NOTE): Fix commentary. * rtl.h (REG_LABEL): Update commentary wrt INSN_LIST. (REG_CC_SETTER, REG_CC_USER, REG_LIBCALL): Likewise. (CODE_LABEL_NUMBER, LABEL_NAME): Update index. (LABEL_NUSES, LABEL_REFS): Likewise. * unroll.c (copy_loop_body): Don't copy NOTE_INSN_DELETED_LABEL. From-SVN: r33876
2000-05-10Do not bias REG_N_REFS by loop_depth when optimising for size.Nick Clifton1-3/+6
From-SVN: r33833
2000-05-10flow.c (find_basic_blocks_1): Remove any spare bb_note after completion.Richard Henderson1-0/+2
* flow.c (find_basic_blocks_1): Remove any spare bb_note after completion. From-SVN: r33826
2000-05-09flow.c (find_basic_blocks_1): Do not delete the first bb_note we run across.Richard Henderson1-4/+9
* flow.c (find_basic_blocks_1): Do not delete the first bb_note we run across. (create_basic_block): Use reorder_insns to move an existing bb_note to the correct place. From-SVN: r33814
2000-05-09flow.c (flow_delete_insn): Use INSN_DELETED_P for marking insn as deleted.Denis Chertykov1-1/+2
* flow.c (flow_delete_insn): Use INSN_DELETED_P for marking insn as deleted. From-SVN: r33803
2000-05-08flow.c (init_propagate_block_info): Watch out for conditional branch to next ↵Richard Henderson1-6/+19
instruction, and thus one outgoing edge. * flow.c (init_propagate_block_info): Watch out for conditional branch to next instruction, and thus one outgoing edge. From-SVN: r33775
2000-05-06flow.c (mark_set_1): Don't update conditional life info if the register is ↵Richard Henderson1-1/+1
not_dead. * flow.c (mark_set_1): Don't update conditional life info if the register is not_dead. From-SVN: r33749
2000-05-06Add imssing blank lineRichard Kenner1-0/+1
From-SVN: r33744
2000-05-06* flow.c (mark_set_1): Respect not_dead when updating reg_live.Richard Henderson1-0/+1
From-SVN: r33736
2000-05-06flow.c (split_edge): Don't allocate global_live_at_start for the new block ↵Richard Henderson1-7/+2
unless... * flow.c (split_edge): Don't allocate global_live_at_start for the new block unless the old blocks had them as well. From-SVN: r33735
2000-05-05flow.c (init_propagate_block_info): Fix merge error in ↵Richard Henderson1-2/+2
HAVE_conditional_execution code. * flow.c (init_propagate_block_info): Fix merge error in HAVE_conditional_execution code. From-SVN: r33705
2000-05-03flow.c (propagate_one_insn): Also don't PROP_REG_INFO for call-clobbered ↵Richard Henderson1-1/+2
registers of a call. * flow.c (propagate_one_insn): Also don't PROP_REG_INFO for call-clobbered registers of a call. From-SVN: r33634
2000-05-03flow.c (verify_flow_info): Added two more sanity checks.Jason Eckhardt1-1/+17
Tue May 2 00:20:30 2000 Jason Eckhardt <jle@cygnus.com> * flow.c (verify_flow_info): Added two more sanity checks. The first checks that the blocks are numbered consecutively. The second checks that n_basic_blocks is actually equal to the number of basic blocks in the insn chain. From-SVN: r33632
2000-05-01flow.c (calculate_global_regs_live): Skip for_each_successor_phi if not in ↵Richard Henderson1-2/+3
SSA form. * flow.c (calculate_global_regs_live): Skip for_each_successor_phi if not in SSA form. From-SVN: r33597
2000-05-01* flow.c (propagate_one_insn): Mark sets even when the insn is dead.Richard Henderson1-5/+9
From-SVN: r33564
2000-04-30flow.c (struct reg_cond_life_info): New.Richard Henderson1-0/+431
* flow.c (struct reg_cond_life_info): New. (struct propagate_block_info): Add reg_cond_dead and reg_cond_reg. (init_propagate_block_info): Initialize them. (free_propagate_block_info): Destruct them. (mark_set_1): Consider conditional life before killing a register. (mark_regno_cond_dead): New. (free_reg_cond_life_info): New. (flush_reg_cond_reg_1, flush_reg_cond_reg): New. (ior_reg_cond, not_reg_cond, nand_reg_cond): New. (mark_used_reg): Record conditional life. * haifa-sched.c (schedule_insns): Disable death counting sanity check for HAVE_conditional_execution. From-SVN: r33544
2000-04-27* function.c (epilogue_done): Pass whole insn to record_insns.Jan Hubicka1-0/+2
From-SVN: r33488
2000-04-27flow.c (struct propagate_block_info): Remove new_dead, new_live; add new_set.Richard Henderson1-72/+118
* flow.c (struct propagate_block_info): Remove new_dead, new_live; add new_set. (propagate_one_insn): Clear it. Don't update reg_live here. (init_propagate_block_info): Update for pbi member changes. (free_propagate_block_info): Likewise. (mark_set_1): Know that zero_extract, sign_extract, and strict_low_part don't kill their argument. Alter hard subregs. Update new_set for non-CLOBBER sets. Update reg_live. (find_auto_inc): Update reg_live, not new_dead. (mark_used_reg): Update reg_live, not new_live. Examine new_set to determine if the reg in question was set this insn. Only update reg info with PROP_REG_INFO. From-SVN: r33478
2000-04-27flow.c (calculate_global_regs_live): Force stack pointer live at end.Richard Henderson1-0/+4
* flow.c (calculate_global_regs_live): Force stack pointer live at end. From-SVN: r33476
2000-04-27flow.c (allocate_reg_life_data): Set max_regno here ...Richard Henderson1-2/+2
* flow.c (allocate_reg_life_data): Set max_regno here ... (life_analysis): ... not here. From-SVN: r33475
2000-04-27flow.c (count_reg_sets_1): Remove.Richard Henderson1-269/+2
* flow.c (count_reg_sets_1): Remove. (count_reg_sets, count_reg_references): Remove. (recompute_reg_usage): Implement with update_life_info. Reallocate life data. From-SVN: r33470
2000-04-27flow.c (update_life_info): Consider blocks null to mean the universal set.Richard Henderson1-27/+66
* flow.c (update_life_info): Consider blocks null to mean the universal set. (calculate_global_regs_live): Likewise. (life_analysis): Do that instead of collecting all_blocks. From-SVN: r33469
2000-04-26flow.c (tidy_fallthru_edge): Don't delete the jump when it's a still-valid ↵Richard Henderson1-1/+3
conditional jump. * flow.c (tidy_fallthru_edge): Don't delete the jump when it's a still-valid conditional jump. From-SVN: r33468
2000-04-26jump.c (invert_jump): Always invert REG_BR_PROB.Richard Henderson1-17/+0
* jump.c (invert_jump): Always invert REG_BR_PROB. Do it correctly. * bb-reorder.c (reorder_basic_blocks): Don't run estimate_probability. * flow.c (calculate_loop_depth): Remove. * output.h (calculate_loop_depth): Don't declare. * toplev.c (rest_of_compilation): Expand calculate_loop_depth inline; run estimate_probability at the same time. From-SVN: r33464
2000-04-26flow.c (mark_set_1): New arguments code and flags; update all callers.Richard Henderson1-134/+86
* flow.c (mark_set_1): New arguments code and flags; update all callers. Track regno_first and regno_last; do HARD_REGNO_NREGS test in one place. Tidy flags tests. Don't bias REG_N_REFS by loop_depth when optimizing for size. Do new_dead update after emitting REG_UNUSED notes. Merge mark_set_reg code. (mark_set_reg): Remove. (propagate_one_insn): Use mark_set_1 for call-clobbered registers; arrange to not emit REG_UNUSED notes. From-SVN: r33462
2000-04-26flow.c (find_auto_inc): Use pbi->bb instead of BLOCK_FOR_INSN.Richard Henderson1-8/+5
* flow.c (find_auto_inc): Use pbi->bb instead of BLOCK_FOR_INSN. * ssa.c (convert_from_ssa): Don't run compute_bb_for_insn. From-SVN: r33461
2000-04-26flow.c (propagate_one_insn): Break out from propagate_block.Richard Henderson1-243/+275
* flow.c (propagate_one_insn): Break out from propagate_block. (init_propagate_block_info): Likewise. (free_propagate_block_info): Likewise. (propagate_block): Use them. Export. * basic-block.h: Declare them all. From-SVN: r33460
2000-04-26basic-block.h (life_analysis): Declare here ...Richard Henderson1-27/+13
* basic-block.h (life_analysis): Declare here ... * 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. From-SVN: r33459
2000-04-26flow.c (flow_delete_block): Rename from delete_block.Richard Henderson1-5/+4
* flow.c (flow_delete_block): Rename from delete_block. Export. * basic-block.h (flow_delete_block): Declare. From-SVN: r33458
2000-04-24regs.h (reg_n_max): Don't declare.Mark Mitchell1-4/+0
* regs.h (reg_n_max): Don't declare. * flow.c (reg_n_max): Don't define. * regclass.c (renumber): Don't initialize to zero. (regno_allocated): Likewise. (reg_n_max): Define. (allocate_reg_info): Don't initialize unnecessarily. From-SVN: r33374
2000-04-22* flow.c (mark_used_reg): Hack around rs6000 eliminable pic reg.Richard Henderson1-3/+6
From-SVN: r33342
2000-04-15flow.c (count_basic_blocks, [...]): Remove last change.Richard Kenner1-33/+16
* flow.c (count_basic_blocks, find_basic_blocks_1): Remove last change. * optabs.c (emit_libcall_block): If have REG_EHG_REGION, update region number to -1. From-SVN: r33164
2000-04-14flow.c (count_basic_blocks): Remove unused var PREV_CALL.Richard Kenner1-72/+75
* flow.c (count_basic_blocks): Remove unused var PREV_CALL. Never have a LIBCALL end a basic block. (find_basic_blocks_1): Likewise. Reorganize CALL_INSN cases. From-SVN: r33154
2000-04-14flow.c (find_auto_inc): Don't autoinc eliminable registers.Richard Henderson1-1/+9
* flow.c (find_auto_inc): Don't autoinc eliminable registers. If the original source is dead in the incr insn, it's dead now. From-SVN: r33150
2000-04-11flow.c (struct propagate_block_info): Add new_dead, new_live.Richard Henderson1-109/+99
* flow.c (struct propagate_block_info): Add new_dead, new_live. (propagate_block): Initialize them. Use them in parallel instead of one tmp variable, ie revert much of the 0408 and 0407 functional changes, but keep the structural changes. (mark_set_regs): Take new_dead from propagate_block_info instead. (mark_set_1, mark_set_reg): Likewise. (mark_used_regs): Likewise with new_live. (mark_used_reg): Likewise. Revert 0408 change. From-SVN: r33089
2000-04-09ssa.c (convert_to_ssa): Eliminate dead code when calling life_analysis.Alex Samuel1-1/+1
* ssa.c (convert_to_ssa): Eliminate dead code when calling 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. From-SVN: r33032
2000-04-08flow.c (mark_used_reg): Use reg_set_p to determine if a register was ↵Richard Henderson1-1/+7
modified in the current insn. * flow.c (mark_used_reg): Use reg_set_p to determine if a register was modified in the current insn. From-SVN: r33030