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

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

Issue 2363333003: [turbofan] Lower StringEqual and friends in EffectControlLinearizer. (Closed)
Patch Set: Created 4 years, 3 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
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index a531b27ec87a63408961611d6ccf874d4d53ef39..dbef2dc991eab9023a206f848ee212036e3ed74e 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -2040,62 +2040,11 @@ class RepresentationSelector {
}
return;
}
- case IrOpcode::kStringEqual: {
- VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
- if (lower()) {
- // StringEqual(x, y) => Call(StringEqualStub, x, y, no-context)
- Operator::Properties properties =
- Operator::kCommutative | Operator::kEliminatable;
- Callable callable = CodeFactory::StringEqual(jsgraph_->isolate());
- CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
- CallDescriptor* desc = Linkage::GetStubCallDescriptor(
- jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
- flags, properties);
- node->InsertInput(jsgraph_->zone(), 0,
- jsgraph_->HeapConstant(callable.code()));
- node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
- node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start());
- NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
- }
- return;
- }
- case IrOpcode::kStringLessThan: {
- VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
- if (lower()) {
- // StringLessThan(x, y) => Call(StringLessThanStub, x, y, no-context)
- Operator::Properties properties = Operator::kEliminatable;
- Callable callable = CodeFactory::StringLessThan(jsgraph_->isolate());
- CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
- CallDescriptor* desc = Linkage::GetStubCallDescriptor(
- jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
- flags, properties);
- node->InsertInput(jsgraph_->zone(), 0,
- jsgraph_->HeapConstant(callable.code()));
- node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
- node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start());
- NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
- }
- return;
- }
+ case IrOpcode::kStringEqual:
+ case IrOpcode::kStringLessThan:
case IrOpcode::kStringLessThanOrEqual: {
- VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
- if (lower()) {
- // StringLessThanOrEqual(x, y)
- // => Call(StringLessThanOrEqualStub, x, y, no-context)
- Operator::Properties properties = Operator::kEliminatable;
- Callable callable =
- CodeFactory::StringLessThanOrEqual(jsgraph_->isolate());
- CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
- CallDescriptor* desc = Linkage::GetStubCallDescriptor(
- jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
- flags, properties);
- node->InsertInput(jsgraph_->zone(), 0,
- jsgraph_->HeapConstant(callable.code()));
- node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
- node->AppendInput(jsgraph_->zone(), jsgraph_->graph()->start());
- NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
- }
- return;
+ return VisitBinop(node, UseInfo::AnyTagged(),
+ MachineRepresentation::kTagged);
}
case IrOpcode::kStringCharCodeAt: {
VisitBinop(node, UseInfo::AnyTagged(), UseInfo::TruncatingWord32(),
« src/compiler/effect-control-linearizer.cc ('K') | « src/compiler/effect-control-linearizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698