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

Side by Side Diff: test/unittests/compiler/node-test-utils.h

Issue 2201073002: [turbofan] Adds speculative operator for bitwise and, or and xor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handles kSigned32 feedback. 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
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_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ 5 #ifndef V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
6 #define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ 6 #define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
7 7
8 #include "src/compiler/machine-operator.h" 8 #include "src/compiler/machine-operator.h"
9 #include "src/compiler/type-hints.h" 9 #include "src/compiler/type-hints.h"
10 #include "src/machine-type.h" 10 #include "src/machine-type.h"
(...skipping 16 matching lines...) Expand all
27 class BufferAccess; 27 class BufferAccess;
28 class CallDescriptor; 28 class CallDescriptor;
29 class ContextAccess; 29 class ContextAccess;
30 struct ElementAccess; 30 struct ElementAccess;
31 struct FieldAccess; 31 struct FieldAccess;
32 class Node; 32 class Node;
33 33
34 34
35 using ::testing::Matcher; 35 using ::testing::Matcher;
36 36
37 #define SPECULATIVE_BINOPS(V) \
38 V(SpeculativeNumberAdd) \
39 V(SpeculativeNumberSubtract) \
40 V(SpeculativeNumberShiftLeft) \
41 V(SpeculativeNumberShiftRight) \
42 V(SpeculativeNumberShiftRightLogical) \
43 V(SpeculativeNumberBitwiseAnd) \
44 V(SpeculativeNumberBitwiseOr) \
45 V(SpeculativeNumberBitwiseXor)
37 46
38 Matcher<Node*> IsDead(); 47 Matcher<Node*> IsDead();
39 Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher); 48 Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher);
40 Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher, 49 Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher,
41 const Matcher<Node*>& control1_matcher); 50 const Matcher<Node*>& control1_matcher);
42 Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher, 51 Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher,
43 const Matcher<Node*>& control1_matcher, 52 const Matcher<Node*>& control1_matcher,
44 const Matcher<Node*>& control2_matcher); 53 const Matcher<Node*>& control2_matcher);
45 Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher, 54 Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher,
46 const Matcher<Node*>& control_matcher); 55 const Matcher<Node*>& control_matcher);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 Matcher<Node*> IsBooleanNot(const Matcher<Node*>& value_matcher); 204 Matcher<Node*> IsBooleanNot(const Matcher<Node*>& value_matcher);
196 Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher, 205 Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher,
197 const Matcher<Node*>& lhs_matcher, 206 const Matcher<Node*>& lhs_matcher,
198 const Matcher<Node*>& rhs_matcher); 207 const Matcher<Node*>& rhs_matcher);
199 Matcher<Node*> IsNumberEqual(const Matcher<Node*>& lhs_matcher, 208 Matcher<Node*> IsNumberEqual(const Matcher<Node*>& lhs_matcher,
200 const Matcher<Node*>& rhs_matcher); 209 const Matcher<Node*>& rhs_matcher);
201 Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher, 210 Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher,
202 const Matcher<Node*>& rhs_matcher); 211 const Matcher<Node*>& rhs_matcher);
203 Matcher<Node*> IsNumberAdd(const Matcher<Node*>& lhs_matcher, 212 Matcher<Node*> IsNumberAdd(const Matcher<Node*>& lhs_matcher,
204 const Matcher<Node*>& rhs_matcher); 213 const Matcher<Node*>& rhs_matcher);
205 Matcher<Node*> IsSpeculativeNumberAdd( 214
206 const Matcher<BinaryOperationHints::Hint>& hint_matcher, 215 #define DECLARE_SPECULATIVE_BINOP_MATCHER(opcode) \
207 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, 216 Matcher<Node*> Is##opcode( \
208 const Matcher<Node*>& effect_matcher, 217 const Matcher<BinaryOperationHints::Hint>& hint_matcher, \
209 const Matcher<Node*>& control_matcher); 218 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, \
210 Matcher<Node*> IsSpeculativeNumberSubtract( 219 const Matcher<Node*>& effect_matcher, \
211 const Matcher<BinaryOperationHints::Hint>& hint_matcher, 220 const Matcher<Node*>& control_matcher);
212 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, 221 SPECULATIVE_BINOPS(DECLARE_SPECULATIVE_BINOP_MATCHER);
213 const Matcher<Node*>& effect_matcher, 222 #undef DECLARE_SPECULATIVE_BINOP_MATCHER
214 const Matcher<Node*>& control_matcher); 223
215 Matcher<Node*> IsSpeculativeNumberShiftLeft(
216 const Matcher<BinaryOperationHints::Hint>& hint_matcher,
217 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
218 const Matcher<Node*>& effect_matcher,
219 const Matcher<Node*>& control_matcher);
220 Matcher<Node*> IsSpeculativeNumberShiftRight(
221 const Matcher<BinaryOperationHints::Hint>& hint_matcher,
222 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
223 const Matcher<Node*>& effect_matcher,
224 const Matcher<Node*>& control_matcher);
225 Matcher<Node*> IsSpeculativeNumberShiftRightLogical(
226 const Matcher<BinaryOperationHints::Hint>& hint_matcher,
227 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
228 const Matcher<Node*>& effect_matcher,
229 const Matcher<Node*>& control_matcher);
230 Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher, 224 Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher,
231 const Matcher<Node*>& rhs_matcher); 225 const Matcher<Node*>& rhs_matcher);
232 Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher, 226 Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher,
233 const Matcher<Node*>& rhs_matcher); 227 const Matcher<Node*>& rhs_matcher);
234 Matcher<Node*> IsNumberShiftLeft(const Matcher<Node*>& lhs_matcher, 228 Matcher<Node*> IsNumberShiftLeft(const Matcher<Node*>& lhs_matcher,
235 const Matcher<Node*>& rhs_matcher); 229 const Matcher<Node*>& rhs_matcher);
236 Matcher<Node*> IsNumberShiftRight(const Matcher<Node*>& lhs_matcher, 230 Matcher<Node*> IsNumberShiftRight(const Matcher<Node*>& lhs_matcher,
237 const Matcher<Node*>& rhs_matcher); 231 const Matcher<Node*>& rhs_matcher);
238 Matcher<Node*> IsNumberShiftRightLogical(const Matcher<Node*>& lhs_matcher, 232 Matcher<Node*> IsNumberShiftRightLogical(const Matcher<Node*>& lhs_matcher,
239 const Matcher<Node*>& rhs_matcher); 233 const Matcher<Node*>& rhs_matcher);
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 const Matcher<Node*>& rhs_matcher); 455 const Matcher<Node*>& rhs_matcher);
462 Matcher<Node*> IsWord32ReverseBytes(const Matcher<Node*>& value_matcher); 456 Matcher<Node*> IsWord32ReverseBytes(const Matcher<Node*>& value_matcher);
463 457
464 Matcher<Node*> IsStackSlot(); 458 Matcher<Node*> IsStackSlot();
465 459
466 } // namespace compiler 460 } // namespace compiler
467 } // namespace internal 461 } // namespace internal
468 } // namespace v8 462 } // namespace v8
469 463
470 #endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ 464 #endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-typed-lowering-unittest.cc ('k') | test/unittests/compiler/node-test-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698