aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2015-07-24 16:46:04 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2015-07-24 16:46:04 +0000
commit4e1952ab19938ee492bc15c0df77f959ab0cd9d3 (patch)
tree4090694940b64deeb37bc9afbf88a6d707ab475a /gcc/cse.c
parent317b56409228e8cb31db71871d3e5e5b12d78ff0 (diff)
downloadgcc-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/cse.c')
-rw-r--r--gcc/cse.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 96adf18..88c82fc 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -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 ();