Reviewers: Michael Starzinger,
Description:
[turbofan] Rename Node::RemoveAllInputs() to Node::NullAllInputs().
[email protected]
BUG=
Please review this at https://codereview.chromium.org/1032553006/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+13, -13 lines):
M src/compiler/control-flow-optimizer.cc
M src/compiler/js-inlining.cc
M src/compiler/node.h
M src/compiler/node.cc
M src/compiler/simplified-lowering.cc
M test/cctest/compiler/test-node.cc
Index: src/compiler/control-flow-optimizer.cc
diff --git a/src/compiler/control-flow-optimizer.cc
b/src/compiler/control-flow-optimizer.cc
index
b3a1a8bf58e403b76671d42571a79f35c23d50fb..f074f72602af2b1995013c25bbff7c0073c11e64
100644
--- a/src/compiler/control-flow-optimizer.cc
+++ b/src/compiler/control-flow-optimizer.cc
@@ -242,11 +242,11 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node)
{
DCHECK_NE(value, value1);
if (branch != node) {
- branch->RemoveAllInputs();
+ branch->NullAllInputs();
if_true->ReplaceInput(0, node);
}
if_true->set_op(common()->IfValue(value));
- if_false->RemoveAllInputs();
+ if_false->NullAllInputs();
Enqueue(if_true);
branch = branch1;
@@ -271,7 +271,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) {
if_false->set_op(common()->IfDefault());
if_false->ReplaceInput(0, node);
Enqueue(if_false);
- branch->RemoveAllInputs();
+ branch->NullAllInputs();
return true;
}
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index
5f67eb7bfe7bf3aa750e07ef241697465ac1f3a6..8d973c6ef01436330e839392f72e209c99886f4e
100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -142,7 +142,7 @@ void Inlinee::UnifyReturn(JSGraph* jsgraph) {
values.push_back(NodeProperties::GetValueInput(input, 0));
effects.push_back(NodeProperties::GetEffectInput(input));
edge.UpdateTo(NodeProperties::GetControlInput(input));
- input->RemoveAllInputs();
+ input->NullAllInputs();
break;
default:
UNREACHABLE();
Index: src/compiler/node.cc
diff --git a/src/compiler/node.cc b/src/compiler/node.cc
index
68eb73abd4c52bc9313a3a39cb5365466514dcab..1a9c326f20be0f37fd5aa36ba049f5bf8133cc51
100644
--- a/src/compiler/node.cc
+++ b/src/compiler/node.cc
@@ -40,7 +40,7 @@ Node* Node::New(Zone* zone, NodeId id, const Operator*
op, int input_count,
void Node::Kill() {
DCHECK_NOT_NULL(op());
- RemoveAllInputs();
+ NullAllInputs();
DCHECK(uses().empty());
}
@@ -89,7 +89,7 @@ void Node::RemoveInput(int index) {
}
-void Node::RemoveAllInputs() {
+void Node::NullAllInputs() {
for (Edge edge : input_edges()) edge.UpdateTo(nullptr);
}
Index: src/compiler/node.h
diff --git a/src/compiler/node.h b/src/compiler/node.h
index
07cf9487b27c4d0502e8b7cba89c86d4a064474b..e4bd0d0bdc5b7fedbd239f64b9cc8c865eb4f624
100644
--- a/src/compiler/node.h
+++ b/src/compiler/node.h
@@ -63,7 +63,7 @@ class Node FINAL {
void AppendInput(Zone* zone, Node* new_to);
void InsertInput(Zone* zone, int index, Node* new_to);
void RemoveInput(int index);
- void RemoveAllInputs();
+ void NullAllInputs();
void TrimInputCount(int new_input_count);
int UseCount() const;
Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc
b/src/compiler/simplified-lowering.cc
index
939cd38d1461bd1ea0f8835891ea755d8658cb76..00ebd13fcf26deefa6de0ced34a6ca3f5fc429d7
100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1069,7 +1069,7 @@ class RepresentationSelector {
replacements_.push_back(node);
replacements_.push_back(replacement);
}
- node->RemoveAllInputs(); // Node is now dead.
+ node->NullAllInputs(); // Node is now dead.
}
void PrintUseInfo(Node* node) {
Index: test/cctest/compiler/test-node.cc
diff --git a/test/cctest/compiler/test-node.cc
b/test/cctest/compiler/test-node.cc
index
0aa1f1c54215fd070cfe9c560753c2c16853e8bc..5bb21f585d62301c221f53dc5718ec674d135ecd
100644
--- a/test/cctest/compiler/test-node.cc
+++ b/test/cctest/compiler/test-node.cc
@@ -668,7 +668,7 @@ TEST(TrimInputCountOutOfLine2) {
}
-TEST(RemoveAllInputs) {
+TEST(NullAllInputs) {
GraphTester graph;
for (int i = 0; i < 2; i++) {
@@ -685,16 +685,16 @@ TEST(RemoveAllInputs) {
CHECK_INPUTS(n2, n0, n1);
}
- n0->RemoveAllInputs();
+ n0->NullAllInputs();
CHECK_INPUTS(n0, NONE);
CHECK_USES(n0, n1, n2);
- n1->RemoveAllInputs();
+ n1->NullAllInputs();
CHECK_INPUTS(n1, NULL);
CHECK_INPUTS(n2, n0, n1);
CHECK_USES(n0, n2);
- n2->RemoveAllInputs();
+ n2->NullAllInputs();
CHECK_INPUTS(n1, NULL);
CHECK_INPUTS(n2, NULL, NULL);
CHECK_USES(n0, NONE);
@@ -709,7 +709,7 @@ TEST(RemoveAllInputs) {
CHECK_INPUTS(n1, n1);
CHECK_USES(n0, NONE);
CHECK_USES(n1, n1);
- n1->RemoveAllInputs();
+ n1->NullAllInputs();
CHECK_INPUTS(n0, NONE);
CHECK_INPUTS(n1, NULL);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.