+2015-07-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * alias.c (nonoverlapping_memrefs_p): Use std::swap instead of
+ manually swapping values.
+ * cse.c (fold_rtx): Likewise.
+ * lra-eliminations.c (form_sum): Likewise.
+
2015-07-24 Uros Bizjak <ubizjak@gmail.com>
PR target/64003
rtx basex, basey;
bool moffsetx_known_p, moffsety_known_p;
HOST_WIDE_INT moffsetx = 0, moffsety = 0;
- HOST_WIDE_INT offsetx = 0, offsety = 0, sizex, sizey, tem;
+ HOST_WIDE_INT offsetx = 0, offsety = 0, sizex, sizey;
/* Unless both have exprs, we can't tell anything. */
if (exprx == 0 || expry == 0)
/* Put the values of the memref with the lower offset in X's values. */
if (offsetx > offsety)
{
- tem = offsetx, offsetx = offsety, offsety = tem;
- tem = sizex, sizex = sizey, sizey = tem;
+ std::swap (offsetx, offsety);
+ std::swap (sizex, sizey);
}
/* If we don't know the size of the lower-offset value, we can't tell
consistent with the order in X. */
if (canonicalize_change_group (insn, x))
{
- rtx tem;
- tem = const_arg0, const_arg0 = const_arg1, const_arg1 = tem;
- tem = folded_arg0, folded_arg0 = folded_arg1, folded_arg1 = tem;
+ std::swap (const_arg0, const_arg1);
+ std::swap (folded_arg0, folded_arg1);
}
apply_change_group ();
static rtx
form_sum (rtx x, rtx y)
{
- rtx tem;
machine_mode mode = GET_MODE (x);
if (mode == VOIDmode)
else if (CONST_INT_P (y))
return plus_constant (mode, x, INTVAL (y));
else if (CONSTANT_P (x))
- tem = x, x = y, y = tem;
+ std::swap (x, y);
if (GET_CODE (x) == PLUS && CONSTANT_P (XEXP (x, 1)))
return form_sum (XEXP (x, 0), form_sum (XEXP (x, 1), y));