summaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-24 16:46:04 +0000
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>2015-07-24 16:46:04 +0000
commitc586a5e3f16a0d8165912ad0681e57a3c9215e9b (patch)
tree4090694940b64deeb37bc9afbf88a6d707ab475a /gcc/alias.c
parent5be7cd7b4e8ef7b80cb68495c528010a6ba0215f (diff)
downloadgcc-c586a5e3f16a0d8165912ad0681e57a3c9215e9b.tar.gz
[obvious] Use std::swap instead of manually swapping in a few more places
* alias.c (nonoverlapping_memrefs_p): Use std::swap instead of manually swapping values. * cse.c (fold_rtx): Likewise. * lra-eliminations.c (form_sum): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226179 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 69e37326a68..4681e3f8b96 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -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)
@@ -2596,8 +2596,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