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

Unified Diff: src/compiler/node.cc

Issue 1196613003: [turbofan] Preserve Bounds when cloning nodes in the scheduler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/node.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node.cc
diff --git a/src/compiler/node.cc b/src/compiler/node.cc
index f38fb954416ceeaca6a8b475dde4fa754fd3877c..e92dccc739bfb3f6e1a3545f1a0069d717fd2447 100644
--- a/src/compiler/node.cc
+++ b/src/compiler/node.cc
@@ -50,7 +50,7 @@ void Node::OutOfLineInputs::ExtractFrom(Use* old_use_ptr, Node** old_input_ptr,
Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count,
- Node** inputs, bool has_extensible_inputs) {
+ Node* const* inputs, bool has_extensible_inputs) {
Node** input_ptr;
Use* use_ptr;
Node* node;
@@ -106,6 +106,17 @@ Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count,
}
+Node* Node::Clone(Zone* zone, NodeId id, const Node* node) {
+ int const input_count = node->InputCount();
+ Node* const* const inputs = node->has_inline_inputs()
+ ? node->inputs_.inline_
+ : node->inputs_.outline_->inputs_;
+ Node* const clone = New(zone, id, node->op(), input_count, inputs, false);
+ clone->set_bounds(node->bounds());
+ return clone;
+}
+
+
void Node::Kill() {
DCHECK_NOT_NULL(op());
NullAllInputs();
« no previous file with comments | « src/compiler/node.h ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698