aboutsummaryrefslogtreecommitdiff
path: root/gcc/flow.c
AgeCommit message (Collapse)AuthorFilesLines
2001-07-31* flow.c (merge_blocks): Return 1 if an extra jump is inserted.John Wehle1-0/+2
From-SVN: r44498
2001-07-30i386.c (ix86_output_main_function_alignment_hack): New function.Jan Hubicka1-1/+94
* i386.c (ix86_output_main_function_alignment_hack): New function. (TARGET_ASM_FUNCTION_PROLOGUE): Default to it. * flow.c (mark_dfs_back_edges): Move from loop_p ; mark back edges by EDGE_DFS_BACK flag. (dump_edge_info): Add dfs_back flag. * basic-block.h (EDGE_DFS_BACK): New constant. (mark_dfs_back_edges): Declare. * alias.c (loop_p): Remove. (mark_constant_function): Use mark_dfs_back_edges. * reg-stack.c (block_info_def): Add predecesors counter and stack_out. (reg_to_stack): Call mark_dfs_back_edges; count the predecesors. (compensate_edge): Break out from ... (convert_regs_1): ... here; do smart choosing of stack_out to copy. (convert_regs_2): Set block_done once block is really done; Do updating of the predecesors counts. * toplev.c (rest_of_compilation): Recompute block_for_insn before post-reload cfg_cleanup. * function.c (thread_prologue_epilogue_insns): Call set_block_for_new_insns when emitting prologue directly. From-SVN: r44486
2001-07-30flow.c (mark_set_1): Use REG_FREQ_FROM_BB.Jan Hubicka1-8/+4
* flow.c (mark_set_1): Use REG_FREQ_FROM_BB. (attempt_auto_inc): LIkewise. (mark_used_reg): Likewise. (try_pre_increment_1): Likewise. * regclass.c (regclass): Likewise. * global.c (allocno_compare): Update comment; change scaling factor. * local-alloc.c (QTY_CMP_PRI): Likewise. * regs.h (REG_FREQ_FROM_BB): New. (REG_FREQ_MAX): Likewise. From-SVN: r44483
2001-07-29basic-block.h (CLEANUP_PRE_LOOP): New.Jan Hubicka1-3/+28
* basic-block.h (CLEANUP_PRE_LOOP): New. * except.c (finish_eh_generation): Update call of cleanup_cfg. * sibcall.c (optimize_sibling_calls): Likewise. * toplev.c (rest_of_compilation): Likewise. * flow.c (try_forward_edges): Take argument MODE; do not forward over loop pre-headers if CLEANUP_PRE_LOOP. (try_optimize_cfg): Update call of try_forward_edges. * (validate_replace_rtx_1): Fix simplification of MINUS. From-SVN: r44458
2001-07-28flow.c (life_analysis): Elide PROP_ALLOW_CFG_CHANGES if not optimizing.Richard Henderson1-1/+1
* flow.c (life_analysis): Elide PROP_ALLOW_CFG_CHANGES if not optimizing. From-SVN: r44451
2001-07-28flow.c (add_to_mem_set_list): New function.Richard Henderson1-70/+66
* flow.c (add_to_mem_set_list): New function. (init_propagate_block_info): Use it. (mark_set_1): Likewise. (insn_dead_p): Canonicalize memory address for dead store comparison. Allow wider mode stores to kill narrower mode stores. (invalidate_mems_from_autoinc): Use invalidate_mems_from_set. (invalidate_mems_from_set): Don't handle MEMs. From-SVN: r44441
2001-07-28basic-block.h (EDGE_FREQUENCY): New macro.Jan Hubicka1-10/+50
* basic-block.h (EDGE_FREQUENCY): New macro. * bb-reorder (fixup_reorder_chain): Set counts and frequencies for new BB/edges. * flow.c (find_sub_basic_blocks): Likewise. (try_crossjump_to_edge): Likewise; use EDGE_FREQUENCY (redirect_edge_and_branch): Use EDGE_FREQUENCY. * predict.c (DEF_PREDICTOR): New argument FLAGS. (HITRATE): New macro. (PRED_FLAG_FIRST_MATCH): New constant. (predictor_info): New field flgags. (combine_predictions_for_insn): Use DS theory to combine probabilities; set the edge probabilities when finished. (estimate_probability): Avoid duplicated matches of LOOP_BRANCH heuristics for nested loops; update comment. * predict.def: Add flags for each prediction, set probabilities according to B&L paper. * predict.h (DEF_PREDICTOR): New argument FLAGS. * profile.c (compute_branch_probabilities): Cleanup way the edge probabilities are computed and REG_BR_PROB notes are dropped; if values does not match, emit error. (init_branch_prob): Do error instead of warning when profile driven feedback is missing or corrupt. From-SVN: r44439
2001-07-27flow.c (last_loop_beg_note): New function.Jan Hubicka1-24/+58
* flow.c (last_loop_beg_note): New function. (redirect_edge_and_branch): Use it. (split_edge): Likewise. * alias.c (loop_p): Avoid uninitialized memory access. * flow.c (try_forward_edges): Avoid accessing freed memory. * flow.c (backward_edge_of_syntactic_loop_p): Avoid uninitialized variable access. From-SVN: r44429
2001-07-27flow.c (redirect_edge_and_branch_force): Test target->global_live_at_start.John Wehle1-1/+1
* flow.c (redirect_edge_and_branch_force): Test target->global_live_at_start. From-SVN: r44412
2001-07-26rtl.h (cleanup_barriers): Declare.Jan Hubicka1-1/+27
* rtl.h (cleanup_barriers): Declare. * jump.c (cleanup_barriers): New function. * toplev.c (rest_of_compilation): Call cleanup_barriers before loop optimizer and after bb_reorder. * flow.c (back_edge_of_syntactic_loop_p): New. (split_edge): Use it. From-SVN: r44409
2001-07-26basic-block.h (PROP_ALLOW_CFG_CHANGES): Define.John Wehle1-4/+45
* basic-block.h (PROP_ALLOW_CFG_CHANGES): Define. (PROP_FINAL): Include PROP_ALLOW_CFG_CHANGES. (propagate_block): Update prototype. * flow.c (update_life_info): Simplify the CFG and recalculate the global regs which are alive when removing dead code during a global update. (propagate_block): Return non-zero if an INSN is deleted. From-SVN: r44403
2001-07-25flow.c (delete_dead_jumptables): New function.Jan Hubicka1-9/+68
* flow.c (delete_dead_jumptables): New function. (life_analyzis): Call it. * bb-reorder.c (skip_insns_after_block): Handle contradictive sequences. From-SVN: r44365
2001-07-25flow.c (find_sub_basic_blocks): Fix handling of the last BB in the sequence.Jan Hubicka1-14/+19
* flow.c (find_sub_basic_blocks): Fix handling of the last BB in the sequence. (make_edges): New argument update_p; populate the edge cache if set. (find_basic_blocks): Update make_edges invocation. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r44335
2001-07-24flow.c (try_simplify_condjump): Avoid duplicated edges.Jan Hubicka1-32/+90
* flow.c (try_simplify_condjump): Avoid duplicated edges. (verify_flow_info): Check for duplicated edges; clarify error reporting. * flow.c (block_label): Update basic_block_for_insn. (commit_edge_insertions): Call compute_bb_for_insn. * flow.c (purge_dead_edges): Handle conditional jumps and conditional returns too. * flow.c (redirect_edge_and_branch, try_optimize_cfg): Use redirect_edge_succ_nodup (redirect_edge_succ_nodup): New. * basic_block.h (redirect_edge_succ_nodup): Declare. * toplev.c (rest_of_compilation): Rebuild CFG before cfg_cleanup after gcse. From-SVN: r44320
2001-07-24flow.c (try_forward_edges): Accept fallthru edge; Update comment.Jan Hubicka1-8/+10
* flow.c (try_forward_edges): Accept fallthru edge; Update comment. (try_crossjump_to_edge): Update commetns. (try_crossjump_bb): Likewise. From-SVN: r44318
2001-07-24* flow.c (delete_noop_moves): Do not confuse libcall regions.Jan Hubicka1-3/+5
From-SVN: r44290
2001-07-23* flow.c (try_simplify_condjump): Use tidy_fallthru_edge.Richard Henderson1-5/+6
From-SVN: r44287
2001-07-23flow.c (try_simplify_condjump): Unlink insn chain on fallthru edge; use ↵Jan Hubicka1-1/+6
can_fallthru. * flow.c (try_simplify_condjump): Unlink insn chain on fallthru edge; use can_fallthru. From-SVN: r44268
2001-07-23basic-block.h (find_sub_basic_block): Declare.Jan Hubicka1-99/+121
* basic-block.h (find_sub_basic_block): Declare. * flow.c (make_edges): New arguments MIN and MAX; (find_sub_basic_blocks): Revamp to use make_edges and purge_dead_edges. (find_basic_blocks): Update call of find_sub_basic_block. * recog.c (split_all_insns): Always expect CFG to be consistent; call find_sub_basic_blocks in case something has changed. * toplev.c (rest_of_compilation): Always call split_all_insns once CFG has been built. * basic-block.h (delete_noop_moves): Declare. * combine.c (combine_instructions): Call it. (recog_for_combine): Tolerate noop moves (distribute_notes): Force refresh when register dies at noop move. * flow.c (delete_noop_moves): Use BB structure; delete JUMP insns too. (life_analysis): Update delete_noop_moves call. (set_noop_p): Move too ... * rtlanal.c (noop_move_p): ... here. * rtl.h (noop_move_p): Declare. * basic-block.h (purge_all_dead_edges, purge_dead_edges): New functions. * toplev.c (rest_of_compilation): Conditionally call purge_all_dead_edges after combine. * gcse.c (cprop_cc0_jump, cprop_insn): New argument "basic_block". (cprop_jump): Likewise; call purge_dead_edges if substitution suceeded. From-SVN: r44267
2001-07-23flow.c: Grammar check and clarify a lot of comments.Richard Henderson1-290/+406
* flow.c: Grammar check and clarify a lot of comments. (try_simplify_condjump): Rename variables to be clearer. (try_forward_edges): Skip complex and fallthru edges. Rearrange tests to avoid duplicate checks. (flow_find_cross_jump): Likewise. (outgoing_edges_match): Allow match if neither branch has probability data. Loosen probability match to 5%. (try_crossjump_to_edge): Hoist repeated indirection into local variables. (try_crossjump_bb): Don't check complex edges. Eliminate redundant crossjump tests. (try_optimize_cfg): Fix use of bool. Reorganize cheaper checks before more expensive checks. From-SVN: r44257
2001-07-22flow.c (split_block): Make sure bb_note is included in the new block when ↵Richard Henderson1-0/+5
splitting before a label. * flow.c (split_block): Make sure bb_note is included in the new block when splitting before a label. From-SVN: r44250
2001-07-22basic-block.h (redirect_edge_and_branch_force, [...]): Declare.Jan Hubicka1-9/+7
* basic-block.h (redirect_edge_and_branch_force, redirect_edge_and_branch, block_label, forwarder_block_p): Declare. * flow.c (redirect_edge_and_branch_force, redirect_edge_and_branch, block_label, forwarder_block_p): Make global. (redirect_edge_and_branch_force): Fix copying of lifeness information. (block_label): Handle EXIT_BLOCK_PTR by returning NULL. * ifcvt.c (dead_or_predictable): Take BB as an new destionation instead of label; update CFG after transformation. (find_if_case_1): Update call, use redirect_edge_and_branch_force for finishing the transformation; handle even case where ELSE does not follow THEN. (find_if_case_2): Update call of dead_or_predictable; simplify CFG update. * emit-rtl.c (split_branch_probability): New global variable. (try_split): Take care to set split_branch_probability and create REG_BR_PROB note for new jump insns. * md.texi (define_split): Document new feature. * i386.c (ix86_split_fp_branch): Redistribute branch probability notes. From-SVN: r44249
2001-07-21flow.c (try_redirect_by_replacing_jump): Correctly compute which insns to ↵Richard Henderson1-23/+15
delete in the presence of cc0 in a jump insn. * flow.c (try_redirect_by_replacing_jump): Correctly compute which insns to delete in the presence of cc0 in a jump insn. From-SVN: r44217
2001-07-18flow.c (redirect_edge_and_branch): Bail out on complex edges.Richard Henderson1-19/+26
* flow.c (redirect_edge_and_branch): Bail out on complex edges. (try_optimize_cfg): Do not remove tail recursive labels before sibcall. * jump.c (mark_jump_label): Do not forward branches. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r44118
2001-07-17unix.h (ASM_OUTPUT_MI_THUNK): Fix output format for x86-64 pic support.Andreas Jaeger1-1/+0
* config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix output format for x86-64 pic support. * lcm.c (optimize_mode_switching): Avoid warning for unused variable if !NORMAL_MODE * flow.c (try_crossjump_to_edge): Remove unused variable. From-SVN: r44062
2001-07-16basic-block.h (CLEANUP_PRE_SIBCALL): New constant.Jan Hubicka1-0/+33
* basic-block.h (CLEANUP_PRE_SIBCALL): New constant. * except.c (finish_eh_generation): Update call of cleanup_cfg; do rebuild_jump_labels instead of jump_optimize * sibcall.c (optimize_sibling_and_tail_recursive_call): Likewise. * toplev.c (rest_of_compulation): Likewise for -Wreturn_type. * flow.c (try_optimize_cfg): Remove unneeded code_labels. * flow.c: Include timevar.h (find_basic_block): Push/pop timevar; (cleanup_cfg): Likewise. * timevar.def (TV_CFG, TV_CLEANUP_CFG): New. * Makefile: Add dependencies on timevar.h * integrate.c (save_for_inline): Kill all BASIC_BLOCK notes. (copy_insn_list): Avoid killing of BASIC_BLOCK notes. * rtl.h (delete_trivially_dead_insns): Add new parameter. * toplev.c (rest_of_compilation): Update calls. * cse.c (set_live_p, insn_live_p, dead_libcall_p): Break out from ... (delete_trivially_dead_insns): ... here; accept new argument preserve_basic_blocks; preserve basic blocks if set. * reg-stack.c (stack_regs_mentioned): Return 0 if stack_regs_mentioned_data is not initialized. (reg_to_stack): Make stack_regs_mentioned survive after the reg-stack is completted; do not call cleanup_cfg. * toplev.c (rest_of_compilation): Do cleanup_cfg before bb-reorder; make cleanup_cfg after bb-reorder to output to debug file. From-SVN: r44056
2001-07-16hard-reg-set.h (regs_invalidated_by_call): Declare.Richard Henderson1-2/+1
* hard-reg-set.h (regs_invalidated_by_call): Declare. * regclass.c (regs_invalidated_by_call): Move from cse.c. (init_reg_sets_1): Move initialization from cse_main. * cse.c (regs_invalidated_by_call): Move to regclass.c. (cse_main): Move its initialization also. * df.c (df_insn_refs_record): Use regs_invalidated_by_call. * flow.c (propagate_one_insn): Likewise. * gcse.c (compute_hash_table): Likewise. (compute_kill_rd, compute_store_table): Likewise. * sched-deps.c (sched_analyze_1): Likewise. From-SVN: r44053
2001-07-15flow.c (redirect_edge_and_branch_force): Initialize global_live_at_start and ↵Richard Henderson1-2/+10
global_live_at_end. * flow.c (redirect_edge_and_branch_force): Initialize global_live_at_start and global_live_at_end. (allocate_bb_life_data): Export. * basic-block.h (allocate_bb_life_data): Declare it. * toplev.c (rest_of_compilation): Call it. From-SVN: r44023
2001-07-14Re-install recently reverted patch.Jan Hubicka1-1/+1
* emit-rtl.c (try_split): Update mark_jump_label call. * flow.c (find_sub_basic_blocks): Likewise. * jump.c (cross_jump_death_matters, find_cross_jump, do_cross_jump, jump_back_p): Kill. (mark_all_labels): Kill second parameter. (jump_optimize, jump_optimize_1): Kill cross_jump parameter. (rebuild_jump_labels, jump_optimize_minimal): Update call of jump_optimize_1. (jump_optimize_1): Kill crossjumping code. (mark_jump_label): Kill cross_jump parameter. * rtl.h (mark_jump_label, jump_optimize): Update prototypes. (JUMP_CROSS_JUMP, JUMP_CROSS_JUMP_DEATH_MATTERS): Kill. * reg-stack.c (reg_to_stack): Do not rebuild if not needed; do splitting. * toplev.c (enum dump_file_index): Kill DFI_jump2; put DFI_stack before DFI_bpro. (dump_file_info): Likewise. (rest_of_compilation): Update calls to jump_optimize; kill jump2 pass; reorganize passes to do reg-stack first, bb-reorder second. * invoke.texi (-d letters doc): Remove the jump2 pass. From-SVN: r44008
2001-07-14bb-reorder.c (skip_insn_after_block): Get past the line number notes.Jan Hubicka1-4/+4
* bb-reorder.c (skip_insn_after_block): Get past the line number notes. * flow.c (redirect_edge_and_branch_force, split_edge, try_crossjump_to_edge): Use set_block_for_new_insns. * bb-reorder.c (emit_jump_to_block_after): Call set_block_for_new_insns. From-SVN: r44002
2001-07-13Revert Jan Hubicka's patch of Fri Jul 13 14:46:21 CEST 2001.Geoffrey Keating1-1/+1
From-SVN: r43986
2001-07-13emit-rtl.c (try_split): Update mark_jump_label call.Jan Hubicka1-1/+1
* emit-rtl.c (try_split): Update mark_jump_label call. * flow.c (find_sub_basic_blocks): Likewise. * jump.c (cross_jump_death_matters, find_cross_jump, do_cross_jump, jump_back_p): Kill. (mark_all_labels): Kill second parameter. (jump_optimize, jump_optimize_1): Kill cross_jump parameter. (rebuild_jump_labels, jump_optimize_minimal): Update call of jump_optimize_1. (jump_optimize_1): Kill crossjumping code. (mark_jump_label): Kill cross_jump parameter. * rtl.h (mark_jump_label, jump_optimize): Update prototypes. (JUMP_CROSS_JUMP, JUMP_CROSS_JUMP_DEATH_MATTERS): Kill. * reg-stack.c (reg_to_stack): Do not rebuild if not needed; do splitting. * toplev.c (enum dump_file_index): Kill DFI_jump2; put DFI_stack before DFI_bpro. (rest_of_compilation): Update calls to jump_optimize; kill jump2 pass; reorganize passes to do reg-stack first, bb-reorder second. * invoke.texi (-d letters doc): Remove the jump2 pass. From-SVN: r43979
2001-07-12flow.c (try_optimize_cfg): Delete whole chain of trivially dead basic blocks.Jan Hubicka1-11/+8
* flow.c (try_optimize_cfg): Delete whole chain of trivially dead basic blocks. (verify_flow_info): Make diagnostics prettier. From-SVN: r43967
2001-07-12flow.c (find_basic_blocks_1): Do not emit NOP after call.Jan Hubicka1-22/+3
* flow.c (find_basic_blocks_1): Do not emit NOP after call. * flow.c (outgoing_edges_match): Return early if condition reversal failed. From-SVN: r43965
2001-07-11flow.c (merge_blocks_move_successor_nojumps): Do not crash when fallthru ↵Jan Hubicka1-22/+570
edge is present. * flow.c (merge_blocks_move_successor_nojumps): Do not crash when fallthru edge is present. (mege_blocks): Handle case where creation of jump insn is required. * basic-block.h (CLEANUP_EXPENSIVE, CLEANUP_CROSSJUMP, CLEANUP_POST_REGSTACK): New constants. * except.c (finish_eh_generation): Update call of cleanup_cfg, * jump.c (rtx_renumbered_equal_p): Handle 't' fields. * output.h (cleanup_cfg): Update prototype. * reg-stack.c (reg_to_stack): Use cleanup_cfg instead of jump_optimize * sibcall.c (optimize_sibling_and_tail_recursive_call): Update cleanup_cfg call; kill missleading comment. * toplev.c (rest_of_compilation): Update all cleanup_cfg calls. * flow.c (merge_blocks, try_optimize_cfg, cleanup_cfg): Accept mode parameter; control optimizations performed using it. (flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge, try_crossjump_bb): New functions. From-SVN: r43950
2001-07-11gcse.c, [...]: s/free on sbitmap vectors/sbitmap_vector_free on sbitmap ↵Daniel Berlin1-0/+4
vectors/g * gcse.c, lcm.c, sched-deps.c: s/free on sbitmap vectors/sbitmap_vector_free on sbitmap vectors/g * flow.c (flow_loops_find): Free dom if we found no loops, since we aren't going to save it. * lcm.c (pre_edge_rev_lcm): Free st_antin, st_antout when we are done. From-SVN: r43938
2001-07-10regmove.c (replace_in_call_usage): Fix warnings.Jan van Male1-1/+1
2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * regmove.c (replace_in_call_usage): Fix warnings. * sched-deps.c (add_dependence): Fix warnings. * simplify-rtx.c (simplify_subreg): Likewise. Return NULL_RTX instead of NULL. * reg-stack.c (emit_swap_insn): Eliminate warnings. (subst_asm_stack_regs): Likewise. * combine.c (num_sign_bit_copies): Cast bitwidth to int to avoid warnings. * dwarf2out.c (output_call_frame_info): Declare i as int. (build_abbrev_table): Declare n_alloc as int. (dwarf2out_finish): Initialize die. * except.c: Declare sjlj_funcdef_number as unsigned. (connect_post_landing_pads): Declare j as unsigned. (convert_to_eh_region_ranges): Initialize call_site. (output_function_exception_table): Initialize tt_format_size. * expr.c (move_by_pieces_1): Initialize to1. (store_constructor): Initialize minelt and maxelt. * flow.c (mark_regs_live_at_end): Declare i as unsigned. * function.c (instantiate_decls): Avoid signed/unsigned warning. * c-decl.c (combine_parm_decls): Unused, remove. * c-tree.h: Remove prototype for combine_parm_decls. * reload.c (push_reload): Fix warning. (regno_clobbered_p): Likewise. * reload1.c (replace_pseudos_in_call_usage): Likewise. (reload_combine): Likewise. * bitmap.c: Rename bitmap_zero to bitmap_zero_bits to fix warnings. * bitmap.h: Rename bitmap_zero to bitmap_zero_bits to fix warnings. * bitmap.c (bitmap_operation): Change user. * bitmap.h (EXECUTE_IF_AND_COMPL_IN_BITMAP): Likewise. For cp/: 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * call.c (build_op_delete_call): Initialize fn. (convert_like_real): Delete conditional. (joust): Initialize *w and *l. * class.c: Add prototype for binfo_ctor_vtable. (get_primary_binfo): Initialize result. * init.c (build_java_class_ref): Initialize name. * typeck.c (unary_complex_lvalue): Do not duplicate the argument to modify, pre-, or post-increment when used as an lvalue and when the argument has side-effects. For ch/: 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl> * ch-tree.h: Remove prototype for combine_parm_decls, unused function. From-SVN: r43893
2001-07-09basic-block.h (tree_node): Forward declare if needed.Diego Novillo1-3/+7
2001-07-09 Diego Novillo <dnovillo@redhat.com> * basic-block.h (tree_node): Forward declare if needed. (struct basic_block_def): Add fields 'head_tree' and 'end_tree'. (BLOCK_HEAD_TREE): Define. (BLOCK_END_TREE): Define. (struct loops): Rename field 'tree' to 'tree_root'. * flow.c (entry_exit_blocks): Add initializers for 'head_tree' and 'end_tree'. (flow_loops_tree_build): Rename reference to field 'tree' to 'tree_root'. (flow_loops_level_compute): Ditto. * predict.c (estimate_bb_frequencies): Ditto. * tree.h (struct tree_common): Add field 'aux'. From-SVN: r43886
2001-07-09flow.c (redirect_edge_and_branch_force): New.Jan Hubicka1-21/+166
* flow.c (redirect_edge_and_branch_force): New. (can_fallthru): Ensure that basic blocks are succeeding. (try_optimize_cfg): Do not delete basic block if it is the last one. * flow.c (try_redirect_by_replacing_jump): Do not remove jumps with side effects, unlink chain on fallthru edge; set block for new jump instruction; avoid basic block to over by line number note. * flow.c (try_simplify_condjump): Verify that the condjump is not always falling trought. Re-install patch: * flow.c (try_redirect_by_replacing_jump): Remove cc0 setter. * flow.c (forwarder_block_p): Fix for fallthru blocks. (try_redirect_by_replacing_jump): Update properly the count and frequency information. From-SVN: r43867
2001-07-06basic-block.h (first_insn_after_basic_block_note): Declare.Jeffrey A Law1-0/+22
* basic-block.h (first_insn_after_basic_block_note): Declare. * flow.c (first_insn_after_basic_block_note): Define. Moved from... * ssa.c (first_insn_after_basic_block_note): Remove. * ssa-dce.c (find_inherently_necessary): Consider BARRIERs necessary. (ssa_eliminate_dead_code): Properly update the CFG and PHI nodes when we find a dead conditional branch. Insert BARRIERs after any blocks with no successors, but which do not have any BARRIERs. From-SVN: r43816
2001-07-05flow.c: Reverse Jan Hubicka's patch of 02July2001.Jeffrey Oldham1-28/+9
2001-07-05 Jeffrey Oldham <oldham@codesourcery.com> * flow.c: Reverse Jan Hubicka's patch of 02July2001. (try_redirect_by_replacing_jump): Reverse updating properly the count and frequency information. Reverse removing cc0 setter. (forwarder_block_p): Reverse fixing for fallthru blocks. From-SVN: r43788
2001-07-02flow.c (try_redirect_by_replacing_jump): Remove cc0 setter.Jan Hubicka1-9/+28
* flow.c (try_redirect_by_replacing_jump): Remove cc0 setter. * flow.c (forwarder_block_p): Fix for fallthru blocks. (try_redirect_by_replacing_jump): Update properly the count and frequency information. From-SVN: r43708
2001-07-02* flow.c (try_simplify_condjump): Fix typo in updating fallthru flags.Richard Kenner1-1/+1
From-SVN: r43695
2001-06-28flow.c (dump_bb): Remove unused third argument to call to fprintf when...Diego Novillo1-1/+1
2001-06-28 Diego Novillo <dnovillo@redhat.com> * flow.c (dump_bb): Remove unused third argument to call to fprintf when displaying the basic block header. From-SVN: r43649
2001-06-28Makefile.in (OBJS): Add df.oJeff Law1-2/+1
* Makefile.in (OBJS): Add df.o (df.o): Add dependencies. * basic-block.h (flow_depth_first_order_compute): Declare. * flow.c (flow_depth_first_order_compute): No longer declare. Make external. * df.c, df.h: New files. * po/POTFILES.in: Update for new files. From-SVN: r43647
2001-06-28flow.c (try_merge_block): Rename to try_optimize_cfg; do basic ↵Jan Hubicka1-33/+381
simplifications on the CFG. * flow.c (try_merge_block): Rename to try_optimize_cfg; do basic simplifications on the CFG. (is_forwarder_block_p, can_fallthru, try_redirect_by_replacing_jump, try_simplify_condjump): New. (redirect_edge_and_branch): Try replace jump insn. (flow_delete_insn): Handle deleting of ADDR_VEC insns. * basic-block.h (FALLTHRU_EDGE, BRANCH_EDGE): New macros. From-SVN: r43642
2001-06-28i386.md (cmp?i): Simplify; refuse immediate operand in alternative 0Jan Hubicka1-74/+93
* i386.md (cmp?i): Simplify; refuse immediate operand in alternative 0 * i386.c (cmpsi_operand): Refuse constants. * i386.md (movsi_insv_1, movsi_insv_1_rex64): Allow immediate operand. * flow.c (block_label, redirect_edge_and_branch): Split out from .... (split_edge) .... here; From-SVN: r43635
2001-06-23* flow.c (attempt_auto_inc, try_pre_increment_1): Fix typo.Jan Hubicka1-2/+2
From-SVN: r43527
2001-06-22flow.c (mark_set_1, [...]): compute REG_FREQ using bb->frequency.Jan Hubicka1-5/+9
* flow.c (mark_set_1, attempt_auto_inc, mark_used_reg, try_pre_increment_1): compute REG_FREQ using bb->frequency. * regclass.c (loop_cost): Kill. (frequency): New global variable. (record_operand_costs): Replace loop_cost by frequency. (scan_one_insn): Likewise. (regclass): Likewise; set frequency according to bb->frequency. * flow.c (split_edge): Set frequency. From-SVN: r43523
2001-06-22predict.c (block_info_def): Add nvisited.Jan Hubicka1-0/+3
* predict.c (block_info_def): Add nvisited. (propagate_freq): Count nvisited; re-queue delayed blocks; handle irreducible regions. * flow.c (dump_edge_info): Dump the probability of edge. (combine_predictions_for_insn): Dump the basic block. From-SVN: r43522