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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/common-operator-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.h
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
index 4d8b1694b1cb35e906f10be59e8cc3761befd3ed..3b89b2cd038431d26ff745c88ab3edeaa8affa68 100644
--- a/src/compiler/common-operator.h
+++ b/src/compiler/common-operator.h
@@ -27,6 +27,19 @@ class Operator;
// Prediction hint for branches.
enum class BranchHint : uint8_t { kNone, kTrue, kFalse };
+inline BranchHint NegateBranchHint(BranchHint hint) {
+ switch (hint) {
+ case BranchHint::kNone:
+ return hint;
+ case BranchHint::kTrue:
+ return BranchHint::kFalse;
+ case BranchHint::kFalse:
+ return BranchHint::kTrue;
+ }
+ UNREACHABLE();
+ return hint;
+}
+
inline size_t hash_value(BranchHint hint) { return static_cast<size_t>(hint); }
std::ostream& operator<<(std::ostream&, BranchHint);
« 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