Commit 12d821dd authored by rmcilroy's avatar rmcilroy Committed by Commit bot

Revert of [turbofan] Utilize String comparison feedback. (patchset #1 id:1 of...

Revert of [turbofan] Utilize String comparison feedback. (patchset #1 id:1 of https://codereview.chromium.org/2523463002/ )

Reason for revert:
Seems to regress speedometer on Ignition and doesn't cause any improvements elsewhere.

BUG=chromium:668651

Original issue's description:
> [turbofan] Utilize String comparison feedback.
>
> Make use of the previously introduced String feedback for compare
> operations in TurboFan.
>
> R=jarin@chromium.org
> BUG=v8:5267,v8:5400
>
> Committed: https://crrev.com/5d4253ecfb6ddcbbd7eb5654e728efa9559284a2
> Cr-Commit-Position: refs/heads/master@{#41163}

TBR=jarin@chromium.org,bmeurer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5267,v8:5400

Review-Url: https://codereview.chromium.org/2531183003
Cr-Commit-Position: refs/heads/master@{#41324}
parent ac886073
......@@ -76,16 +76,6 @@ class JSBinopReduction final {
return false;
}
bool IsStringCompareOperation() {
if (lowering_->flags() & JSTypedLowering::kDeoptimizationEnabled) {
DCHECK_EQ(1, node_->op()->EffectOutputCount());
return (CompareOperationHintOf(node_->op()) ==
CompareOperationHint::kString) &&
BothInputsMaybe(Type::String());
}
return false;
}
// Check if a string addition will definitely result in creating a ConsString,
// i.e. if the combined length of the resulting string exceeds the ConsString
// minimum length.
......@@ -114,23 +104,6 @@ class JSBinopReduction final {
return false;
}
// Checks that both inputs are String, and if we don't know statically that
// one side is already a String, insert a CheckString node.
void CheckInputsToString() {
if (!left_type()->Is(Type::String())) {
Node* left_input = graph()->NewNode(simplified()->CheckString(), left(),
effect(), control());
node_->ReplaceInput(0, left_input);
update_effect(left_input);
}
if (!right_type()->Is(Type::String())) {
Node* right_input = graph()->NewNode(simplified()->CheckString(), right(),
effect(), control());
node_->ReplaceInput(1, right_input);
update_effect(right_input);
}
}
void ConvertInputsToNumber() {
// To convert the inputs to numbers, we have to provide frame states
// for lazy bailouts in the ToNumber conversions.
......@@ -344,10 +317,6 @@ class JSBinopReduction final {
bool BothInputsAre(Type* t) { return LeftInputIs(t) && RightInputIs(t); }
bool BothInputsMaybe(Type* t) {
return left_type()->Maybe(t) && right_type()->Maybe(t);
}
bool OneInputCannotBe(Type* t) {
return !left_type()->Maybe(t) || !right_type()->Maybe(t);
}
......@@ -778,10 +747,6 @@ Reduction JSTypedLowering::ReduceJSComparison(Node* node) {
r.ConvertInputsToNumber();
less_than = simplified()->NumberLessThan();
less_than_or_equal = simplified()->NumberLessThanOrEqual();
} else if (r.IsStringCompareOperation()) {
r.CheckInputsToString();
less_than = simplified()->StringLessThan();
less_than_or_equal = simplified()->StringLessThanOrEqual();
} else {
return NoChange();
}
......@@ -920,9 +885,6 @@ Reduction JSTypedLowering::ReduceJSEqual(Node* node, bool invert) {
simplified()->SpeculativeNumberEqual(hint), invert, Type::Boolean());
} else if (r.BothInputsAre(Type::Number())) {
return r.ChangeToPureOperator(simplified()->NumberEqual(), invert);
} else if (r.IsStringCompareOperation()) {
r.CheckInputsToString();
return r.ChangeToPureOperator(simplified()->StringEqual(), invert);
}
return NoChange();
}
......@@ -985,9 +947,6 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node, bool invert) {
simplified()->SpeculativeNumberEqual(hint), invert, Type::Boolean());
} else if (r.BothInputsAre(Type::Number())) {
return r.ChangeToPureOperator(simplified()->NumberEqual(), invert);
} else if (r.IsStringCompareOperation()) {
r.CheckInputsToString();
return r.ChangeToPureOperator(simplified()->StringEqual(), invert);
}
return NoChange();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment