GCC Middle and Back End API Reference
|
Data Structures | |
struct | noce_if_info |
Variables | |
static bool | ifcvt_after_combine |
static int | num_possible_if_blocks |
static int | num_updated_if_blocks |
static int | num_true_changes |
static int | cond_exec_changed_p |
|
static |
Referenced by cond_exec_process_if_block(), and merge_if_block().
|
static |
Return the basic block reached by falling though the basic block BB.
References edge_def::dest, find_fallthru_edge(), and basic_block_def::succs.
|
static |
Referenced by find_cond_trap().
|
static |
Subroutine of find_cond_trap: if BB contains only a trap insn, return it.
References const_true_rtx, first_active_insn(), and basic_block_def::succs.
|
static |
Referenced by cond_exec_find_if_block().
|
static |
Return true if a block has two edges, one of which falls through to the next block, and the other jumps to a specific block, so that we can tell if the block is part of an && test or an || test. Returns either -1 or the number of non-note, non-jump, non-USE/CLOBBER insns in the block.
References edge_def::dest, edge_def::flags, and basic_block_def::succs.
|
static |
Referenced by find_if_case_1(), and find_if_case_2().
|
static |
Determine whether the total insn_rtx_cost on non-jump insns in basic block BB is less than MAX_COST. This function returns false if the cost of any instruction could not be estimated. The cost of the non-jump insns in BB is scaled by REG_BR_PROB_BASE as those insns are being speculated. MAX_COST is scaled with SCALE plus a small fudge factor.
References cfun, count, ifcvt_after_combine, insn_rtx_cost(), optimize_bb_for_speed_p(), and optimize_function_for_speed_p().
|
static |
Check whether a block is suitable for conditional move conversion. Every insn must be a simple set of a register to a constant or a register. For each assignment, store the value in the pointer map VALS, keyed indexed by register pointer, then store the register pointer in REGS. COND is the condition we will test.
References may_trap_p(), modified_between_p(), onlyjump_p(), pointer_map_contains(), pointer_map_insert(), reg_overlap_mentioned_p(), register_operand(), side_effects_p(), and targetm.
Referenced by cond_move_process_if_block().
|
static |
Referenced by find_if_header().
|
static |
Determine if a given basic block heads a simple IF-THEN or IF-THEN-ELSE block. If so, we'll try to convert the insns to not require the branch. Return TRUE if we were successful at converting the block.
References ce_if_block::and_and_p, block_jumps_and_fallthru_p(), cancel_changes(), cond_exec_process_if_block(), dump_file, ce_if_block::else_bb, noce_if_info::else_bb, epilogue_completed, edge_def::flags, basic_block_def::index, ce_if_block::join_bb, noce_if_info::join_bb, ce_if_block::last_test_bb, basic_block_def::next_bb, ce_if_block::num_and_and_blocks, ce_if_block::num_multiple_test_blocks, ce_if_block::num_multiple_test_insns, ce_if_block::num_or_or_blocks, num_possible_if_blocks, ce_if_block::pass, basic_block_def::preds, reload_completed, simplejump_p(), single_pred(), single_pred_edge(), single_pred_p(), single_succ(), single_succ_edge(), single_succ_p(), basic_block_def::succs, tablejump_p(), target_bb, targetm, ce_if_block::test_bb, noce_if_info::test_bb, ce_if_block::then_bb, and noce_if_info::then_bb.
Referenced by cond_exec_process_if_block(), and dead_or_predicable().
|
static |
Return the condition for a jump. Do not do any special processing.
References any_condjump_p(), pc_set(), and reversed_comparison_code().
|
static |
Given a simple IF-THEN or IF-THEN-ELSE block, attempt to convert it to conditional execution. Return TRUE if we were successful at converting the block.
References ce_if_block::and_and_p, apply_change_group(), block_fallthru(), cancel_changes(), cond_exec_changed_p, cond_exec_get_condition(), cond_exec_process_insns(), count_bb_insns(), delete_insn_chain(), dump_file, ce_if_block::else_bb, find_active_insn_after(), find_active_insn_before(), find_reg_note(), first_active_insn(), flow_find_cross_jump(), flow_find_head_matching_sequence(), last_active_insn(), ce_if_block::last_test_bb, merge_if_block(), modified_in_p(), ce_if_block::num_and_and_blocks, ce_if_block::num_else_insns, ce_if_block::num_multiple_test_blocks, ce_if_block::num_or_or_blocks, ce_if_block::num_then_insns, onlyjump_p(), reversed_comparison_code(), ce_if_block::test_bb, and ce_if_block::then_bb.
Referenced by cond_exec_find_if_block().
|
static |
Go through a bunch of insns, converting them to conditional execution format if possible. Return TRUE if all of the non-note insns were processed.
References alloc_EXPR_LIST(), copy_rtx(), modified_in_p(), reload_completed, and validate_change().
Referenced by cond_exec_process_if_block(), and dead_or_predicable().
|
static |
Given a basic block BB suitable for conditional move conversion, a condition COND, and pointer maps THEN_VALS and ELSE_VALS containing the register values depending on COND, emit the insns in the block as conditional moves. If ELSE_BLOCK is true, THEN_BB was already processed. The caller has started a sequence for the conversion. Return true if successful, false if something goes wrong.
References noce_emit_cmove(), noce_emit_move_insn(), and pointer_map_contains().
Referenced by cond_move_process_if_block().
|
static |
Given a simple IF-THEN-JOIN or IF-THEN-ELSE-JOIN block, attempt to convert it using only conditional moves. Return TRUE if we were successful at converting the block.
References can_merge_blocks_p(), check_cond_move_block(), noce_if_info::cond, cond_move_convert_if_block(), delete_basic_block(), noce_if_info::else_bb, emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), find_edge(), first_active_insn(), noce_if_info::join_bb, noce_if_info::jump, merge_blocks(), num_true_changes, num_updated_if_blocks, pointer_map_contains(), pointer_map_create(), pointer_map_destroy(), redirect_edge_and_branch_force(), remove_edge(), rtx_equal_p(), single_succ_edge(), start_sequence(), noce_if_info::test_bb, noce_if_info::then_bb, and vNULL.
Referenced by noce_find_if_block().
|
static |
Forward references.
Referenced by cond_exec_process_if_block().
|
static |
Count the number of non-jump active insns in BB.
References count.
|
static |
Used by the code above to perform the actual rtl transformations. Return TRUE if successful. TEST_BB is the block containing the conditional branch. MERGE_BB is the block containing the code to manipulate. DEST_EDGE is an edge representing a jump to the join block; after the conversion, TEST_BB should be branching to its destination. REVERSEP is true if the sense of the branch should be reversed.
References any_condjump_p(), bitmap_and_into(), bitmap_bit_p(), bitmap_empty_p(), bitmap_intersect_p(), bitmap_set_bit(), block_label(), can_move_insns_across(), cancel_changes(), noce_if_info::cond, cond_exec_get_condition(), cond_exec_process_insns(), confirm_change_group(), count, delete_insn(), edge_def::dest, df_get_live_in(), df_get_live_out(), df_simulate_find_defs(), df_simulate_uses(), epilogue_completed, find_reg_note(), function_invariant_p(), invert_jump_1(), noce_if_info::jump, live, max_reg_num(), max_regno, noce_get_condition(), num_validated_changes(), redirect_edge_succ(), redirect_jump_1(), redirect_jump_2(), reg_obstack, remove_edge(), remove_note(), remove_reg_equal_equiv_notes_for_regno(), reorder_insns(), ret_rtx, reversed_comparison_code(), simulate_backwards_to_point(), single_succ(), single_succ_p(), edge_def::src, tablejump_p(), targetm, update_br_prob_note(), and verify_changes().
Referenced by find_if_case_1(), and find_if_case_2().
|
static |
Return sequence of instructions generated by if conversion. This function calls end_sequence() to end the current stream, ensures that are instructions are unshared, recognizable non-jump insns. On failure, this function returns a NULL_RTX.
References noce_if_info::a, noce_if_info::b, noce_if_info::cond, end_sequence(), get_insns(), recog_memoized(), set_used_flags(), unshare_all_rtl_in_chain(), and noce_if_info::x.
Referenced by cond_move_process_if_block(), noce_try_abs(), noce_try_addcc(), noce_try_bitop(), noce_try_cmove(), noce_try_cmove_arith(), noce_try_minmax(), noce_try_move(), noce_try_sign_mask(), noce_try_store_flag(), noce_try_store_flag_constants(), and noce_try_store_flag_mask().
|
static |
Referenced by cond_exec_process_if_block().
|
static |
Return the active insn after INSN inside basic block CURR_BB.
|
static |
Referenced by cond_exec_process_if_block().
|
static |
Return the active insn before INSN inside basic block CURR_BB.
|
static |
Referenced by find_if_header().
|
static |
Convert a branch over a trap, or a branch to a trap, into a conditional trap.
References block_has_only_trap(), can_merge_blocks_p(), noce_if_info::cond, noce_if_info::cond_earliest, copy_rtx(), current_ir_type(), delete_basic_block(), delete_insn(), edge_def::dest, df_set_bb_dirty(), dump_file, noce_if_info::else_bb, emit_barrier_after(), emit_insn_before_setloc(), emit_jump_insn_after(), edge_def::flags, gen_cond_trap(), basic_block_def::index, IR_RTL_CFGLAYOUT, noce_if_info::jump, merge_blocks(), noce_get_condition(), num_true_changes, num_updated_if_blocks, onlyjump_p(), basic_block_def::preds, remove_edge(), reversed_comparison_code(), single_succ_edge(), and noce_if_info::then_bb.
|
static |
Referenced by find_if_header().
|
static |
Look for IF-THEN-ELSE cases in which one of THEN or ELSE is transformable, but not necessarily the other. There need be no JOIN block. Return TRUE if we were successful at converting the block. Cases we'd like to look at: (1) if (test) goto over; // x not live x = a; goto label; over: becomes x = a; if (! test) goto label; (2) if (test) goto E; // x not live x = big(); goto L; E: x = b; goto M; becomes x = b; if (test) goto M; x = big(); goto L; (3) // This one's really only interesting for targets that can do // multiway branching, e.g. IA-64 BBB bundles. For other targets // it results in multiple branches on a cache line, which often // does not sit well with predictors. if (test1) goto E; // predicted not taken x = a; if (test2) goto F; ... E: x = b; J: becomes x = a; if (test1) goto E; if (test2) goto F; Notes: (A) Don't do (2) if the branch is predicted against the block we're eliminating. Do it anyway if we can eliminate a branch; this requires that the sole successor of the eliminated block postdominate the other side of the if. (B) With CE, on (3) we can steal from both sides of the if, creating if (test1) x = a; if (!test1) x = b; if (test1) goto J; if (test2) goto F; ... J: Again, this is most useful if J postdominates. (C) CE substitutes for helpful life information. (D) These heuristics need a lot of work.
Tests for case 1 above.
References cheap_bb_rtx_cost_p(), dead_or_predicable(), delete_basic_block(), edge_def::dest, df_bb_replace(), df_set_bb_dirty(), dump_file, noce_if_info::else_bb, find_reg_note(), force_nonfallthru_and_redirect(), forwarder_block_p(), basic_block_def::index, noce_if_info::jump, basic_block_def::next_bb, num_possible_if_blocks, num_true_changes, num_updated_if_blocks, optimize_bb_for_speed_p(), predictable_edge_p(), basic_block_def::prev_bb, edge_def::probability, redirect_edge_and_branch_force(), redirect_edge_succ(), single_pred_p(), single_succ_edge(), single_succ_p(), edge_def::src, and noce_if_info::then_bb.
|
static |
Referenced by find_if_header().
|
static |
Test for case 2 above.
References CDI_POST_DOMINATORS, cheap_bb_rtx_cost_p(), dead_or_predicable(), delete_basic_block(), edge_def::dest, df_set_bb_dirty(), dominated_by_p(), dump_file, noce_if_info::else_bb, find_reg_note(), edge_def::flags, basic_block_def::index, loop::latch, basic_block_def::loop_father, num_possible_if_blocks, num_true_changes, num_updated_if_blocks, optimize_bb_for_speed_p(), predictable_edge_p(), edge_def::probability, single_pred_p(), single_succ_edge(), single_succ_p(), edge_def::src, and noce_if_info::then_bb.
|
static |
Referenced by if_convert().
|
static |
Find a block ending in a simple IF condition and try to transform it in some way. When converting a multi-block condition, put the new code in the first such block and delete the rest. Return a pointer to this first block if some transformation was done. Return NULL otherwise.
References CDI_POST_DOMINATORS, cond_exec_changed_p, cond_exec_find_if_block(), edge_def::dest, df_get_bb_dirty(), dom_info_state(), DOM_NO_FAST_QUERY, dump_file, ce_if_block::else_bb, find_cond_trap(), find_if_case_1(), find_if_case_2(), edge_def::flags, memset(), noce_find_if_block(), optab_handler(), ce_if_block::pass, reload_completed, basic_block_def::succs, targetm, ce_if_block::test_bb, noce_if_info::test_bb, ce_if_block::then_bb, and word_mode.
|
static |
Referenced by block_has_only_trap(), cond_exec_process_if_block(), cond_move_process_if_block(), and noce_process_if_block().
|
static |
Return the first non-jump active insn in the basic block.
|
static |
References dbg_cnt().
|
static |
References dbg_cnt().
|
static |
References dbg_cnt().
|
static |
Main entry point for all if-conversion. AFTER_COMBINE is true if we are after combine pass.
References calculate_dominance_info(), CDI_DOMINATORS, CDI_POST_DOMINATORS, clear_aux_for_blocks(), cond_exec_changed_p, df_analyze(), df_clear_flags(), df_get_bb_dirty(), df_live_add_problem(), df_live_set_all_dirty(), DF_LR_RUN_DCE, df_remove_problem(), df_set_flags(), dump_file, dump_flags, find_if_header(), free_dominance_info(), get_insns(), ifcvt_after_combine, loop_optimizer_finalize(), loop_optimizer_init(), mark_loop_exit_edges(), max_reg_num(), max_regno, num_possible_if_blocks, num_true_changes, num_updated_if_blocks, print_rtl_with_bb(), and verify_flow_info().
Referenced by rest_of_handle_if_after_combine(), rest_of_handle_if_after_reload(), and rest_of_handle_if_conversion().
|
static |
Referenced by cond_exec_process_if_block(), and noce_process_if_block().
|
static |
Return the last non-jump active (non-jump) insn in the basic block.
rtl_opt_pass* make_pass_if_after_combine | ( | ) |
rtl_opt_pass* make_pass_if_after_reload | ( | ) |
rtl_opt_pass* make_pass_rtl_ifcvt | ( | ) |
|
static |
Referenced by cond_exec_process_if_block().
|
static |
Merge the blocks and mark for local life update.
References block_fallthru(), can_throw_internal(), const_true_rtx, df_set_bb_dirty(), ce_if_block::else_bb, noce_if_info::else_bb, find_reg_note(), ce_if_block::join_bb, noce_if_info::join_bb, last, ce_if_block::last_test_bb, merge_blocks(), ce_if_block::num_multiple_test_blocks, num_true_changes, num_updated_if_blocks, basic_block_def::preds, single_succ(), single_succ_edge(), single_succ_p(), basic_block_def::succs, ce_if_block::test_bb, noce_if_info::test_bb, ce_if_block::then_bb, noce_if_info::then_bb, and tidy_fallthru_edge().
|
static |
Return whether we can use store speculation for MEM. TOP_BB is the basic block above the conditional block where we are considering doing the speculative store. We look for whether MEM is set unconditionally later in the function.
References CDI_POST_DOMINATORS, get_immediate_dominator(), memory_must_be_modified_in_insn_p(), modified_in_p(), and volatile_insn_p().
Referenced by noce_process_if_block().
|
static |
Helper function for noce_try_cmove and noce_try_cmove_arith.
References noce_if_info::cond, noce_if_info::cond_earliest, emit_conditional_move(), emit_insn(), emit_move_insn(), end_sequence(), gen_reg_rtx(), gen_rtx_SUBREG(), general_operand(), get_insns(), noce_if_info::jump, recog_memoized(), reload_completed, and start_sequence().
Referenced by cond_move_convert_if_block(), noce_try_cmove(), and noce_try_cmove_arith().
Referenced by cond_move_convert_if_block(), noce_process_if_block(), noce_try_abs(), noce_try_addcc(), noce_try_bitop(), noce_try_cmove(), noce_try_cmove_arith(), noce_try_minmax(), noce_try_move(), noce_try_sign_mask(), noce_try_store_flag(), noce_try_store_flag_constants(), and noce_try_store_flag_mask().
|
static |
Emit instruction to move an rtx, possibly into STRICT_LOW_PART. X is the destination/target and Y is the value to copy.
References code_to_optab(), emit_insn(), emit_move_insn(), end_sequence(), expand_binop(), expand_unop(), get_insns(), HOST_WIDE_INT, OPTAB_DIRECT, recog_memoized(), RTX_BIN_ARITH, RTX_COMM_ARITH, RTX_UNARY, start_sequence(), and store_bit_field().
|
static |
Helper function for noce_try_store_flag*.
References noce_if_info::cond, noce_if_info::cond_earliest, emit_insn(), emit_store_flag(), end_sequence(), general_operand(), get_insns(), noce_if_info::jump, pc_set(), recog_memoized(), reversed_comparison_code(), start_sequence(), and noce_if_info::then_else_reversed.
Referenced by noce_try_addcc(), noce_try_store_flag(), noce_try_store_flag_constants(), and noce_try_store_flag_mask().
|
static |
Determine if a given basic block heads a simple IF-THEN-JOIN or an IF-THEN-ELSE-JOIN block. If so, we'll try to convert the insns to not require the branch, using only transformations that do not require conditional execution. Return TRUE if we were successful at converting the block.
References noce_if_info::branch_cost, noce_if_info::cond, noce_if_info::cond_earliest, cond_move_process_if_block(), edge_def::dest, dump_file, noce_if_info::else_bb, basic_block_def::index, noce_if_info::join_bb, noce_if_info::jump, memset(), noce_get_condition(), noce_process_if_block(), num_possible_if_blocks, onlyjump_p(), optimize_bb_for_speed_p(), predictable_edge_p(), reload_completed, single_pred_p(), single_succ(), single_succ_edge(), single_succ_p(), noce_if_info::test_bb, noce_if_info::then_bb, and noce_if_info::then_else_reversed.
Referenced by find_if_header().
|
static |
For most cases, the simplified condition we found is the best choice, but this is not the case for the min/max/abs transforms. For these we wish to know that it is A or B in the condition.
References noce_if_info::a, noce_if_info::b, canonicalize_condition(), noce_if_info::cond, noce_if_info::cond_earliest, find_reg_equal_equiv_note(), HOST_WIDE_INT, noce_if_info::jump, modified_in_p(), pc_set(), prev_nonnote_insn(), reg_mentioned_p(), reg_overlap_mentioned_p(), rtx_equal_p(), SET, swap_condition(), noce_if_info::then_else_reversed, and noce_if_info::x.
Referenced by noce_try_abs(), and noce_try_minmax().
Referenced by dead_or_predicable(), find_cond_trap(), and noce_find_if_block().
|
static |
Similar to get_condition, only the resulting condition must be valid at JUMP, instead of at EARLIEST. If THEN_ELSE_REVERSED is true, the fallthrough does not go to the THEN block of the caller, and we have to reverse the condition.
References any_condjump_p(), canonicalize_condition(), pc_set(), reverse_condition(), side_effects_p(), and targetm.
|
static |
Return true if a write into MEM may trap or fault.
References decl_readonly_section(), may_trap_or_fault_p(), and targetm.
Referenced by noce_process_if_block().
|
static |
Referenced by noce_process_if_block().
|
static |
Return true if OP is ok for if-then-else processing.
References may_trap_p(), and side_effects_p().
|
static |
Given a simple IF-THEN-JOIN or IF-THEN-ELSE-JOIN block, attempt to convert it without using conditional execution. Return TRUE if we were successful at converting the block.
References noce_if_info::a, noce_if_info::b, can_merge_blocks_p(), noce_if_info::cond, noce_if_info::cond_earliest, delete_basic_block(), noce_if_info::else_bb, emit_insn_before_setloc(), end_sequence(), find_edge(), find_reg_note(), first_active_insn(), gen_reg_rtx(), get_insns(), noce_if_info::insn_a, noce_if_info::insn_b, noce_if_info::join_bb, noce_if_info::jump, last_active_insn(), merge_blocks(), modified_between_p(), noce_can_store_speculate_p(), noce_emit_move_insn(), noce_mem_write_may_trap_or_fault_p(), noce_operand_ok(), noce_try_abs(), noce_try_addcc(), noce_try_bitop(), noce_try_cmove(), noce_try_cmove_arith(), noce_try_minmax(), noce_try_move(), noce_try_sign_mask(), noce_try_store_flag(), noce_try_store_flag_constants(), noce_try_store_flag_mask(), num_true_changes, num_updated_if_blocks, prev_nonnote_nondebug_insn(), redirect_edge_and_branch_force(), reg_overlap_mentioned_p(), remove_edge(), remove_note(), reorder_insns(), rtx_equal_p(), set_used_flags(), side_effects_p(), single_succ_edge(), start_sequence(), targetm, noce_if_info::test_bb, noce_if_info::then_bb, unshare_all_rtl_in_chain(), and noce_if_info::x.
Referenced by noce_find_if_block().
|
static |
Referenced by noce_process_if_block().
|
static |
Convert "if (a < 0) x = -a; else x = a;" to "x = abs(a);", "if (a < 0) x = ~a; else x = a;" to "x = one_cmpl_abs(a);", etc.
References noce_if_info::a, noce_if_info::b, noce_if_info::cond, noce_if_info::cond_earliest, emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), expand_abs_nojump(), expand_one_cmpl_abs_nojump(), expand_simple_unop(), find_reg_equal_equiv_note(), get_pool_constant(), noce_if_info::insn_a, noce_if_info::jump, noce_emit_move_insn(), noce_get_alt_condition(), prev_nonnote_insn(), rtx_equal_p(), start_sequence(), and noce_if_info::x.
|
static |
Referenced by noce_process_if_block().
|
static |
Convert "if (test) foo++" into "foo += (test != 0)", and similarly for "foo--".
References noce_if_info::a, noce_if_info::b, noce_if_info::branch_cost, noce_if_info::cond, emit_conditional_add(), emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), expand_simple_binop(), gen_reg_rtx(), general_operand(), noce_if_info::insn_a, noce_if_info::jump, noce_emit_move_insn(), noce_emit_store_flag(), normalize(), OPTAB_WIDEN, reversed_comparison_code(), rtx_equal_p(), start_sequence(), and noce_if_info::x.
|
static |
Optimize away "if (x & C) x |= C" and similar bit manipulation transformations.
References noce_if_info::a, noce_if_info::b, noce_if_info::cond, emit_insn_before_setloc(), end_ifcvt_sequence(), gen_int_mode(), HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, noce_if_info::insn_a, noce_if_info::jump, noce_emit_move_insn(), rtx_equal_p(), simplify_gen_binary(), start_sequence(), and noce_if_info::x.
Referenced by noce_process_if_block().
|
static |
Referenced by noce_process_if_block().
|
static |
Try only simple constants and registers here. More complex cases are handled in noce_try_cmove_arith after noce_try_store_flag_arith has had a go at it.
References noce_if_info::a, noce_if_info::b, noce_if_info::cond, emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), noce_if_info::insn_a, noce_if_info::jump, noce_emit_cmove(), noce_emit_move_insn(), register_operand(), start_sequence(), and noce_if_info::x.
|
static |
Referenced by noce_process_if_block().
|
static |
Try more complex cases involving conditional_move.
References noce_if_info::a, noce_if_info::b, noce_if_info::branch_cost, noce_if_info::cond, copy_rtx(), cse_not_expected, emit_insn(), emit_insn_before(), emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), gen_reg_rtx(), gen_rtx_MEM(), general_operand(), get_address_mode(), get_insns(), get_last_insn(), noce_if_info::insn_a, noce_if_info::insn_b, insn_cost(), insn_rtx_cost(), noce_if_info::jump, last, may_trap_or_fault_p(), modified_in_p(), noce_emit_cmove(), noce_emit_move_insn(), optimize_bb_for_speed_p(), recog_memoized(), reversed_comparison_code(), rtx_equal_p(), set_mem_addr_space(), set_mem_alias_set(), set_mem_align(), start_sequence(), and noce_if_info::x.
|
static |
Referenced by noce_process_if_block().
|
static |
Convert "if (a < b) x = a; else x = b;" to "x = min(a, b);", etc.
References noce_if_info::a, noce_if_info::b, noce_if_info::cond, noce_if_info::cond_earliest, emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), expand_simple_binop(), noce_if_info::insn_a, noce_if_info::jump, noce_emit_move_insn(), noce_get_alt_condition(), OPTAB_WIDEN, rtx_equal_p(), start_sequence(), swap_condition(), and noce_if_info::x.
|
static |
Referenced by noce_process_if_block().
|
static |
Convert "if (a != b) x = a; else x = b" into "x = a" and "if (a == b) x = a; else x = b" into "x = b".
References noce_if_info::a, noce_if_info::b, noce_if_info::cond, emit_insn_before_setloc(), end_ifcvt_sequence(), noce_if_info::insn_a, noce_if_info::jump, noce_emit_move_insn(), rtx_equal_p(), start_sequence(), and noce_if_info::x.
|
static |
Referenced by noce_process_if_block().
|
static |
Convert "if (m < 0) x = b; else x = 0;" to "x = (m >> C) & b;".
References noce_if_info::a, noce_if_info::b, noce_if_info::cond, emit_insn_before_setloc(), emit_store_flag(), end_ifcvt_sequence(), end_sequence(), expand_binop(), gen_reg_rtx(), noce_if_info::insn_a, noce_if_info::insn_b, noce_if_info::jump, noce_emit_move_insn(), OPTAB_DIRECT, optimize_bb_for_speed_p(), set_src_cost(), side_effects_p(), start_sequence(), noce_if_info::test_bb, and noce_if_info::x.
|
static |
Referenced by noce_process_if_block().
|
static |
Convert "if (test) x = 1; else x = 0". Only try 0 and STORE_FLAG_VALUE here. Other combinations will be tried in noce_try_store_flag_constants after noce_try_cmove has had a go at the conversion.
References noce_if_info::a, noce_if_info::b, noce_if_info::cond, emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), noce_if_info::insn_a, noce_if_info::jump, noce_emit_move_insn(), noce_emit_store_flag(), reversed_comparison_code(), start_sequence(), and noce_if_info::x.
|
static |
Referenced by noce_process_if_block().
|
static |
Convert "if (test) x = a; else x = b", for A and B constant.
References noce_if_info::a, noce_if_info::b, noce_if_info::branch_cost, noce_if_info::cond, emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), exact_log2(), expand_simple_binop(), HOST_WIDE_INT, noce_if_info::insn_a, noce_if_info::jump, noce_emit_move_insn(), noce_emit_store_flag(), normalize(), OPTAB_WIDEN, reversed_comparison_code(), start_sequence(), trunc_int_for_mode(), and noce_if_info::x.
|
static |
Referenced by noce_process_if_block().
|
static |
Convert "if (test) x = 0;" to "x &= -(test == 0);"
References noce_if_info::a, noce_if_info::b, noce_if_info::branch_cost, noce_if_info::cond, emit_insn_before_setloc(), end_ifcvt_sequence(), end_sequence(), expand_simple_binop(), gen_reg_rtx(), noce_if_info::insn_a, noce_if_info::jump, noce_emit_move_insn(), noce_emit_store_flag(), OPTAB_WIDEN, reversed_comparison_code(), rtx_equal_p(), start_sequence(), and noce_if_info::x.
|
static |
Rerun if-conversion, as combine may have simplified things enough to now meet sequence length restrictions.
References if_convert().
|
static |
References if_convert().
|
static |
If-conversion and CFG cleanup.
References cleanup_cfg(), dump_file, dump_flags, dump_flow_info(), dump_reg_info(), and if_convert().
|
static |
Whether conditional execution changes were made.
Referenced by cond_exec_process_if_block(), find_if_header(), and if_convert().
|
static |
True if after combine pass.
Referenced by cheap_bb_rtx_cost_p(), and if_convert().
|
static |
# of IF-THEN or IF-THEN-ELSE blocks we looked at
Referenced by cond_exec_find_if_block(), find_if_case_1(), find_if_case_2(), if_convert(), and noce_find_if_block().
|
static |
# of changes made.
Referenced by cond_move_process_if_block(), find_cond_trap(), find_if_case_1(), find_if_case_2(), if_convert(), merge_if_block(), and noce_process_if_block().
|
static |
# of IF-THEN or IF-THEN-ELSE blocks were converted to conditional execution.
Referenced by cond_move_process_if_block(), find_cond_trap(), find_if_case_1(), find_if_case_2(), if_convert(), merge_if_block(), and noce_process_if_block().