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

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

Issue 545153002: [turbofan] Add MachineType to Phi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case. Created 6 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
« no previous file with comments | « src/compiler/graph-unittest.cc ('k') | src/compiler/instruction-selector-unittest.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 4b5552d9e7e9bf8212b7c4ce29ddc642359a8b1f..2e0b29c05b3add40f68e54362707b1456eb7b1f1 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -198,19 +198,6 @@ void InstructionSelector::MarkAsDouble(Node* node) {
DCHECK_NOT_NULL(node);
DCHECK(!IsReference(node));
sequence()->MarkAsDouble(node->id());
-
- // Propagate "doubleness" throughout Phi nodes.
- for (UseIter i = node->uses().begin(); i != node->uses().end(); ++i) {
- Node* user = *i;
- switch (user->opcode()) {
- case IrOpcode::kPhi:
- if (IsDouble(user)) continue;
- MarkAsDouble(user);
- break;
- default:
- break;
- }
- }
}
@@ -224,19 +211,6 @@ void InstructionSelector::MarkAsReference(Node* node) {
DCHECK_NOT_NULL(node);
DCHECK(!IsDouble(node));
sequence()->MarkAsReference(node->id());
-
- // Propagate "referenceness" throughout Phi nodes.
- for (UseIter i = node->uses().begin(); i != node->uses().end(); ++i) {
- Node* user = *i;
- switch (user->opcode()) {
- case IrOpcode::kPhi:
- if (IsReference(user)) continue;
- MarkAsReference(user);
- break;
- default:
- break;
- }
- }
}
@@ -491,8 +465,11 @@ void InstructionSelector::VisitNode(Node* node) {
MarkAsRepresentation(type, node);
return VisitParameter(node);
}
- case IrOpcode::kPhi:
+ case IrOpcode::kPhi: {
+ MachineType type = OpParameter<MachineType>(node);
+ MarkAsRepresentation(type, node);
return VisitPhi(node);
+ }
case IrOpcode::kProjection:
return VisitProjection(node);
case IrOpcode::kInt32Constant:
@@ -845,10 +822,10 @@ void InstructionSelector::VisitProjection(Node* node) {
switch (value->opcode()) {
case IrOpcode::kInt32AddWithOverflow:
case IrOpcode::kInt32SubWithOverflow:
- if (OpParameter<int32_t>(node) == 0) {
+ if (OpParameter<int>(node) == 0) {
Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
} else {
- DCHECK_EQ(1, OpParameter<int32_t>(node));
+ DCHECK_EQ(1, OpParameter<int>(node));
MarkAsUsed(value);
}
break;
@@ -956,7 +933,7 @@ void InstructionSelector::VisitBranch(Node* branch, BasicBlock* tbranch,
case IrOpcode::kProjection:
// Check if this is the overflow output projection of an
// <Operation>WithOverflow node.
- if (OpParameter<int32_t>(value) == 1) {
+ if (OpParameter<int>(value) == 1) {
// We cannot combine the <Operation>WithOverflow with this branch
// unless the 0th projection (the use of the actual value of the
// <Operation> is either NULL, which means there's no use of the
« no previous file with comments | « src/compiler/graph-unittest.cc ('k') | src/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698