diff options
author | Kyrylo Tkachov <kyrylo.tkachov@arm.com> | 2015-07-24 16:46:04 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-07-24 16:46:04 +0000 |
commit | 4e1952ab19938ee492bc15c0df77f959ab0cd9d3 (patch) | |
tree | 4090694940b64deeb37bc9afbf88a6d707ab475a /gcc/alias.c | |
parent | 317b56409228e8cb31db71871d3e5e5b12d78ff0 (diff) | |
download | gcc-4e1952ab19938ee492bc15c0df77f959ab0cd9d3.zip gcc-4e1952ab19938ee492bc15c0df77f959ab0cd9d3.tar.gz gcc-4e1952ab19938ee492bc15c0df77f959ab0cd9d3.tar.bz2 |
[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.
From-SVN: r226179
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 69e3732..4681e3f 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 |