#include "config.h"#include "system.h"#include "rtl.h"#include "hard-reg-set.h"#include "basic-block.h"#include "timevar.h"#include "output.h"#include "insn-config.h"#include "flags.h"#include "recog.h"#include "toplev.h"#include "cselib.h"#include "params.h"#include "tm_p.h"#include "target.h"

Go to the source code of this file.
Definition at line 61 of file cfgcleanup.c.
Referenced by notice_new_block(), thread_jump(), try_forward_edges(), and update_forwarder_flag().
Definition at line 66 of file cfgcleanup.c.
Referenced by condjump_equiv_p(), merge_blocks(), merge_blocks_move(), outgoing_edges_match(), try_crossjump_to_edge(), try_forward_edges(), try_optimize_cfg(), and try_simplify_condjump().
| enum bb_flags |
Definition at line 52 of file cfgcleanup.c.
| bool cleanup_cfg | ( | int | mode | ) |
Definition at line 1798 of file cfgcleanup.c.
Referenced by branch_prob(), branch_target_load_optimize(), cfg_layout_initialize(), finish_eh_generation(), optimize_sibling_and_tail_recursive_calls(), reg_alloc(), rest_of_compilation(), rest_of_handle_cfg(), rest_of_handle_combine(), rest_of_handle_cse(), rest_of_handle_cse2(), rest_of_handle_eh(), rest_of_handle_flow2(), rest_of_handle_gcse(), rest_of_handle_if_after_reload(), rest_of_handle_if_conversion(), rest_of_handle_jump2(), rest_of_handle_jump_bypass(), rest_of_handle_life(), rest_of_handle_loop2(), rest_of_handle_regmove(), rest_of_handle_reorder_blocks(), rest_of_handle_sched2(), rest_of_handle_see(), rest_of_handle_stack_adjustments(), rest_of_handle_stack_regs(), rest_of_handle_tracer(), rest_of_handle_value_profile_transformations(), rest_of_handle_web(), rest_of_rtl_seqabstr(), rtl_loop_done(), rtl_seqabstr(), tracer(), and update_life_info().
Definition at line 1770 of file cfgcleanup.c.
Referenced by cleanup_cfg(), cleanup_tree_cfg(), cleanup_tree_cfg_1(), df_analyze(), local_cprop_pass(), one_cprop_pass(), rest_of_compilation(), rest_of_handle_cse(), rest_of_handle_jump(), rest_of_handle_local_alloc(), and rest_of_handle_old_regalloc().
| static int flow_find_cross_jump | ( | mode | , | |
| basic_block | bb1, | |||
| basic_block | bb2, | |||
| rtx * | f1, | |||
| rtx * | f2 | |||
| ) | [static] |
Definition at line 1019 of file cfgcleanup.c.
References cc0_rtx, basic_block_def::end, find_reg_equal_equiv_note(), GET_CODE, basic_block_def::head, i1, i2, INSN_P, insns_match_p(), mode, NULL_RTX, onlyjump_p(), PATTERN, PREV_INSN, reg_mentioned_p(), remove_note(), returnjump_p(), rtx_equal_p(), sets_cc0_p(), side_effects_p(), simplejump_p(), and XEXP.
Referenced by try_crossjump_to_edge().
Definition at line 910 of file cfgcleanup.c.
References apply_change_group(), CALL_INSN_FUNCTION_USAGE, cancel_changes(), CLEANUP_POST_REGSTACK, CLEAR_HARD_REG_SET, CONSTANT_P, find_reg_equal_equiv_note(), GET_CODE, GO_IF_HARD_REG_EQUAL, HARD_REG_SET, mode, p1, p2, PATTERN, REG_DEAD, REG_NOTE_KIND, REG_NOTES, REGNO, reload_completed, rtx_equal_p(), rtx_renumbered_equal_p(), s1, s2, SET_DEST, SET_HARD_REG_BIT, SET_SRC, SIBLING_CALL_P, single_set, STACK_REG_P, validate_change(), and XEXP.
Referenced by condjump_equiv_p(), flow_find_cross_jump(), outgoing_edges_match(), and struct_equiv_block_eq().
Definition at line 671 of file cfgcleanup.c.
References GET_CODE, GET_NUM_ELEM, i, JUMP_LABEL, NEXT_INSN, NULL_RTX, PATTERN, RTVEC_ELT, tmp, vec, XEXP, and XVEC.
Referenced by cfg_layout_redirect_edge_and_branch(), and try_optimize_cfg().
Definition at line 213 of file cfgcleanup.c.
References CLEAR_REGNO_REG_SET, dest, FIRST_PSEUDO_REGISTER, GET_CODE, GET_MODE, HARD_REGNO_NREGS, n, pc_rtx, REG_P, REGNO, rtx_equal_for_cselib_p(), SET, SET_DEST, SET_REGNO_REG_SET, SET_SRC, and XEXP.
Referenced by thread_jump().
Definition at line 264 of file cfgcleanup.c.
References FIRST_PSEUDO_REGISTER, GET_MODE, HARD_REGNO_NREGS, n, REG_P, REGNO, and REGNO_REG_SET_P.
Referenced by thread_jump().
| static bool merge_blocks | ( | edge | e, | |
| basic_block | b, | |||
| basic_block | c, | |||
| int | mode | |||
| ) | [static] |
Definition at line 814 of file cfgcleanup.c.
References CLEANUP_EXPENSIVE, CLEANUP_PRE_SIBCALL, EDGE_FALLTHRU, ENTRY_BLOCK_PTR, edge::flags, force_nonfallthru(), FORWARDER_BLOCK_P, fprintf(), GET_CODE, basic_block_def::head, basic_block_def::index, merge_blocks_move_predecessor_nojumps(), merge_blocks_move_successor_nojumps(), merge_blocks_nomove(), notice_new_block(), NULL, basic_block_def::pred, edge::pred_next, rtl_dump_file, edge::src, basic_block_def::succ, edge::succ_next, tail_recursion_label_p(), and update_forwarder_flag().
Referenced by combine_blocks(), merge_blocks_move(), merge_blocks_move_predecessor_nojumps(), merge_blocks_move_successor_nojumps(), merge_if_block(), merge_seq_blocks(), and try_optimize_cfg().
| static void merge_blocks_move_predecessor_nojumps | ( | basic_block | a, | |
| basic_block | b | |||
| ) | [static] |
Definition at line 717 of file cfgcleanup.c.
References abort, BB_DIRTY, delete_insn(), fprintf(), GET_CODE, link_block(), merge_blocks_nomove(), next_nonnote_insn(), PREV_INSN, reorder_insns_nobb(), rtl_dump_file, squeeze_notes(), and unlink_block().
Referenced by merge_blocks(), and merge_blocks_move().
| static void merge_blocks_move_successor_nojumps | ( | basic_block | a, | |
| basic_block | b | |||
| ) | [static] |
Definition at line 760 of file cfgcleanup.c.
References abort, delete_insn(), fprintf(), GET_CODE, merge_blocks_nomove(), NEXT_INSN, PATTERN, reorder_insns_nobb(), rtl_dump_file, and squeeze_notes().
Referenced by merge_blocks(), and merge_blocks_move().
| static void notice_new_block | ( | basic_block | bb | ) | [static] |
Definition at line 96 of file cfgcleanup.c.
References BB_FORWARDER_BLOCK, BB_SET_FLAG, and forwarder_block_p().
Referenced by merge_blocks(), merge_blocks_move(), and try_forward_edges().
| static bool outgoing_edges_match | ( | int | mode, | |
| basic_block | bb1, | |||
| basic_block | bb2 | |||
| ) | [static] |
Definition at line 1131 of file cfgcleanup.c.
References abs, any_condjump_p(), BRANCH_EDGE, d1, d2, edge::dest, EDGE_COMPLEX, EDGE_EH, EDGE_FAKE, EDGE_FALLTHRU, basic_block_def::end, f1, f2, FALLTHRU_EDGE, find_reg_note(), edge::flags, FORWARDER_BLOCK_P, forwarder_block_p(), fprintf(), GET_CODE, basic_block_def::index, insns_match_p(), basic_block_def::loop_depth, maybe_hot_bb_p(), onlyjump_p(), optimize_size, pc_rtx, pc_set(), REG_BR_PROB_BASE, REG_EH_REGION, reversed_comparison_code(), rtl_dump_file, rtx_renumbered_equal_p(), SET_SRC, simplejump_p(), basic_block_def::succ, edge::succ_next, swap_condition(), UNKNOWN, and XEXP.
Referenced by try_crossjump_to_edge().
| static edge thread_jump PARAMS | ( | (int, edge, basic_block) | ) | [static] |
| static bool try_simplify_condjump PARAMS | ( | (basic_block) | ) | [static] |
| static bool try_optimize_cfg PARAMS | ( | (int) | ) | [static] |
| static bool merge_blocks PARAMS | ( | (edge, basic_block, basic_block, int) | ) | [static] |
| static void merge_blocks_move_predecessor_nojumps PARAMS | ( | (basic_block, basic_block) | ) | [static] |
| static int flow_find_cross_jump PARAMS | ( | (int, basic_block, basic_block, rtx *, rtx *) | ) | [static] |
| static bool outgoing_edges_match PARAMS | ( | (int, basic_block, basic_block) | ) | [static] |
| static bool try_crossjump_bb PARAMS | ( | (int, basic_block) | ) | [static] |
Definition at line 700 of file cfgcleanup.c.
References tail_recursion_label_list, x, and XEXP.
Referenced by merge_blocks(), and try_optimize_cfg().
| static edge thread_jump | ( | int | mode, | |
| edge | e, | |||
| basic_block | b | |||
| ) | [static] |
Definition at line 291 of file cfgcleanup.c.
References AND_REG_SET, any_condjump_p(), BB_FLAGS, BB_NONTHREADABLE_BLOCK, BB_SET_FLAG, BITMAP_XFREE, BITMAP_XMALLOC, BRANCH_EDGE, CLEANUP_UPDATE_LIFE, CLEAR_REG_SET, comparison_dominates_p(), cselib_finish(), cselib_init(), cselib_process_insn(), EDGE_FALLTHRU, basic_block_def::end, EXECUTE_IF_SET_IN_REG_SET, FALLTHRU_EDGE, edge::flags, for_each_rtx(), GET_CODE, basic_block_def::global_live_at_end, basic_block_def::head, i, insn, INSN_P, mark_effect(), mentions_nonequal_regs(), NEXT_INSN, NULL, onlyjump_p(), PATTERN, pc_rtx, pc_set(), reversed_comparison_code(), rtx_equal_p(), SET_SRC, side_effects_p(), edge::src, basic_block_def::succ, edge::succ_next, XEXP, XVECEXP, and XVECLEN.
Referenced by try_forward_edges().
| static bool try_crossjump_bb | ( | int | mode, | |
| basic_block | bb | |||
| ) | [static] |
Definition at line 1495 of file cfgcleanup.c.
References changed, EDGE_FALLTHRU, edge::flags, max, n, NULL, PARAM_VALUE, basic_block_def::pred, edge::pred_next, edge::src, and try_crossjump_to_edge().
Referenced by try_optimize_cfg().
Definition at line 1342 of file cfgcleanup.c.
References BB_DIRTY, basic_block_def::count, d, d2, edge::dest, EDGE_FREQUENCY, ENTRY_BLOCK_PTR, basic_block_def::flags, flow_delete_block(), flow_find_cross_jump(), FORWARDER_BLOCK_P, fprintf(), basic_block_def::frequency, GET_CODE, basic_block_def::index, NEXT_INSN, outgoing_edges_match(), edge::pred, basic_block_def::pred, edge::pred_next, PREV_INSN, redirect_edge_and_branch_force(), rtl_dump_file, s, s2, split_block(), edge::src, basic_block_def::succ, edge::succ_next, update_br_prob_note(), and update_forwarder_flag().
Referenced by try_crossjump_bb().
| static bool try_forward_edges | ( | int | mode, | |
| basic_block | b | |||
| ) | [static] |
Definition at line 436 of file cfgcleanup.c.
References abort, BB_FORWARDER_BLOCK, BB_SET_FLAG, changed, CLEANUP_PRE_LOOP, CLEANUP_THREADING, basic_block_def::count, edge::dest, EDGE_COMPLEX, edge_count(), EDGE_FALLTHRU, basic_block_def::end, EXIT_BLOCK_PTR, first, edge::flags, FORWARDER_BLOCK_P, forwarder_block_p(), fprintf(), free(), basic_block_def::frequency, GET_CODE, basic_block_def::head, i, basic_block_def::index, insn, INSN_P, n, n_basic_blocks, next, NEXT_INSN, NOTE_INSN_LOOP_BEG, NOTE_INSN_LOOP_END, NOTE_LINE_NUMBER, notice_new_block(), NULL, optimize, PREV_INSN, prev_nonnote_insn(), redirect_edge_and_branch(), redirect_edge_and_branch_force(), REG_BR_PROB_BASE, rtl_dump_file, src, edge::src, basic_block_def::succ, edge::succ, edge::succ_next, target, thread_jump(), update_br_prob_note(), and xmalloc().
Referenced by try_optimize_cfg().
| static bool try_optimize_cfg | ( | int | mode | ) | [static] |
Definition at line 1590 of file cfgcleanup.c.
References add_noreturn_fake_exit_edges(), b, c, gcc_target::cannot_modify_jumps_p, changed, CLEANUP_CROSSJUMP, CLEANUP_EXPENSIVE, CLEANUP_PRE_SIBCALL, CLEANUP_UPDATE_LIFE, clear_aux_for_blocks(), clear_bb_flags(), delete_insn_chain(), edge::dest, EDGE_COMPLEX, EDGE_FALLTHRU, basic_block_def::end, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, edge::flags, flow2_completed, flow_delete_block(), FOR_EACH_BB, FORWARDER_BLOCK_P, fprintf(), GET_CODE, basic_block_def::head, basic_block_def::index, label_is_jump_target_p(), merge_blocks(), n_basic_blocks, basic_block_def::next_bb, NEXT_INSN, NULL, onlyjump_p(), basic_block_def::pred, edge::pred_next, basic_block_def::prev_bb, redirect_edge_and_branch(), redirect_edge_succ_nodup(), remove_fake_edges(), rtl_dump_file, s, simplejump_p(), edge::src, basic_block_def::succ, edge::succ_next, tail_recursion_label_p(), targetm, try_crossjump_bb(), try_forward_edges(), try_simplify_condjump(), update_forwarder_flag(), and verify_flow_info().
Referenced by cleanup_cfg().
| static bool try_simplify_condjump | ( | basic_block | cbranch_block | ) | [static] |
Definition at line 122 of file cfgcleanup.c.
References any_condjump_p(), block_label(), BRANCH_EDGE, can_fallthru(), edge::dest, EDGE_FALLTHRU, basic_block_def::end, end, EXIT_BLOCK_PTR, FALLTHRU_EDGE, edge::flags, flow_delete_block(), FORWARDER_BLOCK_P, fprintf(), GET_CODE, basic_block_def::head, insn, INSN_UID, invert_jump(), next, basic_block_def::next_bb, NEXT_INSN, NOTE_LINE_NUMBER, basic_block_def::pred, edge::pred_next, PREV_INSN, redirect_edge_succ_nodup(), reorder_insns_nobb(), rtl_dump_file, basic_block_def::succ, tidy_fallthru_edge(), and update_br_prob_note().
Referenced by try_optimize_cfg().
| static void update_forwarder_flag | ( | basic_block | bb | ) | [static] |
Definition at line 109 of file cfgcleanup.c.
References BB_CLEAR_FLAG, BB_FORWARDER_BLOCK, BB_SET_FLAG, and forwarder_block_p().
Referenced by merge_blocks(), merge_blocks_move(), try_crossjump_to_edge(), try_optimize_cfg(), and try_simplify_condjump().
1.5.6