From 7bed1d3d811b3e609593c4ff45ec5c554fba0143 Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Thu, 23 Jul 2015 09:21:27 +0000 Subject: [PATCH] [combine][obvious] Use std::swap in try_combine * combine.c (try_combine): Use std::swap instead of manually swapping. From-SVN: r226094 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c034124e558..28538ab3085 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-07-23 Kyrylo Tkachov + + * combine.c (try_combine): Use std::swap instead of manually + swapping. + 2015-07-23 Prachi Godbole * config/mips/i6400.md: New file. diff --git a/gcc/combine.c b/gcc/combine.c index 2f806abc8cf..e47cbc4552b 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -2730,11 +2730,11 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0, /* If multiple insns feed into one of I2 or I3, they can be in any order. To simplify the code below, reorder them in sequence. */ if (i0 && DF_INSN_LUID (i0) > DF_INSN_LUID (i2)) - temp_insn = i2, i2 = i0, i0 = temp_insn; + std::swap (i0, i2); if (i0 && DF_INSN_LUID (i0) > DF_INSN_LUID (i1)) - temp_insn = i1, i1 = i0, i0 = temp_insn; + std::swap (i0, i1); if (i1 && DF_INSN_LUID (i1) > DF_INSN_LUID (i2)) - temp_insn = i1, i1 = i2, i2 = temp_insn; + std::swap (i1, i2); added_links_insn = 0; -- 2.30.2