Index: src/compiler/graph.cc |
diff --git a/src/compiler/graph.cc b/src/compiler/graph.cc |
index 327fb5853c0690997ffabc6383441338dd01b4b2..00074b55135e9a620619836d791250d130f1e59a 100644 |
--- a/src/compiler/graph.cc |
+++ b/src/compiler/graph.cc |
@@ -51,6 +51,14 @@ Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs, |
} |
+Node* Graph::CloneNode(const Node* node) { |
+ DCHECK_NOT_NULL(node); |
+ Node* const clone = Node::Clone(zone(), NextNodeId(), node); |
+ Decorate(clone); |
+ return clone; |
+} |
+ |
+ |
NodeId Graph::NextNodeId() { |
NodeId const id = next_node_id_; |
CHECK(!base::bits::UnsignedAddOverflow32(id, 1, &next_node_id_)); |