Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: src/compiler/machine-operator-reducer.h

Issue 2211633003: [turbofan] Basic reductions of 64-bit machine operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Forgot the tests for Word64 shifts. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/machine-operator-reducer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MACHINE_OPERATOR_REDUCER_H_ 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
6 #define V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ 6 #define V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
7 7
8 #include "src/compiler/graph-reducer.h" 8 #include "src/compiler/graph-reducer.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 10
(...skipping 14 matching lines...) Expand all
25 ~MachineOperatorReducer(); 25 ~MachineOperatorReducer();
26 26
27 Reduction Reduce(Node* node) override; 27 Reduction Reduce(Node* node) override;
28 28
29 private: 29 private:
30 Node* Float32Constant(volatile float value); 30 Node* Float32Constant(volatile float value);
31 Node* Float64Constant(volatile double value); 31 Node* Float64Constant(volatile double value);
32 Node* Int32Constant(int32_t value); 32 Node* Int32Constant(int32_t value);
33 Node* Int64Constant(int64_t value); 33 Node* Int64Constant(int64_t value);
34 Node* Uint32Constant(uint32_t value) { 34 Node* Uint32Constant(uint32_t value) {
35 return Int32Constant(bit_cast<uint32_t>(value)); 35 return Int32Constant(bit_cast<int32_t>(value));
36 }
37 Node* Uint64Constant(uint64_t value) {
38 return Int64Constant(bit_cast<int64_t>(value));
36 } 39 }
37 Node* Float64Mul(Node* lhs, Node* rhs); 40 Node* Float64Mul(Node* lhs, Node* rhs);
38 Node* Float64PowHalf(Node* value); 41 Node* Float64PowHalf(Node* value);
39 Node* Word32And(Node* lhs, Node* rhs); 42 Node* Word32And(Node* lhs, Node* rhs);
40 Node* Word32And(Node* lhs, uint32_t rhs) { 43 Node* Word32And(Node* lhs, uint32_t rhs) {
41 return Word32And(lhs, Uint32Constant(rhs)); 44 return Word32And(lhs, Uint32Constant(rhs));
42 } 45 }
43 Node* Word32Sar(Node* lhs, uint32_t rhs); 46 Node* Word32Sar(Node* lhs, uint32_t rhs);
44 Node* Word32Shr(Node* lhs, uint32_t rhs); 47 Node* Word32Shr(Node* lhs, uint32_t rhs);
45 Node* Word32Equal(Node* lhs, Node* rhs); 48 Node* Word32Equal(Node* lhs, Node* rhs);
(...skipping 14 matching lines...) Expand all
60 return Replace(Int32Constant(value)); 63 return Replace(Int32Constant(value));
61 } 64 }
62 Reduction ReplaceUint32(uint32_t value) { 65 Reduction ReplaceUint32(uint32_t value) {
63 return Replace(Uint32Constant(value)); 66 return Replace(Uint32Constant(value));
64 } 67 }
65 Reduction ReplaceInt64(int64_t value) { 68 Reduction ReplaceInt64(int64_t value) {
66 return Replace(Int64Constant(value)); 69 return Replace(Int64Constant(value));
67 } 70 }
68 71
69 Reduction ReduceInt32Add(Node* node); 72 Reduction ReduceInt32Add(Node* node);
73 Reduction ReduceInt64Add(Node* node);
70 Reduction ReduceInt32Sub(Node* node); 74 Reduction ReduceInt32Sub(Node* node);
75 Reduction ReduceInt64Sub(Node* node);
71 Reduction ReduceInt32Div(Node* node); 76 Reduction ReduceInt32Div(Node* node);
72 Reduction ReduceUint32Div(Node* node); 77 Reduction ReduceUint32Div(Node* node);
73 Reduction ReduceInt32Mod(Node* node); 78 Reduction ReduceInt32Mod(Node* node);
74 Reduction ReduceUint32Mod(Node* node); 79 Reduction ReduceUint32Mod(Node* node);
75 Reduction ReduceStore(Node* node); 80 Reduction ReduceStore(Node* node);
76 Reduction ReduceProjection(size_t index, Node* node); 81 Reduction ReduceProjection(size_t index, Node* node);
77 Reduction ReduceWord32Shifts(Node* node); 82 Reduction ReduceWord32Shifts(Node* node);
78 Reduction ReduceWord32Shl(Node* node); 83 Reduction ReduceWord32Shl(Node* node);
84 Reduction ReduceWord64Shl(Node* node);
79 Reduction ReduceWord32Shr(Node* node); 85 Reduction ReduceWord32Shr(Node* node);
86 Reduction ReduceWord64Shr(Node* node);
80 Reduction ReduceWord32Sar(Node* node); 87 Reduction ReduceWord32Sar(Node* node);
88 Reduction ReduceWord64Sar(Node* node);
81 Reduction ReduceWord32And(Node* node); 89 Reduction ReduceWord32And(Node* node);
82 Reduction TryMatchWord32Ror(Node* node); 90 Reduction TryMatchWord32Ror(Node* node);
83 Reduction ReduceWord32Or(Node* node); 91 Reduction ReduceWord32Or(Node* node);
84 Reduction ReduceWord32Xor(Node* node); 92 Reduction ReduceWord32Xor(Node* node);
85 Reduction ReduceFloat64InsertLowWord32(Node* node); 93 Reduction ReduceFloat64InsertLowWord32(Node* node);
86 Reduction ReduceFloat64InsertHighWord32(Node* node); 94 Reduction ReduceFloat64InsertHighWord32(Node* node);
87 Reduction ReduceFloat64Compare(Node* node); 95 Reduction ReduceFloat64Compare(Node* node);
88 96
89 Graph* graph() const; 97 Graph* graph() const;
90 JSGraph* jsgraph() const { return jsgraph_; } 98 JSGraph* jsgraph() const { return jsgraph_; }
91 CommonOperatorBuilder* common() const; 99 CommonOperatorBuilder* common() const;
92 MachineOperatorBuilder* machine() const; 100 MachineOperatorBuilder* machine() const;
93 101
94 JSGraph* jsgraph_; 102 JSGraph* jsgraph_;
95 }; 103 };
96 104
97 } // namespace compiler 105 } // namespace compiler
98 } // namespace internal 106 } // namespace internal
99 } // namespace v8 107 } // namespace v8
100 108
101 #endif // V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_ 109 #endif // V8_COMPILER_MACHINE_OPERATOR_REDUCER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/machine-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698