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

Unified Diff: src/compiler/simplified-operator.cc

Issue 2035383003: [turbofan] Type feedback for numeric comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase, pure ops Created 4 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 | « src/compiler/simplified-operator.h ('k') | src/compiler/type-hint-analyzer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-operator.cc
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
index cee25ed21cb7ff14611581c2b438edcd70f4d69f..be762f47aed28bd3b4117ffbac1e929098034c97 100644
--- a/src/compiler/simplified-operator.cc
+++ b/src/compiler/simplified-operator.cc
@@ -223,6 +223,13 @@ BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op) {
return OpParameter<BinaryOperationHints::Hint>(op);
}
+CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) {
+ DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberEqual ||
+ op->opcode() == IrOpcode::kSpeculativeNumberLessThan ||
+ op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual);
+ return OpParameter<CompareOperationHints::Hint>(op);
+}
+
#define PURE_OP_LIST(V) \
V(BooleanNot, Operator::kNoProperties, 1) \
V(BooleanToNumber, Operator::kNoProperties, 1) \
@@ -497,6 +504,27 @@ const Operator* SimplifiedOperatorBuilder::SpeculativeNumberSubtract(
"SpeculativeNumberSubtract", 2, 1, 1, 1, 1, 1, hint);
}
+const Operator* SimplifiedOperatorBuilder::SpeculativeNumberEqual(
+ CompareOperationHints::Hint hint) {
+ return new (zone()) Operator1<CompareOperationHints::Hint>(
+ IrOpcode::kSpeculativeNumberEqual, Operator::kPure,
+ "SpeculativeNumberEqual", 2, 1, 1, 1, 1, 1, hint);
+}
+
+const Operator* SimplifiedOperatorBuilder::SpeculativeNumberLessThan(
+ CompareOperationHints::Hint hint) {
+ return new (zone()) Operator1<CompareOperationHints::Hint>(
+ IrOpcode::kSpeculativeNumberLessThan, Operator::kPure,
+ "SpeculativeNumberLessThan", 2, 1, 1, 1, 1, 1, hint);
+}
+
+const Operator* SimplifiedOperatorBuilder::SpeculativeNumberLessThanOrEqual(
+ CompareOperationHints::Hint hint) {
+ return new (zone()) Operator1<CompareOperationHints::Hint>(
+ IrOpcode::kSpeculativeNumberLessThanOrEqual, Operator::kPure,
+ "SpeculativeNumberLessThanOrEqual", 2, 1, 1, 1, 1, 1, hint);
+}
+
#define ACCESS_OP_LIST(V) \
V(LoadField, FieldAccess, Operator::kNoWrite, 1, 1, 1) \
V(StoreField, FieldAccess, Operator::kNoRead, 2, 1, 0) \
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/type-hint-analyzer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698