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

Side by Side Diff: src/compiler/common-operator.h

Issue 1218443002: [turbofan] Also update the BranchHint when merging a BooleanNot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address nit. Created 5 years, 5 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/common-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_COMMON_OPERATOR_H_ 5 #ifndef V8_COMPILER_COMMON_OPERATOR_H_
6 #define V8_COMPILER_COMMON_OPERATOR_H_ 6 #define V8_COMPILER_COMMON_OPERATOR_H_
7 7
8 #include "src/compiler/frame-states.h" 8 #include "src/compiler/frame-states.h"
9 #include "src/compiler/machine-type.h" 9 #include "src/compiler/machine-type.h"
10 #include "src/unique.h" 10 #include "src/unique.h"
11 11
12 namespace v8 { 12 namespace v8 {
13 namespace internal { 13 namespace internal {
14 14
15 // Forward declarations. 15 // Forward declarations.
16 class ExternalReference; 16 class ExternalReference;
17 17
18 18
19 namespace compiler { 19 namespace compiler {
20 20
21 // Forward declarations. 21 // Forward declarations.
22 class CallDescriptor; 22 class CallDescriptor;
23 struct CommonOperatorGlobalCache; 23 struct CommonOperatorGlobalCache;
24 class Operator; 24 class Operator;
25 25
26 26
27 // Prediction hint for branches. 27 // Prediction hint for branches.
28 enum class BranchHint : uint8_t { kNone, kTrue, kFalse }; 28 enum class BranchHint : uint8_t { kNone, kTrue, kFalse };
29 29
30 inline BranchHint NegateBranchHint(BranchHint hint) {
31 switch (hint) {
32 case BranchHint::kNone:
33 return hint;
34 case BranchHint::kTrue:
35 return BranchHint::kFalse;
36 case BranchHint::kFalse:
37 return BranchHint::kTrue;
38 }
39 UNREACHABLE();
40 return hint;
41 }
42
30 inline size_t hash_value(BranchHint hint) { return static_cast<size_t>(hint); } 43 inline size_t hash_value(BranchHint hint) { return static_cast<size_t>(hint); }
31 44
32 std::ostream& operator<<(std::ostream&, BranchHint); 45 std::ostream& operator<<(std::ostream&, BranchHint);
33 46
34 BranchHint BranchHintOf(const Operator* const); 47 BranchHint BranchHintOf(const Operator* const);
35 48
36 49
37 // Prediction whether throw-site is surrounded by any local catch-scope. 50 // Prediction whether throw-site is surrounded by any local catch-scope.
38 enum class IfExceptionHint { kLocallyUncaught, kLocallyCaught }; 51 enum class IfExceptionHint { kLocallyUncaught, kLocallyCaught };
39 52
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Zone* const zone_; 172 Zone* const zone_;
160 173
161 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); 174 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder);
162 }; 175 };
163 176
164 } // namespace compiler 177 } // namespace compiler
165 } // namespace internal 178 } // namespace internal
166 } // namespace v8 179 } // namespace v8
167 180
168 #endif // V8_COMPILER_COMMON_OPERATOR_H_ 181 #endif // V8_COMPILER_COMMON_OPERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/common-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698