| 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);
|
|
|