Index: src/compiler/simd-scalar-lowering.h |
diff --git a/src/compiler/int64-lowering.h b/src/compiler/simd-scalar-lowering.h |
similarity index 60% |
copy from src/compiler/int64-lowering.h |
copy to src/compiler/simd-scalar-lowering.h |
index 4ec4e821eb978f9a0dc2e8908c19745b49639962..a00b4b99b5cf5c547100f362b36a91d8b2f628af 100644 |
--- a/src/compiler/int64-lowering.h |
+++ b/src/compiler/simd-scalar-lowering.h |
@@ -1,9 +1,9 @@ |
-// Copyright 2014 the V8 project authors. All rights reserved. |
+// 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_INT64_LOWERING_H_ |
-#define V8_COMPILER_INT64_LOWERING_H_ |
+#ifndef V8_COMPILER_SIMD_SCALAR_LOWERING_H_ |
+#define V8_COMPILER_SIMD_SCALAR_LOWERING_H_ |
#include "src/compiler/common-operator.h" |
#include "src/compiler/graph.h" |
@@ -15,26 +15,25 @@ namespace v8 { |
namespace internal { |
namespace compiler { |
-class Int64Lowering { |
+class SimdScalarLowering { |
public: |
- Int64Lowering(Graph* graph, MachineOperatorBuilder* machine, |
- CommonOperatorBuilder* common, Zone* zone, |
- Signature<MachineRepresentation>* signature); |
+ SimdScalarLowering(Graph* graph, MachineOperatorBuilder* machine, |
+ CommonOperatorBuilder* common, Zone* zone, |
+ Signature<MachineRepresentation>* signature); |
void LowerGraph(); |
static int GetParameterCountAfterLowering( |
Signature<MachineRepresentation>* signature); |
- static const int kLowerWordOffset; |
- static const int kHigherWordOffset; |
- |
private: |
enum class State : uint8_t { kUnvisited, kOnStack, kVisited }; |
+ enum class SimdType : uint8_t { kUndefined, kInt32, kFloat32 }; |
titzer
2016/09/05 12:59:35
I don't see where you are using the kUndefined her
aseemgarg
2016/10/10 17:35:17
Done.
|
+ |
struct Replacement { |
- Node* low; |
- Node* high; |
+ Node* node[4]; |
bradnelson
2016/08/31 22:42:08
4 -> kMaxLanes?
aseemgarg
2016/10/10 17:35:17
Done.
|
+ SimdType type; // represents what input type is expected |
}; |
Zone* zone() const { return zone_; } |
@@ -43,21 +42,17 @@ class Int64Lowering { |
CommonOperatorBuilder* common() const { return common_; } |
Signature<MachineRepresentation>* signature() const { return signature_; } |
- void PrepareReplacements(Node* node); |
- void PushNode(Node* node); |
void LowerNode(Node* node); |
bool DefaultLowering(Node* node); |
- void LowerComparison(Node* node, const Operator* signed_op, |
- const Operator* unsigned_op); |
- void PrepareProjectionReplacements(Node* node); |
- void ReplaceNode(Node* old, Node* new_low, Node* new_high); |
+ void ReplaceNode(Node* old, Node** new_nodes); |
bool HasReplacementLow(Node* node); |
- Node* GetReplacementLow(Node* node); |
bool HasReplacementHigh(Node* node); |
- Node* GetReplacementHigh(Node* node); |
+ Node** GetReplacements(Node* node); |
+ Node** GetReplacementsWithType(Node* node, SimdType type); |
+ SimdType ReplacementType(Node* node); |
void PreparePhiReplacement(Node* phi); |
- void GetIndexNodes(Node* index, Node*& index_low, Node*& index_high); |
+ void SetType(Node* node, Node* output); |
struct NodeState { |
Node* node; |
@@ -79,4 +74,4 @@ class Int64Lowering { |
} // namespace internal |
} // namespace v8 |
-#endif // V8_COMPILER_INT64_LOWERING_H_ |
+#endif // V8_COMPILER_SIMD_SCALAR_LOWERING_H_ |