aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-11-10 16:09:57 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-11-10 16:09:57 +0000
commit2c6d101a7ad799f57dcf479731dcff2af97e03d9 (patch)
tree47f2e24efd83d5866506c83d397cc7860399b918
parent39e6b9c03bc4faff9a7a7326ac3aea888265a70d (diff)
parent95d31b633e98e8cad03f0f59d963044158555c1c (diff)
downloadv8-nougat-iot-release.tar.gz
-rw-r--r--src/compiler/gap-resolver.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/compiler/gap-resolver.cc b/src/compiler/gap-resolver.cc
index 1ba1044e..b85f96e3 100644
--- a/src/compiler/gap-resolver.cc
+++ b/src/compiler/gap-resolver.cc
@@ -5,7 +5,6 @@
#include "src/compiler/gap-resolver.h"
#include <algorithm>
-#include <functional>
#include <set>
namespace v8 {
@@ -19,10 +18,6 @@ namespace {
const int kFloat32Bit = REP_BIT(MachineRepresentation::kFloat32);
const int kFloat64Bit = REP_BIT(MachineRepresentation::kFloat64);
-inline bool Blocks(MoveOperands* move, InstructionOperand destination) {
- return !move->IsEliminated() && move->source().InterferesWith(destination);
-}
-
// Splits a FP move between two location operands into the equivalent series of
// moves between smaller sub-operands, e.g. a double move to two single moves.
// This helps reduce the number of cycles that would normally occur under FP
@@ -196,8 +191,11 @@ void GapResolver::PerformMove(ParallelMove* moves, MoveOperands* move) {
// The move may be blocked on a (at most one) pending move, in which case we
// have a cycle. Search for such a blocking move and perform a swap to
// resolve it.
- auto blocker = std::find_if(moves->begin(), moves->end(),
- std::bind2nd(std::ptr_fun(&Blocks), destination));
+ auto blocker =
+ std::find_if(moves->begin(), moves->end(), [&](MoveOperands* move) {
+ return !move->IsEliminated() &&
+ move->source().InterferesWith(destination);
+ });
if (blocker == moves->end()) {
// The easy case: This move is not blocked.
assembler_->AssembleMove(&source, &destination);