[ARM][cleanup] Simplify some expressions in some epilogue-related functions

* config/arm/arm.c (arm_emit_multi_reg_pop): Simplify definition of
	return_in_pc.  Remove redundant assignments.
	(thumb2_emit_ldrd_pop): Simplify definition of return_in_pc.
	(arm_expand_epilogue): Don't compare boolean with true in if condition.

From-SVN: r220246
This commit is contained in:
Kyrylo Tkachov 2015-01-29 13:36:22 +00:00 committed by Kyrylo Tkachov
parent f84b87aa9f
commit 16277100d3
2 changed files with 11 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2015-01-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.c (arm_emit_multi_reg_pop): Simplify definition of
return_in_pc. Remove redundant assignments.
(thumb2_emit_ldrd_pop): Simplify definition of return_in_pc.
(arm_expand_epilogue): Don't compare boolean with true in if condition.
2015-01-29 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_mode_after): Make static.

View File

@ -20273,11 +20273,10 @@ arm_emit_multi_reg_pop (unsigned long saved_regs_mask)
rtx par;
rtx dwarf = NULL_RTX;
rtx tmp, reg;
bool return_in_pc;
bool return_in_pc = saved_regs_mask & (1 << PC_REGNUM);
int offset_adj;
int emit_update;
return_in_pc = (saved_regs_mask & (1 << PC_REGNUM)) ? true : false;
offset_adj = return_in_pc ? 1 : 0;
for (i = 0; i <= LAST_ARM_REGNUM; i++)
if (saved_regs_mask & (1 << i))
@ -20293,10 +20292,7 @@ arm_emit_multi_reg_pop (unsigned long saved_regs_mask)
par = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (num_regs + emit_update + offset_adj));
if (return_in_pc)
{
tmp = ret_rtx;
XVECEXP (par, 0, 0) = tmp;
}
XVECEXP (par, 0, 0) = ret_rtx;
if (emit_update)
{
@ -20446,9 +20442,8 @@ thumb2_emit_ldrd_pop (unsigned long saved_regs_mask)
rtx par = NULL_RTX;
rtx dwarf = NULL_RTX;
rtx tmp, reg, tmp1;
bool return_in_pc;
bool return_in_pc = saved_regs_mask & (1 << PC_REGNUM);
return_in_pc = (saved_regs_mask & (1 << PC_REGNUM)) ? true : false;
for (i = 0; i <= LAST_ARM_REGNUM; i++)
if (saved_regs_mask & (1 << i))
num_regs++;
@ -25230,7 +25225,7 @@ arm_expand_epilogue (bool really_return)
arm_emit_multi_reg_pop (saved_regs_mask);
}
if (return_in_pc == true)
if (return_in_pc)
return;
}