OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_CHANGE_LOWERING_H_ | 5 #ifndef V8_COMPILER_CHANGE_LOWERING_H_ |
6 #define V8_COMPILER_CHANGE_LOWERING_H_ | 6 #define V8_COMPILER_CHANGE_LOWERING_H_ |
7 | 7 |
8 #include "src/compiler/graph-reducer.h" | 8 #include "src/compiler/graph-reducer.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class ChangeLowering final : public Reducer { | 22 class ChangeLowering final : public Reducer { |
23 public: | 23 public: |
24 explicit ChangeLowering(JSGraph* jsgraph) : jsgraph_(jsgraph) {} | 24 explicit ChangeLowering(JSGraph* jsgraph) : jsgraph_(jsgraph) {} |
25 ~ChangeLowering() final; | 25 ~ChangeLowering() final; |
26 | 26 |
27 Reduction Reduce(Node* node) final; | 27 Reduction Reduce(Node* node) final; |
28 | 28 |
29 private: | 29 private: |
30 Node* HeapNumberValueIndexConstant(); | 30 Node* HeapNumberValueIndexConstant(); |
| 31 Node* Simd128ValueIndexConstant(); |
31 Node* SmiMaxValueConstant(); | 32 Node* SmiMaxValueConstant(); |
32 Node* SmiShiftBitsConstant(); | 33 Node* SmiShiftBitsConstant(); |
33 | 34 |
34 Node* AllocateHeapNumberWithValue(Node* value, Node* control); | 35 Node* AllocateHeapNumberWithValue(Node* value, Node* control); |
| 36 #define SIMD128_ALLOCATE(TYPE, Type, type, lane_count, lane_type) \ |
| 37 Node* Allocate##Type##WithValue(Node* value); |
| 38 SIMD128_TYPES(SIMD128_ALLOCATE) |
| 39 #undef SIMD128_ALLOCATE |
| 40 |
35 Node* ChangeInt32ToFloat64(Node* value); | 41 Node* ChangeInt32ToFloat64(Node* value); |
36 Node* ChangeInt32ToSmi(Node* value); | 42 Node* ChangeInt32ToSmi(Node* value); |
37 Node* ChangeSmiToFloat64(Node* value); | 43 Node* ChangeSmiToFloat64(Node* value); |
38 Node* ChangeSmiToInt32(Node* value); | 44 Node* ChangeSmiToInt32(Node* value); |
39 Node* ChangeUint32ToFloat64(Node* value); | 45 Node* ChangeUint32ToFloat64(Node* value); |
40 Node* ChangeUint32ToSmi(Node* value); | 46 Node* ChangeUint32ToSmi(Node* value); |
41 Node* LoadHeapNumberValue(Node* value, Node* control); | 47 Node* LoadHeapNumberValue(Node* value, Node* control); |
| 48 #define SIMD128_LOAD(TYPE, Type, type, lane_count, lane_type) \ |
| 49 Node* Load##Type##Value(Node* value); |
| 50 SIMD128_TYPES(SIMD128_LOAD) |
| 51 #undef SIMD128_LOAD |
42 Node* TestNotSmi(Node* value); | 52 Node* TestNotSmi(Node* value); |
43 | 53 |
44 Reduction ChangeBitToBool(Node* value, Node* control); | 54 Reduction ChangeBitToBool(Node* value, Node* control); |
45 Reduction ChangeBoolToBit(Node* value); | 55 Reduction ChangeBoolToBit(Node* value); |
46 Reduction ChangeFloat64ToTagged(Node* value, Node* control); | 56 Reduction ChangeFloat64ToTagged(Node* value, Node* control); |
47 Reduction ChangeInt32ToTagged(Node* value, Node* control); | 57 Reduction ChangeInt32ToTagged(Node* value, Node* control); |
48 Reduction ChangeTaggedToFloat64(Node* value, Node* control); | 58 Reduction ChangeTaggedToFloat64(Node* value, Node* control); |
49 Reduction ChangeTaggedToUI32(Node* value, Node* control, | 59 Reduction ChangeTaggedToUI32(Node* value, Node* control, |
50 Signedness signedness); | 60 Signedness signedness); |
51 Reduction ChangeUint32ToTagged(Node* value, Node* control); | 61 Reduction ChangeUint32ToTagged(Node* value, Node* control); |
| 62 #define SIMD128_CHANGE(TYPE, Type, type, lane_count, lane_type) \ |
| 63 Reduction Change##Type##ToTagged(Node* value, Node* control); \ |
| 64 Reduction ChangeTaggedTo##Type(Node* value, Node* control); |
| 65 SIMD128_TYPES(SIMD128_CHANGE) |
| 66 #undef SIMD128_CHANGE |
52 | 67 |
53 Reduction LoadField(Node* node); | 68 Reduction LoadField(Node* node); |
54 Reduction StoreField(Node* node); | 69 Reduction StoreField(Node* node); |
55 Reduction LoadElement(Node* node); | 70 Reduction LoadElement(Node* node); |
56 Reduction StoreElement(Node* node); | 71 Reduction StoreElement(Node* node); |
57 Reduction Allocate(Node* node); | 72 Reduction Allocate(Node* node); |
58 | 73 |
59 Node* IsSmi(Node* value); | 74 Node* IsSmi(Node* value); |
60 Node* LoadHeapObjectMap(Node* object, Node* control); | 75 Node* LoadHeapObjectMap(Node* object, Node* control); |
61 Node* LoadMapBitField(Node* map); | 76 Node* LoadMapBitField(Node* map); |
62 Node* LoadMapInstanceType(Node* map); | 77 Node* LoadMapInstanceType(Node* map); |
63 | 78 |
64 Reduction ObjectIsNumber(Node* node); | 79 Reduction ObjectIsNumber(Node* node); |
65 Reduction ObjectIsReceiver(Node* node); | 80 Reduction ObjectIsReceiver(Node* node); |
66 Reduction ObjectIsSmi(Node* node); | 81 Reduction ObjectIsSmi(Node* node); |
67 Reduction ObjectIsUndetectable(Node* node); | 82 Reduction ObjectIsUndetectable(Node* node); |
68 | 83 |
69 Node* ComputeIndex(const ElementAccess& access, Node* const key); | 84 Node* ComputeIndex(const ElementAccess& access, Node* const key); |
70 Graph* graph() const; | 85 Graph* graph() const; |
71 Isolate* isolate() const; | 86 Isolate* isolate() const; |
72 JSGraph* jsgraph() const { return jsgraph_; } | 87 JSGraph* jsgraph() const { return jsgraph_; } |
73 CommonOperatorBuilder* common() const; | 88 CommonOperatorBuilder* common() const; |
74 MachineOperatorBuilder* machine() const; | 89 MachineOperatorBuilder* machine() const; |
75 | 90 |
76 JSGraph* const jsgraph_; | 91 JSGraph* const jsgraph_; |
77 SetOncePointer<const Operator> allocate_heap_number_operator_; | 92 SetOncePointer<const Operator> allocate_heap_number_operator_; |
| 93 #define SIMD128_OPERATOR(TYPE, Type, type, lane_count, lane_type) \ |
| 94 SetOncePointer<const Operator> allocate_##type##_value_operator_; |
| 95 SIMD128_TYPES(SIMD128_OPERATOR) |
| 96 #undef SIMD128_OPERATOR |
78 }; | 97 }; |
79 | 98 |
80 } // namespace compiler | 99 } // namespace compiler |
81 } // namespace internal | 100 } // namespace internal |
82 } // namespace v8 | 101 } // namespace v8 |
83 | 102 |
84 #endif // V8_COMPILER_CHANGE_LOWERING_H_ | 103 #endif // V8_COMPILER_CHANGE_LOWERING_H_ |
OLD | NEW |