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

Unified Diff: src/compiler/node-properties.cc

Issue 1157023002: [turbofan] Change End to take a variable number of inputs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/node-properties.cc
diff --git a/src/compiler/node-properties.cc b/src/compiler/node-properties.cc
index 9e665d10e992087229cfca18bcb96bd9ace8bad8..0aeea93161e1aa814b56edb95dc6257bd023ba1a 100644
--- a/src/compiler/node-properties.cc
+++ b/src/compiler/node-properties.cc
@@ -163,16 +163,8 @@ void NodeProperties::RemoveNonValueInputs(Node* node) {
void NodeProperties::MergeControlToEnd(Graph* graph,
CommonOperatorBuilder* common,
Node* node) {
- // Connect the node to the merge exiting the graph.
- Node* end_pred = NodeProperties::GetControlInput(graph->end());
- if (end_pred->opcode() == IrOpcode::kMerge) {
- int inputs = end_pred->op()->ControlInputCount() + 1;
- end_pred->AppendInput(graph->zone(), node);
- end_pred->set_op(common->Merge(inputs));
- } else {
- Node* merge = graph->NewNode(common->Merge(2), end_pred, node);
- NodeProperties::ReplaceControlInput(graph->end(), merge);
- }
+ graph->end()->AppendInput(graph->zone(), node);
+ graph->end()->set_op(common->End(graph->end()->InputCount()));
}

Powered by Google App Engine
This is Rietveld 408576698