commit 8ab508f57d6f10ac6ec97f61f80689807821772f
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date: Fri Jul 24 16:16:35 2015 +0100
[obvious] Use std::swap instead of manually swapping in a few more places
@@ -2466,7 +2466,7 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y, bool loop_invariant)
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)
@@ -2583,8 +2583,8 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y, bool loop_invariant)
/* 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
@@ -3297,9 +3297,8 @@ fold_rtx (rtx x, rtx_insn *insn)
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 ();
@@ -215,7 +215,6 @@ setup_elimination_map (void)
static rtx
form_sum (rtx x, rtx y)
{
- rtx tem;
machine_mode mode = GET_MODE (x);
if (mode == VOIDmode)
@@ -229,7 +228,7 @@ form_sum (rtx x, rtx y)
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));