diff options
Diffstat (limited to 'deps/v8/src/compiler/machine-graph-verifier.cc')
-rw-r--r-- | deps/v8/src/compiler/machine-graph-verifier.cc | 53 |
1 files changed, 6 insertions, 47 deletions
diff --git a/deps/v8/src/compiler/machine-graph-verifier.cc b/deps/v8/src/compiler/machine-graph-verifier.cc index 64f6a5a0c0..411f878a05 100644 --- a/deps/v8/src/compiler/machine-graph-verifier.cc +++ b/deps/v8/src/compiler/machine-graph-verifier.cc @@ -9,6 +9,7 @@ #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" @@ -39,52 +40,6 @@ class MachineRepresentationInferrer { } 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: - case IrOpcode::kInt64MulWithOverflow: - CHECK_LE(index, static_cast<size_t>(1)); - return index == 0 ? MachineRepresentation::kWord64 - : MachineRepresentation::kBit; - case IrOpcode::kTryTruncateFloat64ToInt32: - case IrOpcode::kTryTruncateFloat64ToUint32: - CHECK_LE(index, static_cast<size_t>(1)); - return index == 0 ? MachineRepresentation::kWord32 - : MachineRepresentation::kBit; - case IrOpcode::kTryTruncateFloat32ToInt64: - case IrOpcode::kTryTruncateFloat64ToInt64: - case IrOpcode::kTryTruncateFloat32ToUint64: - CHECK_LE(index, static_cast<size_t>(1)); - return index == 0 ? MachineRepresentation::kWord64 - : MachineRepresentation::kBit; - case IrOpcode::kCall: { - auto call_descriptor = CallDescriptorOf(input->op()); - return call_descriptor->GetReturnType(index).representation(); - } - case IrOpcode::kWord32AtomicPairLoad: - case IrOpcode::kWord32AtomicPairAdd: - case IrOpcode::kWord32AtomicPairSub: - case IrOpcode::kWord32AtomicPairAnd: - case IrOpcode::kWord32AtomicPairOr: - case IrOpcode::kWord32AtomicPairXor: - case IrOpcode::kWord32AtomicPairExchange: - case IrOpcode::kWord32AtomicPairCompareExchange: - CHECK_LE(index, static_cast<size_t>(1)); - return MachineRepresentation::kWord32; - default: - return MachineRepresentation::kNone; - } - } - MachineRepresentation PromoteRepresentation(MachineRepresentation rep) { switch (rep) { case MachineRepresentation::kWord8: @@ -124,7 +79,8 @@ class MachineRepresentationInferrer { break; } case IrOpcode::kProjection: { - representation_vector_[node->id()] = GetProjectionType(node); + representation_vector_[node->id()] = + NodeProperties::GetProjectionType(node); } break; case IrOpcode::kTypedStateValues: representation_vector_[node->id()] = MachineRepresentation::kNone; @@ -139,6 +95,7 @@ class MachineRepresentationInferrer { case IrOpcode::kLoad: case IrOpcode::kLoadImmutable: case IrOpcode::kProtectedLoad: + case IrOpcode::kLoadTrapOnNull: representation_vector_[node->id()] = PromoteRepresentation( LoadRepresentationOf(node->op()).representation()); break; @@ -201,6 +158,7 @@ class MachineRepresentationInferrer { break; case IrOpcode::kStore: case IrOpcode::kProtectedStore: + case IrOpcode::kStoreTrapOnNull: representation_vector_[node->id()] = PromoteRepresentation( StoreRepresentationOf(node->op()).representation()); break; @@ -849,6 +807,7 @@ class MachineRepresentationChecker { switch (node->opcode()) { case IrOpcode::kLoad: case IrOpcode::kProtectedLoad: + case IrOpcode::kLoadTrapOnNull: case IrOpcode::kUnalignedLoad: case IrOpcode::kLoadImmutable: if (rep == MachineRepresentation::kCompressed || |