ifcvt.c (noce_try_cmove_arith): Fix long lines.

* ifcvt.c (noce_try_cmove_arith): Fix long lines.
	(check_cond_move_block): Likewise.
	(cond_move_process_if_block): Likewise.
	(noce_find_if_block): Improve formatting.
	(find_if_header): Pass 0 to memset and tweak conditions.
	(cond_exec_find_if_block): Fix long lines and tweak conditions.

From-SVN: r158529
This commit is contained in:
Eric Botcazou 2010-04-19 22:04:57 +00:00 committed by Eric Botcazou
parent 310e447210
commit d321bd2d6e
2 changed files with 33 additions and 20 deletions

View File

@ -1,3 +1,12 @@
2010-04-19 Eric Botcazou <ebotcazou@adacore.com>
* ifcvt.c (noce_try_cmove_arith): Fix long lines.
(check_cond_move_block): Likewise.
(cond_move_process_if_block): Likewise.
(noce_find_if_block): Improve formatting.
(find_if_header): Pass 0 to memset and tweak conditions.
(cond_exec_find_if_block): Fix long lines and tweak conditions.
2010-04-19 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (lower_bound_default): For DW_LANG_Python return

View File

@ -1440,8 +1440,9 @@ noce_try_cmove_arith (struct noce_if_info *if_info)
if insn_rtx_cost can't be estimated. */
if (insn_a)
{
insn_cost = insn_rtx_cost (PATTERN (insn_a),
optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn_a)));
insn_cost
= insn_rtx_cost (PATTERN (insn_a),
optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn_a)));
if (insn_cost == 0 || insn_cost > COSTS_N_INSNS (if_info->branch_cost))
return FALSE;
}
@ -1450,8 +1451,9 @@ noce_try_cmove_arith (struct noce_if_info *if_info)
if (insn_b)
{
insn_cost += insn_rtx_cost (PATTERN (insn_b),
optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn_b)));
insn_cost
+= insn_rtx_cost (PATTERN (insn_b),
optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn_b)));
if (insn_cost == 0 || insn_cost > COSTS_N_INSNS (if_info->branch_cost))
return FALSE;
}
@ -2579,7 +2581,8 @@ noce_process_if_block (struct noce_if_info *if_info)
REGS. COND is the condition we will test. */
static int
check_cond_move_block (basic_block bb, rtx *vals, VEC (int, heap) **regs, rtx cond)
check_cond_move_block (basic_block bb, rtx *vals, VEC (int, heap) **regs,
rtx cond)
{
rtx insn;
@ -2743,7 +2746,8 @@ cond_move_process_if_block (struct noce_if_info *if_info)
/* Make sure the blocks are suitable. */
if (!check_cond_move_block (then_bb, then_vals, &then_regs, cond)
|| (else_bb && !check_cond_move_block (else_bb, else_vals, &else_regs, cond)))
|| (else_bb
&& !check_cond_move_block (else_bb, else_vals, &else_regs, cond)))
{
VEC_free (int, heap, then_regs);
VEC_free (int, heap, else_regs);
@ -2859,8 +2863,7 @@ cond_move_process_if_block (struct noce_if_info *if_info)
Return TRUE if we were successful at converting the block. */
static int
noce_find_if_block (basic_block test_bb,
edge then_edge, edge else_edge,
noce_find_if_block (basic_block test_bb, edge then_edge, edge else_edge,
int pass)
{
basic_block then_bb, else_bb, join_bb;
@ -2941,9 +2944,7 @@ noce_find_if_block (basic_block test_bb,
return FALSE;
/* If this is not a standard conditional jump, we can't parse it. */
cond = noce_get_condition (jump,
&cond_earliest,
then_else_reversed);
cond = noce_get_condition (jump, &cond_earliest, then_else_reversed);
if (!cond)
return FALSE;
@ -3135,7 +3136,7 @@ find_if_header (basic_block test_bb, int pass)
/* Otherwise this must be a multiway branch of some sort. */
return NULL;
memset (&ce_info, '\0', sizeof (ce_info));
memset (&ce_info, 0, sizeof (ce_info));
ce_info.test_bb = test_bb;
ce_info.then_bb = then_edge->dest;
ce_info.else_bb = else_edge->dest;
@ -3145,11 +3146,12 @@ find_if_header (basic_block test_bb, int pass)
IFCVT_INIT_EXTRA_FIELDS (&ce_info);
#endif
if (! reload_completed
if (!reload_completed
&& noce_find_if_block (test_bb, then_edge, else_edge, pass))
goto success;
if (targetm.have_conditional_execution () && reload_completed
if (reload_completed
&& targetm.have_conditional_execution ()
&& cond_exec_find_if_block (&ce_info))
goto success;
@ -3159,7 +3161,7 @@ find_if_header (basic_block test_bb, int pass)
goto success;
if (dom_info_state (CDI_POST_DOMINATORS) >= DOM_NO_FAST_QUERY
&& (! targetm.have_conditional_execution () || reload_completed))
&& (reload_completed || !targetm.have_conditional_execution ()))
{
if (find_if_case_1 (test_bb, then_edge, else_edge))
goto success;
@ -3265,8 +3267,8 @@ cond_exec_find_if_block (struct ce_if_block * ce_info)
ce_info->last_test_bb = test_bb;
/* We only ever should get here after reload,
and only if we have conditional execution. */
gcc_assert (targetm.have_conditional_execution () && reload_completed);
and if we have conditional execution. */
gcc_assert (reload_completed && targetm.have_conditional_execution ());
/* Discover if any fall through predecessors of the current test basic block
were && tests (which jump to the else block) or || tests (which jump to
@ -3347,7 +3349,8 @@ cond_exec_find_if_block (struct ce_if_block * ce_info)
if (EDGE_COUNT (then_bb->succs) > 0
&& (!single_succ_p (then_bb)
|| (single_succ_edge (then_bb)->flags & EDGE_COMPLEX)
|| (epilogue_completed && tablejump_p (BB_END (then_bb), NULL, NULL))))
|| (epilogue_completed
&& tablejump_p (BB_END (then_bb), NULL, NULL))))
return FALSE;
/* If the THEN block has no successors, conditional execution can still
@ -3393,8 +3396,9 @@ cond_exec_find_if_block (struct ce_if_block * ce_info)
else if (single_succ_p (else_bb)
&& single_succ (then_bb) == single_succ (else_bb)
&& single_pred_p (else_bb)
&& ! (single_succ_edge (else_bb)->flags & EDGE_COMPLEX)
&& ! (epilogue_completed && tablejump_p (BB_END (else_bb), NULL, NULL)))
&& !(single_succ_edge (else_bb)->flags & EDGE_COMPLEX)
&& !(epilogue_completed
&& tablejump_p (BB_END (else_bb), NULL, NULL)))
join_bb = single_succ (else_bb);
/* Otherwise it is not an IF-THEN or IF-THEN-ELSE combination. */