* config/sh/sh.c: Do not include algorithm.
(sh_emit_scc_to_t): Replace open-coded swap with std::swap
to swap values.
(sh_emit_compare_and_branch): Ditto.
(sh_emit_compare_and_set): Ditto.
* config/sh/sh.md (replacement peephole2): Ditto.
(cstore4_media): Ditto.
(*fmasf4): Ditto.
From-SVN: r217626
+2014-11-16 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/sh/sh.c: Do not include algorithm.
+ (sh_emit_scc_to_t): Replace open-coded swap with std::swap
+ to swap values.
+ (sh_emit_compare_and_branch): Ditto.
+ (sh_emit_compare_and_set): Ditto.
+ * config/sh/sh.md (replacement peephole2): Ditto.
+ (cstore4_media): Ditto.
+ (*fmasf4): Ditto.
+
2014-11-15 Vladimir Makarov <vmakarov@redhat.com>
* lra-remat.c (cand_transf_func): Process regno for
#include <sstream>
#include <vector>
-#include <algorithm>
#include "config.h"
#include "system.h"
break;
}
if (code != oldcode)
- {
- rtx tmp = op0;
- op0 = op1;
- op1 = tmp;
- }
+ std::swap (op0, op1);
mode = GET_MODE (op0);
if (mode == VOIDmode)
enum rtx_code branch_code;
rtx op0 = operands[1];
rtx op1 = operands[2];
- rtx insn, tem;
+ rtx insn;
bool need_ccmpeq = false;
if (TARGET_SH2E && GET_MODE_CLASS (mode) == MODE_FLOAT)
|| (code == LE && TARGET_IEEE && TARGET_SH2E)
|| (code == GE && !(TARGET_IEEE && TARGET_SH2E)))
{
- tem = op0, op0 = op1, op1 = tem;
+ std::swap (op0, op1);
code = swap_condition (code);
}
rtx op1 = operands[3];
rtx_code_label *lab = NULL;
bool invert = false;
- rtx tem;
op0 = force_reg (mode, op0);
if ((code != EQ && code != NE
{
if (code == LT || code == LE)
{
+ std::swap (op0, op1);
code = swap_condition (code);
- tem = op0, op0 = op1, op1 = tem;
}
if (code == GE)
{
extract_insn (insn2);
if (! constrain_operands (1, get_preferred_alternatives (insn2, bb)))
{
- rtx tmp;
failure:
- tmp = replacements[0];
- replacements[0] = replacements[1];
- replacements[1] = tmp;
- tmp = replacements[2];
- replacements[2] = replacements[3];
- replacements[3] = tmp;
+ std::swap (replacements[0], replacements[1]);
+ std::swap (replacements[2], replacements[3]);
replace_n_hard_rtx (SET_DEST (set1), replacements, 2, 1);
replace_n_hard_rtx (SET_DEST (set2), replacements, 2, 1);
replace_n_hard_rtx (SET_SRC (set2), replacements, 2, 1);
if (swap)
{
- rtx tem = operands[2];
- operands[2] = operands[3];
- operands[3] = tem;
+ std::swap (operands[2], operands[3]);
code = swap_condition (code);
}
/* Change 'b * a + a' into 'a * b + a'.
This is better for register allocation. */
if (REGNO (operands[2]) == REGNO (operands[3]))
- {
- rtx tmp = operands[1];
- operands[1] = operands[2];
- operands[2] = tmp;
- }
+ std::swap (operands[1], operands[2]);
}
[(set_attr "type" "fp")
(set_attr "fp_mode" "single")])