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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 2144203002: [turbofan] JSTypedLowering can just look at the type hints. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-typed-lowering.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 2fa4eb4fae72c7e54a9769b4f0451980ba1a708b..60996e1ae51329bffa38bfebaceac4e644f6a4ed 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -28,36 +28,32 @@ class JSBinopReduction final {
: lowering_(lowering), node_(node) {}
BinaryOperationHints::Hint GetNumberBinaryOperationFeedback() {
- if (!(lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) ||
- !(lowering_->flags() & JSTypedLowering::kTypeFeedbackEnabled)) {
- return BinaryOperationHints::kAny;
- }
- DCHECK_NE(0, node_->op()->ControlOutputCount());
- DCHECK_EQ(1, node_->op()->EffectOutputCount());
- DCHECK_LE(1, OperatorProperties::GetFrameStateInputCount(node_->op()));
- BinaryOperationHints hints = BinaryOperationHintsOf(node_->op());
- BinaryOperationHints::Hint combined = hints.combined();
- if (combined == BinaryOperationHints::kSignedSmall ||
- combined == BinaryOperationHints::kSigned32 ||
- combined == BinaryOperationHints::kNumberOrOddball) {
- return combined;
+ if (lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) {
+ DCHECK_NE(0, node_->op()->ControlOutputCount());
+ DCHECK_EQ(1, node_->op()->EffectOutputCount());
+ DCHECK_LE(1, OperatorProperties::GetFrameStateInputCount(node_->op()));
+ BinaryOperationHints hints = BinaryOperationHintsOf(node_->op());
+ BinaryOperationHints::Hint combined = hints.combined();
+ if (combined == BinaryOperationHints::kSignedSmall ||
+ combined == BinaryOperationHints::kSigned32 ||
+ combined == BinaryOperationHints::kNumberOrOddball) {
+ return combined;
+ }
}
return BinaryOperationHints::kAny;
}
CompareOperationHints::Hint GetNumberCompareOperationFeedback() {
- if (!(lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) ||
- !(lowering_->flags() & JSTypedLowering::kTypeFeedbackEnabled)) {
- return CompareOperationHints::kAny;
- }
- DCHECK_NE(0, node_->op()->ControlOutputCount());
- DCHECK_EQ(1, node_->op()->EffectOutputCount());
- DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node_->op()));
- CompareOperationHints hints = CompareOperationHintsOf(node_->op());
- CompareOperationHints::Hint combined = hints.combined();
- if (combined == CompareOperationHints::kSignedSmall ||
- combined == CompareOperationHints::kNumberOrOddball) {
- return combined;
+ if (lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) {
+ DCHECK_NE(0, node_->op()->ControlOutputCount());
+ DCHECK_EQ(1, node_->op()->EffectOutputCount());
+ DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node_->op()));
+ CompareOperationHints hints = CompareOperationHintsOf(node_->op());
+ CompareOperationHints::Hint combined = hints.combined();
+ if (combined == CompareOperationHints::kSignedSmall ||
+ combined == CompareOperationHints::kNumberOrOddball) {
+ return combined;
+ }
}
return CompareOperationHints::kAny;
}
« no previous file with comments | « src/compiler/js-typed-lowering.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698