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

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

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
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | no next file » | 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 #include "test/unittests/compiler/node-test-utils.h" 5 #include "test/unittests/compiler/node-test-utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
2036 effect_matcher, control_matcher)); 2036 effect_matcher, control_matcher));
2037 } 2037 }
2038 2038
2039 Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher, 2039 Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher,
2040 const Matcher<Node*>& lhs_matcher, 2040 const Matcher<Node*>& lhs_matcher,
2041 const Matcher<Node*>& rhs_matcher) { 2041 const Matcher<Node*>& rhs_matcher) {
2042 return MakeMatcher( 2042 return MakeMatcher(
2043 new IsReferenceEqualMatcher(type_matcher, lhs_matcher, rhs_matcher)); 2043 new IsReferenceEqualMatcher(type_matcher, lhs_matcher, rhs_matcher));
2044 } 2044 }
2045 2045
2046 Matcher<Node*> IsSpeculativeNumberAdd( 2046 #define DEFINE_SPECULATIVE_BINOP_MATCHER(opcode) \
2047 const Matcher<BinaryOperationHints::Hint>& hint_matcher, 2047 Matcher<Node*> Is##opcode( \
2048 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, 2048 const Matcher<BinaryOperationHints::Hint>& hint_matcher, \
2049 const Matcher<Node*>& effect_matcher, 2049 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher, \
2050 const Matcher<Node*>& control_matcher) { 2050 const Matcher<Node*>& effect_matcher, \
2051 return MakeMatcher(new IsSpeculativeBinopMatcher( 2051 const Matcher<Node*>& control_matcher) { \
2052 IrOpcode::kSpeculativeNumberAdd, hint_matcher, lhs_matcher, rhs_matcher, 2052 return MakeMatcher(new IsSpeculativeBinopMatcher( \
2053 effect_matcher, control_matcher)); 2053 IrOpcode::k##opcode, hint_matcher, lhs_matcher, rhs_matcher, \
2054 } 2054 effect_matcher, control_matcher)); \
2055 2055 }
2056 Matcher<Node*> IsSpeculativeNumberSubtract( 2056 SPECULATIVE_BINOPS(DEFINE_SPECULATIVE_BINOP_MATCHER);
2057 const Matcher<BinaryOperationHints::Hint>& hint_matcher, 2057 #undef DEFINE_SPECULATIVE_BINOP_MATCHER
2058 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
2059 const Matcher<Node*>& effect_matcher,
2060 const Matcher<Node*>& control_matcher) {
2061 return MakeMatcher(new IsSpeculativeBinopMatcher(
2062 IrOpcode::kSpeculativeNumberSubtract, hint_matcher, lhs_matcher,
2063 rhs_matcher, effect_matcher, control_matcher));
2064 }
2065
2066 Matcher<Node*> IsSpeculativeNumberShiftLeft(
2067 const Matcher<BinaryOperationHints::Hint>& hint_matcher,
2068 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
2069 const Matcher<Node*>& effect_matcher,
2070 const Matcher<Node*>& control_matcher) {
2071 return MakeMatcher(new IsSpeculativeBinopMatcher(
2072 IrOpcode::kSpeculativeNumberShiftLeft, hint_matcher, lhs_matcher,
2073 rhs_matcher, effect_matcher, control_matcher));
2074 }
2075
2076 Matcher<Node*> IsSpeculativeNumberShiftRight(
2077 const Matcher<BinaryOperationHints::Hint>& hint_matcher,
2078 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
2079 const Matcher<Node*>& effect_matcher,
2080 const Matcher<Node*>& control_matcher) {
2081 return MakeMatcher(new IsSpeculativeBinopMatcher(
2082 IrOpcode::kSpeculativeNumberShiftRight, hint_matcher, lhs_matcher,
2083 rhs_matcher, effect_matcher, control_matcher));
2084 }
2085
2086 Matcher<Node*> IsSpeculativeNumberShiftRightLogical(
2087 const Matcher<BinaryOperationHints::Hint>& hint_matcher,
2088 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
2089 const Matcher<Node*>& effect_matcher,
2090 const Matcher<Node*>& control_matcher) {
2091 return MakeMatcher(new IsSpeculativeBinopMatcher(
2092 IrOpcode::kSpeculativeNumberShiftRightLogical, hint_matcher, lhs_matcher,
2093 rhs_matcher, effect_matcher, control_matcher));
2094 }
2095 2058
2096 Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher, 2059 Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher,
2097 const Matcher<Node*>& effect_matcher, 2060 const Matcher<Node*>& effect_matcher,
2098 const Matcher<Node*>& control_matcher) { 2061 const Matcher<Node*>& control_matcher) {
2099 return MakeMatcher( 2062 return MakeMatcher(
2100 new IsAllocateMatcher(size_matcher, effect_matcher, control_matcher)); 2063 new IsAllocateMatcher(size_matcher, effect_matcher, control_matcher));
2101 } 2064 }
2102 2065
2103 2066
2104 Matcher<Node*> IsLoadField(const Matcher<FieldAccess>& access_matcher, 2067 Matcher<Node*> IsLoadField(const Matcher<FieldAccess>& access_matcher,
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
2376 IS_UNOP_MATCHER(StringFromCharCode) 2339 IS_UNOP_MATCHER(StringFromCharCode)
2377 IS_UNOP_MATCHER(Word32Clz) 2340 IS_UNOP_MATCHER(Word32Clz)
2378 IS_UNOP_MATCHER(Word32Ctz) 2341 IS_UNOP_MATCHER(Word32Ctz)
2379 IS_UNOP_MATCHER(Word32Popcnt) 2342 IS_UNOP_MATCHER(Word32Popcnt)
2380 IS_UNOP_MATCHER(Word32ReverseBytes) 2343 IS_UNOP_MATCHER(Word32ReverseBytes)
2381 #undef IS_UNOP_MATCHER 2344 #undef IS_UNOP_MATCHER
2382 2345
2383 } // namespace compiler 2346 } // namespace compiler
2384 } // namespace internal 2347 } // namespace internal
2385 } // namespace v8 2348 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698