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

Unified Diff: src/compiler/instruction-selector.cc

Issue 2428443002: [wasm] Trim graph before scheduling. (Closed)
Patch Set: Use proper temp registers if Projection(1) does not exist. Created 4 years, 2 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/instruction-selector.h ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index b6e011835640672058a5454c11551253b800aeba..7fd67e6d1c4610ed66e32063428b1a881af3f8b2 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -933,6 +933,16 @@ void InstructionSelector::VisitControl(BasicBlock* block) {
}
}
+void InstructionSelector::MarkPairProjectionsAsWord32(Node* node) {
+ Node* projection0 = NodeProperties::FindProjection(node, 0);
+ if (projection0) {
+ MarkAsWord32(projection0);
+ }
+ Node* projection1 = NodeProperties::FindProjection(node, 1);
+ if (projection1) {
+ MarkAsWord32(projection1);
+ }
+}
void InstructionSelector::VisitNode(Node* node) {
DCHECK_NOT_NULL(schedule()->block(node)); // should only use scheduled nodes.
@@ -1340,28 +1350,28 @@ void InstructionSelector::VisitNode(Node* node) {
case IrOpcode::kCheckedStore:
return VisitCheckedStore(node);
case IrOpcode::kInt32PairAdd:
- MarkAsWord32(NodeProperties::FindProjection(node, 0));
- MarkAsWord32(NodeProperties::FindProjection(node, 1));
+ MarkAsWord32(node);
+ MarkPairProjectionsAsWord32(node);
return VisitInt32PairAdd(node);
case IrOpcode::kInt32PairSub:
- MarkAsWord32(NodeProperties::FindProjection(node, 0));
- MarkAsWord32(NodeProperties::FindProjection(node, 1));
+ MarkAsWord32(node);
+ MarkPairProjectionsAsWord32(node);
return VisitInt32PairSub(node);
case IrOpcode::kInt32PairMul:
- MarkAsWord32(NodeProperties::FindProjection(node, 0));
- MarkAsWord32(NodeProperties::FindProjection(node, 1));
+ MarkAsWord32(node);
+ MarkPairProjectionsAsWord32(node);
return VisitInt32PairMul(node);
case IrOpcode::kWord32PairShl:
- MarkAsWord32(NodeProperties::FindProjection(node, 0));
- MarkAsWord32(NodeProperties::FindProjection(node, 1));
+ MarkAsWord32(node);
+ MarkPairProjectionsAsWord32(node);
return VisitWord32PairShl(node);
case IrOpcode::kWord32PairShr:
- MarkAsWord32(NodeProperties::FindProjection(node, 0));
- MarkAsWord32(NodeProperties::FindProjection(node, 1));
+ MarkAsWord32(node);
+ MarkPairProjectionsAsWord32(node);
return VisitWord32PairShr(node);
case IrOpcode::kWord32PairSar:
- MarkAsWord32(NodeProperties::FindProjection(node, 0));
- MarkAsWord32(NodeProperties::FindProjection(node, 1));
+ MarkAsWord32(node);
+ MarkPairProjectionsAsWord32(node);
return VisitWord32PairSar(node);
case IrOpcode::kAtomicLoad: {
LoadRepresentation type = LoadRepresentationOf(node->op());
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698