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

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

Issue 2103363004: [turbofan] Run representation selection without the Typer decorator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/pipeline.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
index 1905c75107cee8732d5952a784cc9dcca2ee4909..b36b777224b4fb949fc5eee5216ac462b2d2299b 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -671,6 +671,11 @@ class RepresentationSelector {
Type* GetUpperBound(Node* node) { return NodeProperties::GetType(node); }
+ bool InputCannotBe(Node* node, Type* type) {
+ DCHECK_EQ(1, node->op()->ValueInputCount());
+ return !GetUpperBound(node->InputAt(0))->Maybe(type);
+ }
+
bool InputIs(Node* node, Type* type) {
DCHECK_EQ(1, node->op()->ValueInputCount());
return GetUpperBound(node->InputAt(0))->Is(type);
@@ -1703,11 +1708,11 @@ class RepresentationSelector {
return;
}
case IrOpcode::kCheckTaggedPointer: {
- VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
- if (lower()) {
- if (InputIs(node, Type::TaggedPointer())) {
- DeferReplacement(node, node->InputAt(0));
- }
+ if (InputCannotBe(node, Type::SignedSmall())) {
+ VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
+ if (lower()) DeferReplacement(node, node->InputAt(0));
+ } else {
+ VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
}
return;
}
@@ -1719,11 +1724,6 @@ class RepresentationSelector {
if (lower()) DeferReplacement(node, node->InputAt(0));
} else {
VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
- if (lower()) {
- if (InputIs(node, Type::TaggedSigned())) {
- DeferReplacement(node, node->InputAt(0));
- }
- }
}
return;
}
@@ -1743,15 +1743,15 @@ class RepresentationSelector {
}
case IrOpcode::kStoreField: {
FieldAccess access = FieldAccessOf(node->op());
+ WriteBarrierKind write_barrier_kind = WriteBarrierKindFor(
+ access.base_is_tagged, access.machine_type.representation(),
+ access.offset, access.type, node->InputAt(1));
ProcessInput(node, 0, UseInfoForBasePointer(access));
ProcessInput(node, 1, TruncatingUseInfoFromRepresentation(
access.machine_type.representation()));
ProcessRemainingInputs(node, 2);
SetOutput(node, MachineRepresentation::kNone);
if (lower()) {
- WriteBarrierKind write_barrier_kind = WriteBarrierKindFor(
- access.base_is_tagged, access.machine_type.representation(),
- access.offset, access.type, node->InputAt(1));
if (write_barrier_kind < access.write_barrier_kind) {
access.write_barrier_kind = write_barrier_kind;
NodeProperties::ChangeOp(
@@ -1816,6 +1816,9 @@ class RepresentationSelector {
}
case IrOpcode::kStoreElement: {
ElementAccess access = ElementAccessOf(node->op());
+ WriteBarrierKind write_barrier_kind = WriteBarrierKindFor(
+ access.base_is_tagged, access.machine_type.representation(),
+ access.type, node->InputAt(2));
ProcessInput(node, 0, UseInfoForBasePointer(access)); // base
ProcessInput(node, 1, UseInfo::TruncatingWord32()); // index
ProcessInput(node, 2,
@@ -1824,9 +1827,6 @@ class RepresentationSelector {
ProcessRemainingInputs(node, 3);
SetOutput(node, MachineRepresentation::kNone);
if (lower()) {
- WriteBarrierKind write_barrier_kind = WriteBarrierKindFor(
- access.base_is_tagged, access.machine_type.representation(),
- access.type, node->InputAt(2));
if (write_barrier_kind < access.write_barrier_kind) {
access.write_barrier_kind = write_barrier_kind;
NodeProperties::ChangeOp(
« no previous file with comments | « src/compiler/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698