[turbofan] Introduces a step to verify the machine graph.
It is currently being rolled behind the --turbo_verify_machine_graph flag. BUG= Review-Url: https://codereview.chromium.org/2388313003 Cr-Commit-Position: refs/heads/master@{#39976}
This commit is contained in:
parent
4d45ed4597
commit
83a9356093
2
BUILD.gn
2
BUILD.gn
@ -1101,6 +1101,8 @@ v8_source_set("v8_base") {
|
||||
"src/compiler/loop-peeling.h",
|
||||
"src/compiler/loop-variable-optimizer.cc",
|
||||
"src/compiler/loop-variable-optimizer.h",
|
||||
"src/compiler/machine-graph-verifier.cc",
|
||||
"src/compiler/machine-graph-verifier.h",
|
||||
"src/compiler/machine-operator-reducer.cc",
|
||||
"src/compiler/machine-operator-reducer.h",
|
||||
"src/compiler/machine-operator.cc",
|
||||
|
667
src/compiler/machine-graph-verifier.cc
Normal file
667
src/compiler/machine-graph-verifier.cc
Normal file
@ -0,0 +1,667 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "src/compiler/machine-graph-verifier.h"
|
||||
|
||||
#include "src/compiler/common-operator.h"
|
||||
#include "src/compiler/graph.h"
|
||||
#include "src/compiler/linkage.h"
|
||||
#include "src/compiler/machine-operator.h"
|
||||
#include "src/compiler/node-properties.h"
|
||||
#include "src/compiler/node.h"
|
||||
#include "src/compiler/schedule.h"
|
||||
#include "src/zone/zone.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
namespace compiler {
|
||||
|
||||
namespace {
|
||||
|
||||
class MachineRepresentationInferrer {
|
||||
public:
|
||||
MachineRepresentationInferrer(Schedule const* schedule, Graph const* graph,
|
||||
Linkage* linkage, Zone* zone)
|
||||
: schedule_(schedule),
|
||||
linkage_(linkage),
|
||||
representation_vector_(graph->NodeCount(), zone) {
|
||||
Run();
|
||||
}
|
||||
|
||||
MachineRepresentation GetRepresentation(Node const* node) const {
|
||||
return representation_vector_.at(node->id());
|
||||
}
|
||||
|
||||
private:
|
||||
MachineRepresentation GetProjectionType(Node const* projection) {
|
||||
size_t index = ProjectionIndexOf(projection->op());
|
||||
Node* input = projection->InputAt(0);
|
||||
switch (input->opcode()) {
|
||||
case IrOpcode::kInt32AddWithOverflow:
|
||||
case IrOpcode::kInt32SubWithOverflow:
|
||||
case IrOpcode::kInt32MulWithOverflow:
|
||||
CHECK_LE(index, static_cast<size_t>(1));
|
||||
return index == 0 ? MachineRepresentation::kWord32
|
||||
: MachineRepresentation::kBit;
|
||||
case IrOpcode::kInt64AddWithOverflow:
|
||||
case IrOpcode::kInt64SubWithOverflow:
|
||||
CHECK_LE(index, static_cast<size_t>(1));
|
||||
return index == 0 ? MachineRepresentation::kWord64
|
||||
: MachineRepresentation::kBit;
|
||||
case IrOpcode::kTryTruncateFloat32ToInt64:
|
||||
case IrOpcode::kTryTruncateFloat64ToInt64:
|
||||
case IrOpcode::kTryTruncateFloat32ToUint64:
|
||||
case IrOpcode::kTryTruncateFloat64ToUint64:
|
||||
CHECK_LE(index, static_cast<size_t>(1));
|
||||
return index == 0 ? MachineRepresentation::kWord64
|
||||
: MachineRepresentation::kBit;
|
||||
case IrOpcode::kCall: {
|
||||
CallDescriptor const* desc = CallDescriptorOf(input->op());
|
||||
return desc->GetReturnType(index).representation();
|
||||
}
|
||||
default:
|
||||
return MachineRepresentation::kNone;
|
||||
}
|
||||
}
|
||||
|
||||
void Run() {
|
||||
auto blocks = schedule_->all_blocks();
|
||||
for (BasicBlock* block : *blocks) {
|
||||
for (size_t i = 0; i <= block->NodeCount(); ++i) {
|
||||
Node const* node =
|
||||
i < block->NodeCount() ? block->NodeAt(i) : block->control_input();
|
||||
if (node == nullptr) {
|
||||
DCHECK_EQ(block->NodeCount(), i);
|
||||
break;
|
||||
}
|
||||
switch (node->opcode()) {
|
||||
case IrOpcode::kParameter:
|
||||
representation_vector_[node->id()] =
|
||||
linkage_->GetParameterType(ParameterIndexOf(node->op()))
|
||||
.representation();
|
||||
break;
|
||||
case IrOpcode::kProjection: {
|
||||
representation_vector_[node->id()] = GetProjectionType(node);
|
||||
} break;
|
||||
case IrOpcode::kTypedStateValues:
|
||||
representation_vector_[node->id()] = MachineRepresentation::kNone;
|
||||
break;
|
||||
case IrOpcode::kAtomicLoad:
|
||||
case IrOpcode::kLoad:
|
||||
case IrOpcode::kProtectedLoad:
|
||||
representation_vector_[node->id()] =
|
||||
LoadRepresentationOf(node->op()).representation();
|
||||
break;
|
||||
case IrOpcode::kCheckedLoad:
|
||||
representation_vector_[node->id()] =
|
||||
CheckedLoadRepresentationOf(node->op()).representation();
|
||||
break;
|
||||
case IrOpcode::kLoadStackPointer:
|
||||
case IrOpcode::kLoadFramePointer:
|
||||
case IrOpcode::kLoadParentFramePointer:
|
||||
representation_vector_[node->id()] =
|
||||
MachineType::PointerRepresentation();
|
||||
break;
|
||||
case IrOpcode::kPhi:
|
||||
representation_vector_[node->id()] =
|
||||
PhiRepresentationOf(node->op());
|
||||
break;
|
||||
case IrOpcode::kCall: {
|
||||
CallDescriptor const* desc = CallDescriptorOf(node->op());
|
||||
if (desc->ReturnCount() > 0) {
|
||||
representation_vector_[node->id()] =
|
||||
desc->GetReturnType(0).representation();
|
||||
} else {
|
||||
representation_vector_[node->id()] =
|
||||
MachineRepresentation::kTagged;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IrOpcode::kUnalignedLoad:
|
||||
representation_vector_[node->id()] =
|
||||
UnalignedLoadRepresentationOf(node->op()).representation();
|
||||
break;
|
||||
case IrOpcode::kHeapConstant:
|
||||
case IrOpcode::kNumberConstant:
|
||||
case IrOpcode::kChangeBitToTagged:
|
||||
case IrOpcode::kIfException:
|
||||
case IrOpcode::kOsrValue:
|
||||
case IrOpcode::kChangeInt32ToTagged:
|
||||
case IrOpcode::kChangeUint32ToTagged:
|
||||
case IrOpcode::kBitcastWordToTagged:
|
||||
representation_vector_[node->id()] = MachineRepresentation::kTagged;
|
||||
break;
|
||||
case IrOpcode::kExternalConstant:
|
||||
representation_vector_[node->id()] =
|
||||
MachineType::PointerRepresentation();
|
||||
break;
|
||||
case IrOpcode::kBitcastTaggedToWord:
|
||||
representation_vector_[node->id()] =
|
||||
MachineType::PointerRepresentation();
|
||||
break;
|
||||
case IrOpcode::kBitcastWordToTaggedSigned:
|
||||
representation_vector_[node->id()] =
|
||||
MachineRepresentation::kTaggedSigned;
|
||||
break;
|
||||
case IrOpcode::kWord32Equal:
|
||||
case IrOpcode::kInt32LessThan:
|
||||
case IrOpcode::kInt32LessThanOrEqual:
|
||||
case IrOpcode::kUint32LessThan:
|
||||
case IrOpcode::kUint32LessThanOrEqual:
|
||||
case IrOpcode::kWord64Equal:
|
||||
case IrOpcode::kInt64LessThan:
|
||||
case IrOpcode::kInt64LessThanOrEqual:
|
||||
case IrOpcode::kUint64LessThan:
|
||||
case IrOpcode::kUint64LessThanOrEqual:
|
||||
case IrOpcode::kFloat32Equal:
|
||||
case IrOpcode::kFloat32LessThan:
|
||||
case IrOpcode::kFloat32LessThanOrEqual:
|
||||
case IrOpcode::kFloat64Equal:
|
||||
case IrOpcode::kFloat64LessThan:
|
||||
case IrOpcode::kFloat64LessThanOrEqual:
|
||||
case IrOpcode::kChangeTaggedToBit:
|
||||
representation_vector_[node->id()] = MachineRepresentation::kBit;
|
||||
break;
|
||||
#define LABEL(opcode) case IrOpcode::k##opcode:
|
||||
case IrOpcode::kTruncateInt64ToInt32:
|
||||
case IrOpcode::kTruncateFloat32ToInt32:
|
||||
case IrOpcode::kTruncateFloat32ToUint32:
|
||||
case IrOpcode::kBitcastFloat32ToInt32:
|
||||
case IrOpcode::kInt32x4ExtractLane:
|
||||
case IrOpcode::kInt32Constant:
|
||||
case IrOpcode::kRelocatableInt32Constant:
|
||||
case IrOpcode::kTruncateFloat64ToWord32:
|
||||
case IrOpcode::kTruncateFloat64ToUint32:
|
||||
case IrOpcode::kChangeFloat64ToInt32:
|
||||
case IrOpcode::kChangeFloat64ToUint32:
|
||||
case IrOpcode::kRoundFloat64ToInt32:
|
||||
case IrOpcode::kFloat64ExtractLowWord32:
|
||||
case IrOpcode::kFloat64ExtractHighWord32:
|
||||
MACHINE_UNOP_32_LIST(LABEL)
|
||||
MACHINE_BINOP_32_LIST(LABEL) {
|
||||
representation_vector_[node->id()] =
|
||||
MachineRepresentation::kWord32;
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kChangeInt32ToInt64:
|
||||
case IrOpcode::kChangeUint32ToUint64:
|
||||
case IrOpcode::kInt64Constant:
|
||||
case IrOpcode::kRelocatableInt64Constant:
|
||||
case IrOpcode::kBitcastFloat64ToInt64:
|
||||
MACHINE_BINOP_64_LIST(LABEL) {
|
||||
representation_vector_[node->id()] =
|
||||
MachineRepresentation::kWord64;
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kRoundInt32ToFloat32:
|
||||
case IrOpcode::kRoundUint32ToFloat32:
|
||||
case IrOpcode::kRoundInt64ToFloat32:
|
||||
case IrOpcode::kRoundUint64ToFloat32:
|
||||
case IrOpcode::kFloat32Constant:
|
||||
case IrOpcode::kTruncateFloat64ToFloat32:
|
||||
MACHINE_FLOAT32_BINOP_LIST(LABEL)
|
||||
MACHINE_FLOAT32_UNOP_LIST(LABEL) {
|
||||
representation_vector_[node->id()] =
|
||||
MachineRepresentation::kFloat32;
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kRoundInt64ToFloat64:
|
||||
case IrOpcode::kRoundUint64ToFloat64:
|
||||
case IrOpcode::kChangeFloat32ToFloat64:
|
||||
case IrOpcode::kChangeInt32ToFloat64:
|
||||
case IrOpcode::kChangeUint32ToFloat64:
|
||||
case IrOpcode::kFloat64Constant:
|
||||
case IrOpcode::kFloat64SilenceNaN:
|
||||
MACHINE_FLOAT64_BINOP_LIST(LABEL)
|
||||
MACHINE_FLOAT64_UNOP_LIST(LABEL) {
|
||||
representation_vector_[node->id()] =
|
||||
MachineRepresentation::kFloat64;
|
||||
}
|
||||
break;
|
||||
#undef LABEL
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Schedule const* const schedule_;
|
||||
Linkage const* const linkage_;
|
||||
ZoneVector<MachineRepresentation> representation_vector_;
|
||||
};
|
||||
|
||||
class MachineRepresentationChecker {
|
||||
public:
|
||||
MachineRepresentationChecker(Schedule const* const schedule,
|
||||
MachineRepresentationInferrer const* const typer)
|
||||
: schedule_(schedule), typer_(typer) {}
|
||||
|
||||
void Run() {
|
||||
BasicBlockVector const* blocks = schedule_->all_blocks();
|
||||
for (BasicBlock* block : *blocks) {
|
||||
for (size_t i = 0; i <= block->NodeCount(); ++i) {
|
||||
Node const* node =
|
||||
i < block->NodeCount() ? block->NodeAt(i) : block->control_input();
|
||||
if (node == nullptr) {
|
||||
DCHECK_EQ(block->NodeCount(), i);
|
||||
break;
|
||||
}
|
||||
switch (node->opcode()) {
|
||||
case IrOpcode::kCall:
|
||||
case IrOpcode::kTailCall:
|
||||
CheckCallInputs(node);
|
||||
break;
|
||||
case IrOpcode::kChangeBitToTagged:
|
||||
CHECK_EQ(MachineRepresentation::kBit,
|
||||
typer_->GetRepresentation(node->InputAt(0)));
|
||||
break;
|
||||
case IrOpcode::kChangeTaggedToBit:
|
||||
CHECK_EQ(MachineRepresentation::kTagged,
|
||||
typer_->GetRepresentation(node->InputAt(0)));
|
||||
break;
|
||||
case IrOpcode::kRoundInt64ToFloat64:
|
||||
case IrOpcode::kRoundUint64ToFloat64:
|
||||
case IrOpcode::kRoundInt64ToFloat32:
|
||||
case IrOpcode::kRoundUint64ToFloat32:
|
||||
case IrOpcode::kTruncateInt64ToInt32:
|
||||
CheckValueInputForInt64Op(node, 0);
|
||||
break;
|
||||
case IrOpcode::kBitcastWordToTagged:
|
||||
case IrOpcode::kBitcastWordToTaggedSigned:
|
||||
CheckValueInputRepresentationIs(
|
||||
node, 0, MachineType::PointerRepresentation());
|
||||
break;
|
||||
case IrOpcode::kBitcastTaggedToWord:
|
||||
CheckValueInputIsTagged(node, 0);
|
||||
break;
|
||||
case IrOpcode::kTruncateFloat64ToWord32:
|
||||
case IrOpcode::kTruncateFloat64ToUint32:
|
||||
case IrOpcode::kTruncateFloat64ToFloat32:
|
||||
case IrOpcode::kChangeFloat64ToInt32:
|
||||
case IrOpcode::kChangeFloat64ToUint32:
|
||||
case IrOpcode::kRoundFloat64ToInt32:
|
||||
case IrOpcode::kFloat64ExtractLowWord32:
|
||||
case IrOpcode::kFloat64ExtractHighWord32:
|
||||
case IrOpcode::kBitcastFloat64ToInt64:
|
||||
CheckValueInputForFloat64Op(node, 0);
|
||||
break;
|
||||
case IrOpcode::kWord64Equal:
|
||||
CheckValueInputIsTaggedOrPointer(node, 0);
|
||||
CheckValueInputRepresentationIs(
|
||||
node, 1, typer_->GetRepresentation(node->InputAt(0)));
|
||||
break;
|
||||
case IrOpcode::kInt64LessThan:
|
||||
case IrOpcode::kInt64LessThanOrEqual:
|
||||
case IrOpcode::kUint64LessThan:
|
||||
case IrOpcode::kUint64LessThanOrEqual:
|
||||
CheckValueInputForInt64Op(node, 0);
|
||||
CheckValueInputForInt64Op(node, 1);
|
||||
break;
|
||||
case IrOpcode::kInt32x4ExtractLane:
|
||||
CheckValueInputRepresentationIs(node, 0,
|
||||
MachineRepresentation::kSimd128);
|
||||
break;
|
||||
#define LABEL(opcode) case IrOpcode::k##opcode:
|
||||
case IrOpcode::kChangeInt32ToTagged:
|
||||
case IrOpcode::kChangeUint32ToTagged:
|
||||
case IrOpcode::kChangeInt32ToFloat64:
|
||||
case IrOpcode::kChangeUint32ToFloat64:
|
||||
case IrOpcode::kRoundInt32ToFloat32:
|
||||
case IrOpcode::kRoundUint32ToFloat32:
|
||||
case IrOpcode::kChangeInt32ToInt64:
|
||||
case IrOpcode::kChangeUint32ToUint64:
|
||||
MACHINE_UNOP_32_LIST(LABEL) { CheckValueInputForInt32Op(node, 0); }
|
||||
break;
|
||||
case IrOpcode::kWord32Equal:
|
||||
case IrOpcode::kInt32LessThan:
|
||||
case IrOpcode::kInt32LessThanOrEqual:
|
||||
case IrOpcode::kUint32LessThan:
|
||||
case IrOpcode::kUint32LessThanOrEqual:
|
||||
MACHINE_BINOP_32_LIST(LABEL) {
|
||||
CheckValueInputForInt32Op(node, 0);
|
||||
CheckValueInputForInt32Op(node, 1);
|
||||
}
|
||||
break;
|
||||
MACHINE_BINOP_64_LIST(LABEL) {
|
||||
CheckValueInputForInt64Op(node, 0);
|
||||
CheckValueInputForInt64Op(node, 1);
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kFloat32Equal:
|
||||
case IrOpcode::kFloat32LessThan:
|
||||
case IrOpcode::kFloat32LessThanOrEqual:
|
||||
MACHINE_FLOAT32_BINOP_LIST(LABEL) {
|
||||
CheckValueInputForFloat32Op(node, 0);
|
||||
CheckValueInputForFloat32Op(node, 1);
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kChangeFloat32ToFloat64:
|
||||
case IrOpcode::kTruncateFloat32ToInt32:
|
||||
case IrOpcode::kTruncateFloat32ToUint32:
|
||||
case IrOpcode::kBitcastFloat32ToInt32:
|
||||
MACHINE_FLOAT32_UNOP_LIST(LABEL) {
|
||||
CheckValueInputForFloat32Op(node, 0);
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kFloat64Equal:
|
||||
case IrOpcode::kFloat64LessThan:
|
||||
case IrOpcode::kFloat64LessThanOrEqual:
|
||||
MACHINE_FLOAT64_BINOP_LIST(LABEL) {
|
||||
CheckValueInputForFloat64Op(node, 0);
|
||||
CheckValueInputForFloat64Op(node, 1);
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kFloat64SilenceNaN:
|
||||
MACHINE_FLOAT64_UNOP_LIST(LABEL) {
|
||||
CheckValueInputForFloat64Op(node, 0);
|
||||
}
|
||||
break;
|
||||
#undef LABEL
|
||||
case IrOpcode::kParameter:
|
||||
case IrOpcode::kProjection:
|
||||
break;
|
||||
case IrOpcode::kLoad:
|
||||
case IrOpcode::kAtomicLoad:
|
||||
CheckValueInputIsTaggedOrPointer(node, 0);
|
||||
CheckValueInputRepresentationIs(
|
||||
node, 1, MachineType::PointerRepresentation());
|
||||
break;
|
||||
case IrOpcode::kStore:
|
||||
CheckValueInputIsTaggedOrPointer(node, 0);
|
||||
CheckValueInputRepresentationIs(
|
||||
node, 1, MachineType::PointerRepresentation());
|
||||
switch (StoreRepresentationOf(node->op()).representation()) {
|
||||
case MachineRepresentation::kTagged:
|
||||
case MachineRepresentation::kTaggedPointer:
|
||||
case MachineRepresentation::kTaggedSigned:
|
||||
CheckValueInputIsTagged(node, 2);
|
||||
break;
|
||||
default:
|
||||
CheckValueInputRepresentationIs(
|
||||
node, 2,
|
||||
StoreRepresentationOf(node->op()).representation());
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kAtomicStore:
|
||||
CheckValueInputIsTaggedOrPointer(node, 0);
|
||||
CheckValueInputRepresentationIs(
|
||||
node, 1, MachineType::PointerRepresentation());
|
||||
switch (AtomicStoreRepresentationOf(node->op())) {
|
||||
case MachineRepresentation::kTagged:
|
||||
case MachineRepresentation::kTaggedPointer:
|
||||
case MachineRepresentation::kTaggedSigned:
|
||||
CheckValueInputIsTagged(node, 2);
|
||||
break;
|
||||
default:
|
||||
CheckValueInputRepresentationIs(
|
||||
node, 2, AtomicStoreRepresentationOf(node->op()));
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kPhi:
|
||||
switch (typer_->GetRepresentation(node)) {
|
||||
case MachineRepresentation::kTagged:
|
||||
case MachineRepresentation::kTaggedPointer:
|
||||
case MachineRepresentation::kTaggedSigned:
|
||||
for (int i = 0; i < node->op()->ValueInputCount(); ++i) {
|
||||
CheckValueInputIsTagged(node, i);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
for (int i = 0; i < node->op()->ValueInputCount(); ++i) {
|
||||
CheckValueInputRepresentationIs(
|
||||
node, i, typer_->GetRepresentation(node));
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case IrOpcode::kBranch:
|
||||
case IrOpcode::kSwitch:
|
||||
CheckValueInputForInt32Op(node, 0);
|
||||
break;
|
||||
case IrOpcode::kReturn:
|
||||
// TODO(epertoso): use the linkage to determine which tipe we
|
||||
// should have here.
|
||||
break;
|
||||
case IrOpcode::kTypedStateValues:
|
||||
case IrOpcode::kFrameState:
|
||||
break;
|
||||
default:
|
||||
if (node->op()->ValueInputCount() != 0) {
|
||||
std::stringstream str;
|
||||
str << "Node #" << node->id() << ":" << *node->op()
|
||||
<< " in the machine graph is not being checked.";
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
void CheckValueInputRepresentationIs(Node const* node, int index,
|
||||
MachineRepresentation representation) {
|
||||
Node const* input = node->InputAt(index);
|
||||
if (typer_->GetRepresentation(input) != representation) {
|
||||
std::stringstream str;
|
||||
str << "TypeError: node #" << node->id() << ":" << *node->op()
|
||||
<< " uses node #" << input->id() << ":" << *input->op()
|
||||
<< " which doesn't have a " << MachineReprToString(representation)
|
||||
<< " representation.";
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void CheckValueInputIsTagged(Node const* node, int index) {
|
||||
Node const* input = node->InputAt(index);
|
||||
switch (typer_->GetRepresentation(input)) {
|
||||
case MachineRepresentation::kTagged:
|
||||
case MachineRepresentation::kTaggedPointer:
|
||||
case MachineRepresentation::kTaggedSigned:
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
std::ostringstream str;
|
||||
str << "TypeError: node #" << node->id() << ":" << *node->op()
|
||||
<< " uses node #" << input->id() << ":" << *input->op()
|
||||
<< " which doesn't have a tagged representation.";
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
|
||||
void CheckValueInputIsTaggedOrPointer(Node const* node, int index) {
|
||||
Node const* input = node->InputAt(index);
|
||||
switch (typer_->GetRepresentation(input)) {
|
||||
case MachineRepresentation::kTagged:
|
||||
case MachineRepresentation::kTaggedPointer:
|
||||
case MachineRepresentation::kTaggedSigned:
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (typer_->GetRepresentation(input) !=
|
||||
MachineType::PointerRepresentation()) {
|
||||
std::ostringstream str;
|
||||
str << "TypeError: node #" << node->id() << ":" << *node->op()
|
||||
<< " uses node #" << input->id() << ":" << *input->op()
|
||||
<< " which doesn't have a tagged or pointer representation.";
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void CheckValueInputForInt32Op(Node const* node, int index) {
|
||||
Node const* input = node->InputAt(index);
|
||||
switch (typer_->GetRepresentation(input)) {
|
||||
case MachineRepresentation::kBit:
|
||||
case MachineRepresentation::kWord8:
|
||||
case MachineRepresentation::kWord16:
|
||||
case MachineRepresentation::kWord32:
|
||||
return;
|
||||
case MachineRepresentation::kNone: {
|
||||
std::ostringstream str;
|
||||
str << "TypeError: node #" << input->id() << ":" << *input->op()
|
||||
<< " is untyped.";
|
||||
FATAL(str.str().c_str());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
std::ostringstream str;
|
||||
str << "TypeError: node #" << node->id() << ":" << *node->op()
|
||||
<< " uses node #" << input->id() << ":" << *input->op()
|
||||
<< " which doesn't have an int32-compatible representation.";
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
|
||||
void CheckValueInputForInt64Op(Node const* node, int index) {
|
||||
Node const* input = node->InputAt(index);
|
||||
switch (typer_->GetRepresentation(input)) {
|
||||
case MachineRepresentation::kWord64:
|
||||
return;
|
||||
case MachineRepresentation::kNone: {
|
||||
std::ostringstream str;
|
||||
str << "TypeError: node #" << input->id() << ":" << *input->op()
|
||||
<< " is untyped.";
|
||||
FATAL(str.str().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
std::ostringstream str;
|
||||
str << "TypeError: node #" << node->id() << ":" << *node->op()
|
||||
<< " uses node #" << input->id() << ":" << *input->op()
|
||||
<< " which doesn't have a kWord64 representation.";
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
|
||||
void CheckValueInputForFloat32Op(Node const* node, int index) {
|
||||
Node const* input = node->InputAt(index);
|
||||
if (MachineRepresentation::kFloat32 == typer_->GetRepresentation(input)) {
|
||||
return;
|
||||
}
|
||||
std::ostringstream str;
|
||||
str << "TypeError: node #" << node->id() << ":" << *node->op()
|
||||
<< " uses node #" << input->id() << ":" << *input->op()
|
||||
<< " which doesn't have a kFloat32 representation.";
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
|
||||
void CheckValueInputForFloat64Op(Node const* node, int index) {
|
||||
Node const* input = node->InputAt(index);
|
||||
if (MachineRepresentation::kFloat64 == typer_->GetRepresentation(input)) {
|
||||
return;
|
||||
}
|
||||
std::ostringstream str;
|
||||
str << "TypeError: node #" << node->id() << ":" << *node->op()
|
||||
<< " uses node #" << input->id() << ":" << *input->op()
|
||||
<< " which doesn't have a kFloat64 representation.";
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
|
||||
void CheckCallInputs(Node const* node) {
|
||||
CallDescriptor const* desc = CallDescriptorOf(node->op());
|
||||
std::ostringstream str;
|
||||
bool should_log_error = false;
|
||||
for (size_t i = 0; i < desc->InputCount(); ++i) {
|
||||
Node const* input = node->InputAt(static_cast<int>(i));
|
||||
MachineRepresentation const input_type = typer_->GetRepresentation(input);
|
||||
MachineRepresentation const expected_input_type =
|
||||
desc->GetInputType(i).representation();
|
||||
if (!IsCompatible(expected_input_type, input_type)) {
|
||||
if (!should_log_error) {
|
||||
should_log_error = true;
|
||||
str << "TypeError: node #" << node->id() << ":" << *node->op()
|
||||
<< " has wrong type for:" << std::endl;
|
||||
} else {
|
||||
str << std::endl;
|
||||
}
|
||||
str << " * input " << i << " (" << input->id() << ":" << *input->op()
|
||||
<< ") doesn't have a " << MachineReprToString(expected_input_type)
|
||||
<< " representation.";
|
||||
}
|
||||
}
|
||||
if (should_log_error) {
|
||||
FATAL(str.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
bool Intersect(MachineRepresentation lhs, MachineRepresentation rhs) {
|
||||
return (GetRepresentationProperties(lhs) &
|
||||
GetRepresentationProperties(rhs)) != 0;
|
||||
}
|
||||
|
||||
enum RepresentationProperties { kIsPointer = 1, kIsTagged = 2 };
|
||||
|
||||
int GetRepresentationProperties(MachineRepresentation representation) {
|
||||
switch (representation) {
|
||||
case MachineRepresentation::kTagged:
|
||||
case MachineRepresentation::kTaggedPointer:
|
||||
return kIsPointer | kIsTagged;
|
||||
case MachineRepresentation::kTaggedSigned:
|
||||
return kIsTagged;
|
||||
case MachineRepresentation::kWord32:
|
||||
return MachineRepresentation::kWord32 ==
|
||||
MachineType::PointerRepresentation()
|
||||
? kIsPointer
|
||||
: 0;
|
||||
case MachineRepresentation::kWord64:
|
||||
return MachineRepresentation::kWord64 ==
|
||||
MachineType::PointerRepresentation()
|
||||
? kIsPointer
|
||||
: 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsCompatible(MachineRepresentation expected,
|
||||
MachineRepresentation actual) {
|
||||
switch (expected) {
|
||||
case MachineRepresentation::kTagged:
|
||||
return (actual == MachineRepresentation::kTagged ||
|
||||
actual == MachineRepresentation::kTaggedSigned ||
|
||||
actual == MachineRepresentation::kTaggedPointer);
|
||||
case MachineRepresentation::kTaggedSigned:
|
||||
case MachineRepresentation::kTaggedPointer:
|
||||
case MachineRepresentation::kFloat32:
|
||||
case MachineRepresentation::kFloat64:
|
||||
case MachineRepresentation::kSimd128:
|
||||
case MachineRepresentation::kBit:
|
||||
case MachineRepresentation::kWord8:
|
||||
case MachineRepresentation::kWord16:
|
||||
case MachineRepresentation::kWord64:
|
||||
return expected == actual;
|
||||
break;
|
||||
case MachineRepresentation::kWord32:
|
||||
return (actual == MachineRepresentation::kBit ||
|
||||
actual == MachineRepresentation::kWord8 ||
|
||||
actual == MachineRepresentation::kWord16 ||
|
||||
actual == MachineRepresentation::kWord32);
|
||||
case MachineRepresentation::kNone:
|
||||
UNREACHABLE();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Schedule const* const schedule_;
|
||||
MachineRepresentationInferrer const* const typer_;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
void MachineGraphVerifier::Run(Graph* graph, Schedule const* const schedule,
|
||||
Linkage* linkage, Zone* temp_zone) {
|
||||
MachineRepresentationInferrer representation_inferrer(schedule, graph,
|
||||
linkage, temp_zone);
|
||||
MachineRepresentationChecker checker(schedule, &representation_inferrer);
|
||||
checker.Run();
|
||||
}
|
||||
|
||||
} // namespace compiler
|
||||
} // namespace internal
|
||||
} // namespace v8
|
31
src/compiler/machine-graph-verifier.h
Normal file
31
src/compiler/machine-graph-verifier.h
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef V8_COMPILER_MACHINE_GRAPH_VERIFIER_H_
|
||||
#define V8_COMPILER_MACHINE_GRAPH_VERIFIER_H_
|
||||
|
||||
#include "src/base/macros.h"
|
||||
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
class Zone;
|
||||
namespace compiler {
|
||||
|
||||
class Graph;
|
||||
class Linkage;
|
||||
class Schedule;
|
||||
|
||||
// Verifies properties of a scheduled graph, such as that the nodes' inputs are
|
||||
// of the correct type.
|
||||
class MachineGraphVerifier {
|
||||
public:
|
||||
static void Run(Graph* graph, Schedule const* const schedule,
|
||||
Linkage* linkage, Zone* temp_zone);
|
||||
};
|
||||
|
||||
} // namespace compiler
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
||||
#endif // V8_COMPILER_MACHINE_GRAPH_VERIFIER_H_
|
@ -79,311 +79,317 @@ MachineRepresentation AtomicStoreRepresentationOf(Operator const* op) {
|
||||
return OpParameter<MachineRepresentation>(op);
|
||||
}
|
||||
|
||||
#define PURE_OP_LIST(V) \
|
||||
V(Word32And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word32Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word32Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word32Shl, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word32Shr, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word32Sar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word32Ror, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word32Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word32Clz, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Word64And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word64Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word64Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word64Shl, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word64Shr, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word64Sar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word64Ror, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word64Clz, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Word64Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32Add, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32Mul, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32Div, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Int32Mod, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Int32LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32Div, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Uint32LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32Mod, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Uint32MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int64Add, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int64Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int64Mul, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int64Div, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Int64Mod, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Int64LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint64Div, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Uint64Mod, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Uint64LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(BitcastTaggedToWord, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastWordToTagged, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastWordToTaggedSigned, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat64ToWord32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeFloat32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat32ToUint32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TryTruncateFloat32ToInt64, Operator::kNoProperties, 1, 0, 2) \
|
||||
V(TryTruncateFloat64ToInt64, Operator::kNoProperties, 1, 0, 2) \
|
||||
V(TryTruncateFloat32ToUint64, Operator::kNoProperties, 1, 0, 2) \
|
||||
V(TryTruncateFloat64ToUint64, Operator::kNoProperties, 1, 0, 2) \
|
||||
V(ChangeInt32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64SilenceNaN, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundInt64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundUint32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundUint64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundUint64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeInt32ToInt64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeUint32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeUint32ToUint64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateInt64ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastFloat64ToInt64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Abs, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32Div, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Sqrt, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Abs, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Acos, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Acosh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Asin, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Asinh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Atan, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Atan2, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Atanh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Cbrt, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Cos, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Cosh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Exp, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Expm1, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Log, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Log1p, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Log2, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Log10, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Div, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Mod, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Pow, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Sin, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Sinh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Sqrt, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Tan, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Tanh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64ExtractLowWord32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64ExtractHighWord32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64InsertLowWord32, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64InsertHighWord32, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(LoadStackPointer, Operator::kNoProperties, 0, 0, 1) \
|
||||
V(LoadFramePointer, Operator::kNoProperties, 0, 0, 1) \
|
||||
V(LoadParentFramePointer, Operator::kNoProperties, 0, 0, 1) \
|
||||
V(Int32PairAdd, Operator::kNoProperties, 4, 0, 2) \
|
||||
V(Int32PairSub, Operator::kNoProperties, 4, 0, 2) \
|
||||
V(Int32PairMul, Operator::kNoProperties, 4, 0, 2) \
|
||||
V(Word32PairShl, Operator::kNoProperties, 3, 0, 2) \
|
||||
V(Word32PairShr, Operator::kNoProperties, 3, 0, 2) \
|
||||
V(Word32PairSar, Operator::kNoProperties, 3, 0, 2) \
|
||||
V(CreateFloat32x4, Operator::kNoProperties, 4, 0, 1) \
|
||||
V(Float32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Float32x4Abs, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4Sqrt, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4RecipApprox, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4RecipSqrtApprox, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4Div, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4MinNum, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4MaxNum, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4Select, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Float32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
|
||||
V(Float32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
|
||||
V(Float32x4FromInt32x4, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4FromUint32x4, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(CreateInt32x4, Operator::kNoProperties, 4, 0, 1) \
|
||||
V(Int32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int32x4Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Int32x4Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4Select, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
|
||||
V(Int32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
|
||||
V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(CreateBool32x4, Operator::kNoProperties, 4, 0, 1) \
|
||||
V(Bool32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Bool32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Bool32x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool32x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool32x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool32x4Not, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool32x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool32x4AllTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
|
||||
V(Bool32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
|
||||
V(Bool32x4Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(CreateInt16x8, Operator::kNoProperties, 8, 0, 1) \
|
||||
V(Int16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8Select, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
|
||||
V(Int16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
|
||||
V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(CreateBool16x8, Operator::kNoProperties, 8, 0, 1) \
|
||||
V(Bool16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Bool16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Bool16x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool16x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool16x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool16x8Not, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool16x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool16x8AllTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
|
||||
V(Bool16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
|
||||
V(Bool16x8Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(CreateInt8x16, Operator::kNoProperties, 16, 0, 1) \
|
||||
V(Int8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16Select, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
|
||||
V(Int8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
|
||||
V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(CreateBool8x16, Operator::kNoProperties, 16, 0, 1) \
|
||||
V(Bool8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Bool8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Bool8x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool8x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool8x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool8x16Not, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool8x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool8x16AllTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
|
||||
V(Bool8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
|
||||
V(Bool8x16Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Simd128Load, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Simd128Load1, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Simd128Load2, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Simd128Load3, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Simd128Store, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Simd128Store1, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Simd128Store2, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Simd128Store3, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Simd128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Simd128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Simd128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
#define PURE_BINARY_OP_LIST_32(V) \
|
||||
V(Word32And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word32Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word32Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word32Shl, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word32Shr, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word32Sar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word32Ror, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word32Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32Add, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32Mul, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32Div, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Int32Mod, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Int32LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32Div, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Uint32LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32Mod, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Uint32MulHigh, Operator::kAssociative | Operator::kCommutative, 2, 0, 1)
|
||||
|
||||
#define PURE_BINARY_OP_LIST_64(V) \
|
||||
V(Word64And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word64Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word64Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Word64Shl, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word64Shr, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word64Sar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word64Ror, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Word64Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int64Add, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int64Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int64Mul, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int64Div, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Int64Mod, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Int64LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint64Div, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Uint64Mod, Operator::kNoProperties, 2, 1, 1) \
|
||||
V(Uint64LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1)
|
||||
|
||||
#define PURE_OP_LIST(V) \
|
||||
PURE_BINARY_OP_LIST_32(V) \
|
||||
PURE_BINARY_OP_LIST_64(V) \
|
||||
V(Word32Clz, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Word64Clz, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastTaggedToWord, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastWordToTagged, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastWordToTaggedSigned, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat64ToWord32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeFloat32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat64ToUint32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat32ToUint32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TryTruncateFloat32ToInt64, Operator::kNoProperties, 1, 0, 2) \
|
||||
V(TryTruncateFloat64ToInt64, Operator::kNoProperties, 1, 0, 2) \
|
||||
V(TryTruncateFloat32ToUint64, Operator::kNoProperties, 1, 0, 2) \
|
||||
V(TryTruncateFloat64ToUint64, Operator::kNoProperties, 1, 0, 2) \
|
||||
V(ChangeInt32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64SilenceNaN, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundFloat64ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundInt64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundUint32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundUint64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(RoundUint64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeInt32ToInt64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeUint32ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(ChangeUint32ToUint64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateFloat64ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(TruncateInt64ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastFloat32ToInt32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastFloat64ToInt64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastInt32ToFloat32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(BitcastInt64ToFloat64, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Abs, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32Div, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Sqrt, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Abs, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Acos, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Acosh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Asin, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Asinh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Atan, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Atan2, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Atanh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Cbrt, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Cos, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Cosh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Exp, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Expm1, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Log, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Log1p, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Log2, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Log10, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Max, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Min, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64Div, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Mod, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Pow, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Sin, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Sinh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Sqrt, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Tan, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64Tanh, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float64LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64ExtractLowWord32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64ExtractHighWord32, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float64InsertLowWord32, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float64InsertHighWord32, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(LoadStackPointer, Operator::kNoProperties, 0, 0, 1) \
|
||||
V(LoadFramePointer, Operator::kNoProperties, 0, 0, 1) \
|
||||
V(LoadParentFramePointer, Operator::kNoProperties, 0, 0, 1) \
|
||||
V(Int32PairAdd, Operator::kNoProperties, 4, 0, 2) \
|
||||
V(Int32PairSub, Operator::kNoProperties, 4, 0, 2) \
|
||||
V(Int32PairMul, Operator::kNoProperties, 4, 0, 2) \
|
||||
V(Word32PairShl, Operator::kNoProperties, 3, 0, 2) \
|
||||
V(Word32PairShr, Operator::kNoProperties, 3, 0, 2) \
|
||||
V(Word32PairSar, Operator::kNoProperties, 3, 0, 2) \
|
||||
V(CreateFloat32x4, Operator::kNoProperties, 4, 0, 1) \
|
||||
V(Float32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Float32x4Abs, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4Sqrt, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4RecipApprox, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4RecipSqrtApprox, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4Div, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4MinNum, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4MaxNum, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Float32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Float32x4Select, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Float32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
|
||||
V(Float32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
|
||||
V(Float32x4FromInt32x4, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Float32x4FromUint32x4, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(CreateInt32x4, Operator::kNoProperties, 4, 0, 1) \
|
||||
V(Int32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int32x4Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Int32x4Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int32x4Select, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
|
||||
V(Int32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
|
||||
V(Int32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Uint32x4Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint32x4Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint32x4ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint32x4FromFloat32x4, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(CreateBool32x4, Operator::kNoProperties, 4, 0, 1) \
|
||||
V(Bool32x4ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Bool32x4ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Bool32x4And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool32x4Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool32x4Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool32x4Not, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool32x4AnyTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool32x4AllTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool32x4Swizzle, Operator::kNoProperties, 5, 0, 1) \
|
||||
V(Bool32x4Shuffle, Operator::kNoProperties, 6, 0, 1) \
|
||||
V(Bool32x4Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool32x4NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(CreateInt16x8, Operator::kNoProperties, 8, 0, 1) \
|
||||
V(Int16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int16x8Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Int16x8Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int16x8Select, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
|
||||
V(Int16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
|
||||
V(Uint16x8AddSaturate, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint16x8SubSaturate, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint16x8Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint16x8ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint16x8GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(CreateBool16x8, Operator::kNoProperties, 8, 0, 1) \
|
||||
V(Bool16x8ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Bool16x8ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Bool16x8And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool16x8Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool16x8Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool16x8Not, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool16x8AnyTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool16x8AllTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool16x8Swizzle, Operator::kNoProperties, 9, 0, 1) \
|
||||
V(Bool16x8Shuffle, Operator::kNoProperties, 10, 0, 1) \
|
||||
V(Bool16x8Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool16x8NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(CreateInt8x16, Operator::kNoProperties, 16, 0, 1) \
|
||||
V(Int8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int8x16Neg, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Int8x16Add, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16Sub, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16Mul, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Int8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Int8x16Select, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Int8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
|
||||
V(Int8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
|
||||
V(Uint8x16AddSaturate, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint8x16SubSaturate, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16Min, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint8x16Max, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Uint8x16ShiftLeftByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16ShiftRightByScalar, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16LessThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16LessThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16GreaterThan, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Uint8x16GreaterThanOrEqual, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(CreateBool8x16, Operator::kNoProperties, 16, 0, 1) \
|
||||
V(Bool8x16ExtractLane, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Bool8x16ReplaceLane, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Bool8x16And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool8x16Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool8x16Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool8x16Not, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool8x16AnyTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool8x16AllTrue, Operator::kNoProperties, 1, 0, 1) \
|
||||
V(Bool8x16Swizzle, Operator::kNoProperties, 17, 0, 1) \
|
||||
V(Bool8x16Shuffle, Operator::kNoProperties, 18, 0, 1) \
|
||||
V(Bool8x16Equal, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Bool8x16NotEqual, Operator::kCommutative, 2, 0, 1) \
|
||||
V(Simd128Load, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Simd128Load1, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Simd128Load2, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Simd128Load3, Operator::kNoProperties, 2, 0, 1) \
|
||||
V(Simd128Store, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Simd128Store1, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Simd128Store2, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Simd128Store3, Operator::kNoProperties, 3, 0, 1) \
|
||||
V(Simd128And, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Simd128Or, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Simd128Xor, Operator::kAssociative | Operator::kCommutative, 2, 0, 1) \
|
||||
V(Simd128Not, Operator::kNoProperties, 1, 0, 1)
|
||||
|
||||
#define PURE_OPTIONAL_OP_LIST(V) \
|
||||
|
@ -343,58 +343,128 @@
|
||||
V(Float64LessThan) \
|
||||
V(Float64LessThanOrEqual)
|
||||
|
||||
#define MACHINE_UNOP_32_LIST(V) \
|
||||
V(Word32Clz) \
|
||||
V(Word32Ctz) \
|
||||
V(Word32ReverseBits) \
|
||||
V(Word32ReverseBytes)
|
||||
|
||||
#define MACHINE_BINOP_32_LIST(V) \
|
||||
V(Word32And) \
|
||||
V(Word32Or) \
|
||||
V(Word32Xor) \
|
||||
V(Word32Shl) \
|
||||
V(Word32Shr) \
|
||||
V(Word32Sar) \
|
||||
V(Word32Ror) \
|
||||
V(Int32Add) \
|
||||
V(Int32AddWithOverflow) \
|
||||
V(Int32Sub) \
|
||||
V(Int32SubWithOverflow) \
|
||||
V(Int32Mul) \
|
||||
V(Int32MulWithOverflow) \
|
||||
V(Int32MulHigh) \
|
||||
V(Int32Div) \
|
||||
V(Int32Mod) \
|
||||
V(Uint32Div) \
|
||||
V(Uint32Mod) \
|
||||
V(Uint32MulHigh)
|
||||
|
||||
#define MACHINE_BINOP_64_LIST(V) \
|
||||
V(Word64And) \
|
||||
V(Word64Or) \
|
||||
V(Word64Xor) \
|
||||
V(Word64Shl) \
|
||||
V(Word64Shr) \
|
||||
V(Word64Sar) \
|
||||
V(Word64Ror) \
|
||||
V(Int64Add) \
|
||||
V(Int64AddWithOverflow) \
|
||||
V(Int64Sub) \
|
||||
V(Int64SubWithOverflow) \
|
||||
V(Int64Mul) \
|
||||
V(Int64Div) \
|
||||
V(Int64Mod) \
|
||||
V(Uint64Div) \
|
||||
V(Uint64Mod)
|
||||
|
||||
#define MACHINE_FLOAT32_UNOP_LIST(V) \
|
||||
V(Float32Abs) \
|
||||
V(Float32Neg) \
|
||||
V(Float32RoundDown) \
|
||||
V(Float32RoundTiesEven) \
|
||||
V(Float32RoundTruncate) \
|
||||
V(Float32RoundUp) \
|
||||
V(Float32Sqrt)
|
||||
|
||||
#define MACHINE_FLOAT32_BINOP_LIST(V) \
|
||||
V(Float32Add) \
|
||||
V(Float32Sub) \
|
||||
V(Float32Mul) \
|
||||
V(Float32Div) \
|
||||
V(Float32Max) \
|
||||
V(Float32Min)
|
||||
|
||||
#define MACHINE_FLOAT64_UNOP_LIST(V) \
|
||||
V(Float64Abs) \
|
||||
V(Float64Acos) \
|
||||
V(Float64Acosh) \
|
||||
V(Float64Asin) \
|
||||
V(Float64Asinh) \
|
||||
V(Float64Atan) \
|
||||
V(Float64Atanh) \
|
||||
V(Float64Cbrt) \
|
||||
V(Float64Cos) \
|
||||
V(Float64Cosh) \
|
||||
V(Float64Exp) \
|
||||
V(Float64Expm1) \
|
||||
V(Float64Log) \
|
||||
V(Float64Log1p) \
|
||||
V(Float64Log10) \
|
||||
V(Float64Log2) \
|
||||
V(Float64Neg) \
|
||||
V(Float64RoundDown) \
|
||||
V(Float64RoundTiesAway) \
|
||||
V(Float64RoundTiesEven) \
|
||||
V(Float64RoundTruncate) \
|
||||
V(Float64RoundUp) \
|
||||
V(Float64Sin) \
|
||||
V(Float64Sinh) \
|
||||
V(Float64Sqrt) \
|
||||
V(Float64Tan) \
|
||||
V(Float64Tanh)
|
||||
|
||||
#define MACHINE_FLOAT64_BINOP_LIST(V) \
|
||||
V(Float64Atan2) \
|
||||
V(Float64Max) \
|
||||
V(Float64Min) \
|
||||
V(Float64Add) \
|
||||
V(Float64Sub) \
|
||||
V(Float64Mul) \
|
||||
V(Float64Div) \
|
||||
V(Float64Mod) \
|
||||
V(Float64Pow)
|
||||
|
||||
#define MACHINE_OP_LIST(V) \
|
||||
MACHINE_UNOP_32_LIST(V) \
|
||||
MACHINE_BINOP_32_LIST(V) \
|
||||
MACHINE_BINOP_64_LIST(V) \
|
||||
MACHINE_COMPARE_BINOP_LIST(V) \
|
||||
MACHINE_FLOAT32_BINOP_LIST(V) \
|
||||
MACHINE_FLOAT32_UNOP_LIST(V) \
|
||||
MACHINE_FLOAT64_BINOP_LIST(V) \
|
||||
MACHINE_FLOAT64_UNOP_LIST(V) \
|
||||
V(DebugBreak) \
|
||||
V(Comment) \
|
||||
V(Load) \
|
||||
V(Store) \
|
||||
V(StackSlot) \
|
||||
V(Word32And) \
|
||||
V(Word32Or) \
|
||||
V(Word32Xor) \
|
||||
V(Word32Shl) \
|
||||
V(Word32Shr) \
|
||||
V(Word32Sar) \
|
||||
V(Word32Ror) \
|
||||
V(Word32Clz) \
|
||||
V(Word32Ctz) \
|
||||
V(Word32ReverseBits) \
|
||||
V(Word32ReverseBytes) \
|
||||
V(Word32Popcnt) \
|
||||
V(Word64Popcnt) \
|
||||
V(Word64And) \
|
||||
V(Word64Or) \
|
||||
V(Word64Xor) \
|
||||
V(Word64Shl) \
|
||||
V(Word64Shr) \
|
||||
V(Word64Sar) \
|
||||
V(Word64Ror) \
|
||||
V(Word64Clz) \
|
||||
V(Word64Ctz) \
|
||||
V(Word64ReverseBits) \
|
||||
V(Word64ReverseBytes) \
|
||||
V(Int32Add) \
|
||||
V(Int32AddWithOverflow) \
|
||||
V(Int32Sub) \
|
||||
V(Int32SubWithOverflow) \
|
||||
V(Int32Mul) \
|
||||
V(Int32MulWithOverflow) \
|
||||
V(Int32MulHigh) \
|
||||
V(Int32Div) \
|
||||
V(Int32Mod) \
|
||||
V(Uint32Div) \
|
||||
V(Uint32Mod) \
|
||||
V(Uint32MulHigh) \
|
||||
V(Int64Add) \
|
||||
V(Int64AddWithOverflow) \
|
||||
V(Int64Sub) \
|
||||
V(Int64SubWithOverflow) \
|
||||
V(Int64Mul) \
|
||||
V(Int64Div) \
|
||||
V(Int64Mod) \
|
||||
V(Uint64Div) \
|
||||
V(Uint64Mod) \
|
||||
V(BitcastTaggedToWord) \
|
||||
V(BitcastWordToTagged) \
|
||||
V(BitcastWordToTaggedSigned) \
|
||||
@ -427,55 +497,6 @@
|
||||
V(BitcastFloat64ToInt64) \
|
||||
V(BitcastInt32ToFloat32) \
|
||||
V(BitcastInt64ToFloat64) \
|
||||
V(Float32Add) \
|
||||
V(Float32Sub) \
|
||||
V(Float32Neg) \
|
||||
V(Float32Mul) \
|
||||
V(Float32Div) \
|
||||
V(Float32Abs) \
|
||||
V(Float32Sqrt) \
|
||||
V(Float32RoundDown) \
|
||||
V(Float32Max) \
|
||||
V(Float32Min) \
|
||||
V(Float64Add) \
|
||||
V(Float64Sub) \
|
||||
V(Float64Neg) \
|
||||
V(Float64Mul) \
|
||||
V(Float64Div) \
|
||||
V(Float64Mod) \
|
||||
V(Float64Max) \
|
||||
V(Float64Min) \
|
||||
V(Float64Abs) \
|
||||
V(Float64Acos) \
|
||||
V(Float64Acosh) \
|
||||
V(Float64Asin) \
|
||||
V(Float64Asinh) \
|
||||
V(Float64Atan) \
|
||||
V(Float64Atanh) \
|
||||
V(Float64Atan2) \
|
||||
V(Float64Cbrt) \
|
||||
V(Float64Cos) \
|
||||
V(Float64Cosh) \
|
||||
V(Float64Exp) \
|
||||
V(Float64Expm1) \
|
||||
V(Float64Log) \
|
||||
V(Float64Log1p) \
|
||||
V(Float64Log10) \
|
||||
V(Float64Log2) \
|
||||
V(Float64Pow) \
|
||||
V(Float64Sin) \
|
||||
V(Float64Sinh) \
|
||||
V(Float64Sqrt) \
|
||||
V(Float64Tan) \
|
||||
V(Float64Tanh) \
|
||||
V(Float64RoundDown) \
|
||||
V(Float32RoundUp) \
|
||||
V(Float64RoundUp) \
|
||||
V(Float32RoundTruncate) \
|
||||
V(Float64RoundTruncate) \
|
||||
V(Float64RoundTiesAway) \
|
||||
V(Float32RoundTiesEven) \
|
||||
V(Float64RoundTiesEven) \
|
||||
V(Float64ExtractLowWord32) \
|
||||
V(Float64ExtractHighWord32) \
|
||||
V(Float64InsertLowWord32) \
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "src/compiler/loop-analysis.h"
|
||||
#include "src/compiler/loop-peeling.h"
|
||||
#include "src/compiler/loop-variable-optimizer.h"
|
||||
#include "src/compiler/machine-graph-verifier.h"
|
||||
#include "src/compiler/machine-operator-reducer.h"
|
||||
#include "src/compiler/memory-optimizer.h"
|
||||
#include "src/compiler/move-optimizer.h"
|
||||
@ -1777,6 +1778,12 @@ bool PipelineImpl::ScheduleAndSelectInstructions(Linkage* linkage) {
|
||||
info(), data->graph(), data->schedule()));
|
||||
}
|
||||
|
||||
if (FLAG_turbo_verify_machine_graph) {
|
||||
Zone temp_zone(data->isolate()->allocator());
|
||||
MachineGraphVerifier::Run(data->graph(), data->schedule(), linkage,
|
||||
&temp_zone);
|
||||
}
|
||||
|
||||
data->InitializeInstructionSequence(call_descriptor);
|
||||
|
||||
data->InitializeFrameData(call_descriptor);
|
||||
|
@ -453,6 +453,8 @@ DEFINE_BOOL(turbo_asm, true, "enable TurboFan for asm.js code")
|
||||
DEFINE_BOOL(turbo_asm_deoptimization, false,
|
||||
"enable deoptimization in TurboFan for asm.js code")
|
||||
DEFINE_BOOL(turbo_verify, DEBUG_BOOL, "verify TurboFan graphs at each phase")
|
||||
DEFINE_BOOL(turbo_verify_machine_graph, false,
|
||||
"verify TurboFan machine graph before instruction selection")
|
||||
DEFINE_BOOL(turbo_stats, false, "print TurboFan statistics")
|
||||
DEFINE_BOOL(turbo_stats_nvp, false,
|
||||
"print TurboFan statistics in machine-readable format")
|
||||
|
@ -652,6 +652,8 @@
|
||||
'compiler/machine-operator-reducer.h',
|
||||
'compiler/machine-operator.cc',
|
||||
'compiler/machine-operator.h',
|
||||
'compiler/machine-graph-verifier.cc',
|
||||
'compiler/machine-graph-verifier.h',
|
||||
'compiler/memory-optimizer.cc',
|
||||
'compiler/memory-optimizer.h',
|
||||
'compiler/move-optimizer.cc',
|
||||
|
Loading…
Reference in New Issue
Block a user