OLD | NEW |
---|---|
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_SIMD_SCALAR_LOWERING_H_ | 5 #ifndef V8_COMPILER_SIMD_SCALAR_LOWERING_H_ |
6 #define V8_COMPILER_SIMD_SCALAR_LOWERING_H_ | 6 #define V8_COMPILER_SIMD_SCALAR_LOWERING_H_ |
7 | 7 |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 void LowerNode(Node* node); | 46 void LowerNode(Node* node); |
47 bool DefaultLowering(Node* node); | 47 bool DefaultLowering(Node* node); |
48 | 48 |
49 void ReplaceNode(Node* old, Node** new_nodes); | 49 void ReplaceNode(Node* old, Node** new_nodes); |
50 bool HasReplacement(size_t index, Node* node); | 50 bool HasReplacement(size_t index, Node* node); |
51 Node** GetReplacements(Node* node); | 51 Node** GetReplacements(Node* node); |
52 Node** GetReplacementsWithType(Node* node, SimdType type); | 52 Node** GetReplacementsWithType(Node* node, SimdType type); |
53 SimdType ReplacementType(Node* node); | 53 SimdType ReplacementType(Node* node); |
54 void PreparePhiReplacement(Node* phi); | 54 void PreparePhiReplacement(Node* phi); |
55 void SetLoweredType(Node* node, Node* output); | 55 void SetLoweredType(Node* node, Node* output); |
56 bool IsScalarLoweringEnabled() { | |
bbudge
2016/11/18 19:30:59
How hard is it to just not even create a SimdScala
gdeepti
2016/11/21 19:30:02
Fixed to use SupportsSimd128 function, moved condi
| |
57 #if V8_TARGET_ARCH_X64 | |
58 return false; | |
59 #endif | |
60 return true; | |
61 } | |
56 | 62 |
57 struct NodeState { | 63 struct NodeState { |
58 Node* node; | 64 Node* node; |
59 int input_index; | 65 int input_index; |
60 }; | 66 }; |
61 | 67 |
62 Zone* zone_; | 68 Zone* zone_; |
63 Graph* const graph_; | 69 Graph* const graph_; |
64 MachineOperatorBuilder* machine_; | 70 MachineOperatorBuilder* machine_; |
65 CommonOperatorBuilder* common_; | 71 CommonOperatorBuilder* common_; |
66 NodeMarker<State> state_; | 72 NodeMarker<State> state_; |
67 ZoneDeque<NodeState> stack_; | 73 ZoneDeque<NodeState> stack_; |
68 Replacement* replacements_; | 74 Replacement* replacements_; |
69 Signature<MachineRepresentation>* signature_; | 75 Signature<MachineRepresentation>* signature_; |
70 Node* placeholder_; | 76 Node* placeholder_; |
71 int parameter_count_after_lowering_; | 77 int parameter_count_after_lowering_; |
72 }; | 78 }; |
73 | 79 |
74 } // namespace compiler | 80 } // namespace compiler |
75 } // namespace internal | 81 } // namespace internal |
76 } // namespace v8 | 82 } // namespace v8 |
77 | 83 |
78 #endif // V8_COMPILER_SIMD_SCALAR_LOWERING_H_ | 84 #endif // V8_COMPILER_SIMD_SCALAR_LOWERING_H_ |
OLD | NEW |