From 33fa2366feb2ada86750eed941aed922885d89b1 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 8 Jan 2014 15:42:28 -0500 Subject: [PATCH 105/159] FIXME: ifcvt.c --- gcc/ifcvt.c | 57 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index e2c51a6..cd6afc9 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -91,8 +91,9 @@ static rtx_base_insn last_active_insn (basic_block, int); static rtx_base_insn find_active_insn_before (basic_block, rtx_base_insn); static rtx_base_insn find_active_insn_after (basic_block, rtx_base_insn); static basic_block block_fallthru (basic_block); -static int cond_exec_process_insns (ce_if_block_t *, rtx_base_insn, rtx, rtx, int, int); -static rtx cond_exec_get_condition (rtx); +static int cond_exec_process_insns (ce_if_block_t *, rtx_base_insn, + rtx_base_insn, rtx, int, int); +static rtx cond_exec_get_condition (rtx_base_insn); static rtx noce_get_condition (rtx_base_insn, rtx_base_insn *, bool); static int noce_operand_ok (const_rtx); static void merge_if_block (ce_if_block_t *); @@ -114,7 +115,7 @@ static int count_bb_insns (const_basic_block bb) { int count = 0; - rtx insn = BB_HEAD (bb); + rtx_base_insn insn = BB_HEAD (bb); while (1) { @@ -141,7 +142,7 @@ static bool cheap_bb_rtx_cost_p (const_basic_block bb, int scale, int max_cost) { int count = 0; - rtx insn = BB_HEAD (bb); + rtx_base_insn insn = BB_HEAD (bb); bool speed = optimize_bb_for_speed_p (bb); /* Set scale to REG_BR_PROB_BASE to void the identical scaling @@ -314,7 +315,7 @@ block_fallthru (basic_block bb) static int cond_exec_process_insns (ce_if_block_t *ce_info ATTRIBUTE_UNUSED, /* if block information */rtx_base_insn start, - /* first insn to look at */rtx end, + /* first insn to look at */rtx_base_insn end, /* last insn to look at */rtx test, /* conditional execution test */int prob_val, /* probability of branch taken. */int mod_ok) @@ -403,7 +404,7 @@ cond_exec_process_insns (ce_if_block_t *ce_info ATTRIBUTE_UNUSED, /* Return the condition for a jump. Do not do any special processing. */ static rtx -cond_exec_get_condition (rtx jump) +cond_exec_get_condition (rtx_base_insn jump) { rtx test_if, cond; @@ -877,7 +878,8 @@ noce_emit_move_insn (rtx x, rtx y) if (GET_CODE (x) != STRICT_LOW_PART) { - rtx seq, insn, target; + rtx_base_insn seq, insn; + rtx target; optab ot; start_sequence (); @@ -977,11 +979,11 @@ noce_emit_move_insn (rtx x, rtx y) that are instructions are unshared, recognizable non-jump insns. On failure, this function returns a NULL_RTX. */ -static rtx +static rtx_base_insn end_ifcvt_sequence (struct noce_if_info *if_info) { - rtx insn; - rtx seq = get_insns (); + rtx_base_insn insn; + rtx_base_insn seq = get_insns (); set_used_flags (if_info->x); set_used_flags (if_info->cond); @@ -997,7 +999,7 @@ end_ifcvt_sequence (struct noce_if_info *if_info) for (insn = seq; insn; insn = NEXT_INSN (insn)) if (JUMP_P (insn) || recog_memoized (insn) == -1) - return NULL_RTX; + return NULL_RTX_BASE_INSN; return seq; } @@ -1010,7 +1012,8 @@ noce_try_move (struct noce_if_info *if_info) { rtx cond = if_info->cond; enum rtx_code code = GET_CODE (cond); - rtx y, seq; + rtx y; + rtx_base_insn seq; if (code != NE && code != EQ) return FALSE; @@ -1057,7 +1060,8 @@ static int noce_try_store_flag (struct noce_if_info *if_info) { int reversep; - rtx target, seq; + rtx target; + rtx_base_insn seq; if (CONST_INT_P (if_info->b) && INTVAL (if_info->b) == STORE_FLAG_VALUE @@ -1100,7 +1104,8 @@ noce_try_store_flag (struct noce_if_info *if_info) static int noce_try_store_flag_constants (struct noce_if_info *if_info) { - rtx target, seq; + rtx target; + rtx_base_insn seq; int reversep; HOST_WIDE_INT itrue, ifalse, diff, tmp; int normalize, can_reverse; @@ -1229,7 +1234,8 @@ noce_try_store_flag_constants (struct noce_if_info *if_info) static int noce_try_addcc (struct noce_if_info *if_info) { - rtx target, seq; + rtx target; + rtx_base_insn seq; int subtract, normalize; if (GET_CODE (if_info->a) == PLUS @@ -1319,7 +1325,8 @@ noce_try_addcc (struct noce_if_info *if_info) static int noce_try_store_flag_mask (struct noce_if_info *if_info) { - rtx target, seq; + rtx target; + rtx_base_insn seq; int reversep; reversep = 0; @@ -1479,7 +1486,8 @@ static int noce_try_cmove (struct noce_if_info *if_info) { enum rtx_code code; - rtx target, seq; + rtx target; + rtx_base_insn seq; if ((CONSTANT_P (if_info->a) || register_operand (if_info->a, VOIDmode)) && (CONSTANT_P (if_info->b) || register_operand (if_info->b, VOIDmode))) @@ -1869,7 +1877,8 @@ noce_get_alt_condition (struct noce_if_info *if_info, rtx target, static int noce_try_minmax (struct noce_if_info *if_info) { - rtx cond, target, seq; + rtx cond, target; + rtx_base_insn seq; rtx_base_insn earliest; enum rtx_code code, op; int unsignedp; @@ -1965,8 +1974,8 @@ noce_try_minmax (struct noce_if_info *if_info) static int noce_try_abs (struct noce_if_info *if_info) { - rtx cond, target, seq, a, b, c; - rtx_base_insn earliest; + rtx cond, target, a, b, c; + rtx_base_insn seq, earliest; int negate; bool one_cmpl = false; @@ -2111,7 +2120,8 @@ noce_try_abs (struct noce_if_info *if_info) static int noce_try_sign_mask (struct noce_if_info *if_info) { - rtx cond, t, m, c, seq; + rtx cond, t, m, c; + rtx_base_insn seq; enum machine_mode mode; enum rtx_code code; bool t_unconditional; @@ -2189,7 +2199,8 @@ noce_try_sign_mask (struct noce_if_info *if_info) static int noce_try_bitop (struct noce_if_info *if_info) { - rtx cond, x, a, result, seq; + rtx cond, x, a, result; + rtx_base_insn seq; enum machine_mode mode; enum rtx_code code; int bitnum; @@ -2876,7 +2887,7 @@ cond_move_process_if_block (struct noce_if_info *if_info) basic_block join_bb = if_info->join_bb; rtx jump = if_info->jump; rtx cond = if_info->cond; - rtx seq, loc_insn; + rtx_base_insn seq, loc_insn; rtx reg; int c; struct pointer_map_t *then_vals; -- 1.7.11.7