| Index: src/compiler/wasm-compiler.cc
|
| diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
|
| index 5001eb014490bd6c0d2f6cd89226a9cdd24188ba..324d3bea003c73145a5eae7150bb739c21f1a31c 100644
|
| --- a/src/compiler/wasm-compiler.cc
|
| +++ b/src/compiler/wasm-compiler.cc
|
| @@ -24,7 +24,6 @@
|
| #include "src/compiler/machine-operator.h"
|
| #include "src/compiler/node-matchers.h"
|
| #include "src/compiler/pipeline.h"
|
| -#include "src/compiler/simd-lowering.h"
|
| #include "src/compiler/source-position.h"
|
| #include "src/compiler/zone-pool.h"
|
|
|
| @@ -2211,12 +2210,6 @@ Node* WasmGraphBuilder::ToJS(Node* node, Node* context, wasm::LocalType type) {
|
| }
|
| }
|
|
|
| -Node* WasmGraphBuilder::BuildChangeTaggedToInt32(Node* value) {
|
| - value = BuildChangeTaggedToFloat64(value);
|
| - value = graph()->NewNode(jsgraph()->machine()->ChangeFloat64ToInt32(), value);
|
| - return value;
|
| -}
|
| -
|
| Node* WasmGraphBuilder::BuildJavaScriptToNumber(Node* node, Node* context,
|
| Node* effect, Node* control) {
|
| Callable callable = CodeFactory::ToNumber(jsgraph()->isolate());
|
| @@ -2656,12 +2649,6 @@ Node* WasmGraphBuilder::MemSize(uint32_t offset) {
|
| }
|
| }
|
|
|
| -Node* WasmGraphBuilder::DefaultS128Value() {
|
| - Node* zero = jsgraph()->Int32Constant(0);
|
| - return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), zero, zero,
|
| - zero, zero);
|
| -}
|
| -
|
| Node* WasmGraphBuilder::FunctionTable(uint32_t index) {
|
| DCHECK(module_ && module_->instance &&
|
| index < module_->instance->function_tables.size());
|
| @@ -2675,79 +2662,6 @@ Node* WasmGraphBuilder::FunctionTable(uint32_t index) {
|
| return function_tables_[index];
|
| }
|
|
|
| -Node* WasmGraphBuilder::ChangeToRuntimeCall(Node* node,
|
| - Runtime::FunctionId function_id,
|
| - Signature<Conversion>* signature) {
|
| - SimplifiedOperatorBuilder simplified(jsgraph()->zone());
|
| - const Runtime::Function* function = Runtime::FunctionForId(function_id);
|
| - CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(
|
| - jsgraph()->zone(), function_id, function->nargs, Operator::kNoProperties,
|
| - CallDescriptor::kNoFlags);
|
| - const int kInputSize = 16;
|
| - const int kDefaultFunctionParams = 6;
|
| - Node* inputs[kInputSize + kDefaultFunctionParams];
|
| - DCHECK_LE(function->nargs + kDefaultFunctionParams,
|
| - static_cast<int>(arraysize(inputs)));
|
| - // Either there are control + effect or not.
|
| - DCHECK(node->InputCount() == function->nargs ||
|
| - node->InputCount() == function->nargs + 2);
|
| - int index = 0;
|
| - inputs[index++] = jsgraph()->CEntryStubConstant(function->result_size);
|
| - for (int i = 0; i < function->nargs; ++i) {
|
| - Node* arg = node->InputAt(i);
|
| - switch (signature->GetParam(i)) {
|
| - case Conversion::kInt32:
|
| - arg = BuildChangeInt32ToTagged(arg);
|
| - break;
|
| - case Conversion::kFloat32:
|
| - arg = jsgraph()->graph()->NewNode(
|
| - jsgraph()->machine()->ChangeFloat32ToFloat64(), arg);
|
| - arg = BuildChangeFloat64ToTagged(arg);
|
| - break;
|
| - case Conversion::kFloat64:
|
| - arg = BuildChangeFloat64ToTagged(arg);
|
| - break;
|
| - default:
|
| - break;
|
| - }
|
| - inputs[index++] = arg;
|
| - }
|
| - inputs[index++] = jsgraph()->ExternalConstant(
|
| - ExternalReference(function_id, jsgraph()->isolate()));
|
| - inputs[index++] = jsgraph()->Int32Constant(function->nargs);
|
| - inputs[index++] = jsgraph()->Constant(module_->instance->context);
|
| - // Loads and stores have control and effect, others do not and use
|
| - // the start node instead.
|
| - if (node->InputCount() == function->nargs + 2) {
|
| - inputs[index++] = node->InputAt(function->nargs + 1); // effect
|
| - inputs[index++] = node->InputAt(function->nargs + 2); // control
|
| - } else {
|
| - inputs[index++] = jsgraph()->graph()->start(); // effect
|
| - inputs[index++] = jsgraph()->graph()->start(); // control
|
| - }
|
| - Node* ret = jsgraph()->graph()->NewNode(jsgraph()->common()->Call(desc),
|
| - index, inputs);
|
| -
|
| - Conversion return_type = signature->GetReturn();
|
| - switch (return_type) {
|
| - case Conversion::kInt32:
|
| - ret = BuildChangeTaggedToInt32(ret);
|
| - break;
|
| - case Conversion::kFloat32:
|
| - NodeProperties::SetType(ret, Type::Number());
|
| - ret = BuildChangeTaggedToFloat64(ret);
|
| - ret = jsgraph()->graph()->NewNode(
|
| - jsgraph()->machine()->TruncateInt64ToInt32(), ret);
|
| - break;
|
| - case Conversion::kFloat64:
|
| - ret = BuildChangeTaggedToFloat64(ret);
|
| - break;
|
| - default:
|
| - break;
|
| - }
|
| - return ret;
|
| -}
|
| -
|
| Node* WasmGraphBuilder::GetGlobal(uint32_t index) {
|
| MachineType mem_type =
|
| wasm::WasmOpcodes::MachineTypeFor(module_->GetGlobalType(index));
|
| @@ -2937,20 +2851,15 @@ void WasmGraphBuilder::SetSourcePosition(Node* node,
|
| source_position_table_->SetSourcePosition(node, pos);
|
| }
|
|
|
| -MachineOperatorBuilder* WasmGraphBuilder::simd() {
|
| - has_simd_ops_ = true;
|
| - return jsgraph()->machine();
|
| -}
|
| -
|
| Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
|
| const NodeVector& inputs) {
|
| switch (opcode) {
|
| case wasm::kExprI32x4ExtractLane:
|
| - return graph()->NewNode(simd()->Int32x4ExtractLane(), inputs[0],
|
| - inputs[1]);
|
| + return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(),
|
| + inputs[0], inputs[1]);
|
| case wasm::kExprI32x4Splat:
|
| - return graph()->NewNode(simd()->CreateInt32x4(), inputs[0], inputs[0],
|
| - inputs[0], inputs[0]);
|
| + return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(),
|
| + inputs[0], inputs[0], inputs[0], inputs[0]);
|
| default:
|
| return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
|
| }
|
| @@ -3169,20 +3078,6 @@ SourcePositionTable* WasmCompilationUnit::BuildGraphForWasmFunction(
|
|
|
| int index = static_cast<int>(function_->func_index);
|
|
|
| - // Run lowering pass if SIMD ops are present in the function
|
| - if (builder.has_simd_ops()) {
|
| - SimdLowering simd(jsgraph_->zone(), &builder);
|
| - GraphReducer graph_reducer(jsgraph_->zone(), graph);
|
| - graph_reducer.AddReducer(&simd);
|
| - graph_reducer.ReduceGraph();
|
| -
|
| - if (FLAG_trace_turbo_graph) { // Simple textual RPO.
|
| - OFStream os(stdout);
|
| - os << "-- Graph after simd lowering -- " << std::endl;
|
| - os << AsRPO(*graph);
|
| - }
|
| - }
|
| -
|
| if (index >= FLAG_trace_wasm_ast_start && index < FLAG_trace_wasm_ast_end) {
|
| OFStream os(stdout);
|
| PrintAst(isolate_->allocator(), body, os, nullptr);
|
|
|