Commit e62f754d authored by titzer's avatar titzer Committed by Commit bot

[turbofan] Rename Node::RemoveAllInputs() to Node::NullAllInputs().

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1032553006

Cr-Commit-Position: refs/heads/master@{#27401}
parent 36d7aa68
...@@ -242,11 +242,11 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) { ...@@ -242,11 +242,11 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) {
DCHECK_NE(value, value1); DCHECK_NE(value, value1);
if (branch != node) { if (branch != node) {
branch->RemoveAllInputs(); branch->NullAllInputs();
if_true->ReplaceInput(0, node); if_true->ReplaceInput(0, node);
} }
if_true->set_op(common()->IfValue(value)); if_true->set_op(common()->IfValue(value));
if_false->RemoveAllInputs(); if_false->NullAllInputs();
Enqueue(if_true); Enqueue(if_true);
branch = branch1; branch = branch1;
...@@ -271,7 +271,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) { ...@@ -271,7 +271,7 @@ bool ControlFlowOptimizer::TryBuildSwitch(Node* node) {
if_false->set_op(common()->IfDefault()); if_false->set_op(common()->IfDefault());
if_false->ReplaceInput(0, node); if_false->ReplaceInput(0, node);
Enqueue(if_false); Enqueue(if_false);
branch->RemoveAllInputs(); branch->NullAllInputs();
return true; return true;
} }
......
...@@ -142,7 +142,7 @@ void Inlinee::UnifyReturn(JSGraph* jsgraph) { ...@@ -142,7 +142,7 @@ void Inlinee::UnifyReturn(JSGraph* jsgraph) {
values.push_back(NodeProperties::GetValueInput(input, 0)); values.push_back(NodeProperties::GetValueInput(input, 0));
effects.push_back(NodeProperties::GetEffectInput(input)); effects.push_back(NodeProperties::GetEffectInput(input));
edge.UpdateTo(NodeProperties::GetControlInput(input)); edge.UpdateTo(NodeProperties::GetControlInput(input));
input->RemoveAllInputs(); input->NullAllInputs();
break; break;
default: default:
UNREACHABLE(); UNREACHABLE();
......
...@@ -40,7 +40,7 @@ Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count, ...@@ -40,7 +40,7 @@ Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count,
void Node::Kill() { void Node::Kill() {
DCHECK_NOT_NULL(op()); DCHECK_NOT_NULL(op());
RemoveAllInputs(); NullAllInputs();
DCHECK(uses().empty()); DCHECK(uses().empty());
} }
...@@ -89,7 +89,7 @@ void Node::RemoveInput(int index) { ...@@ -89,7 +89,7 @@ void Node::RemoveInput(int index) {
} }
void Node::RemoveAllInputs() { void Node::NullAllInputs() {
for (Edge edge : input_edges()) edge.UpdateTo(nullptr); for (Edge edge : input_edges()) edge.UpdateTo(nullptr);
} }
......
...@@ -63,7 +63,7 @@ class Node FINAL { ...@@ -63,7 +63,7 @@ class Node FINAL {
void AppendInput(Zone* zone, Node* new_to); void AppendInput(Zone* zone, Node* new_to);
void InsertInput(Zone* zone, int index, Node* new_to); void InsertInput(Zone* zone, int index, Node* new_to);
void RemoveInput(int index); void RemoveInput(int index);
void RemoveAllInputs(); void NullAllInputs();
void TrimInputCount(int new_input_count); void TrimInputCount(int new_input_count);
int UseCount() const; int UseCount() const;
......
...@@ -1069,7 +1069,7 @@ class RepresentationSelector { ...@@ -1069,7 +1069,7 @@ class RepresentationSelector {
replacements_.push_back(node); replacements_.push_back(node);
replacements_.push_back(replacement); replacements_.push_back(replacement);
} }
node->RemoveAllInputs(); // Node is now dead. node->NullAllInputs(); // Node is now dead.
} }
void PrintUseInfo(Node* node) { void PrintUseInfo(Node* node) {
......
...@@ -668,7 +668,7 @@ TEST(TrimInputCountOutOfLine2) { ...@@ -668,7 +668,7 @@ TEST(TrimInputCountOutOfLine2) {
} }
TEST(RemoveAllInputs) { TEST(NullAllInputs) {
GraphTester graph; GraphTester graph;
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
...@@ -685,16 +685,16 @@ TEST(RemoveAllInputs) { ...@@ -685,16 +685,16 @@ TEST(RemoveAllInputs) {
CHECK_INPUTS(n2, n0, n1); CHECK_INPUTS(n2, n0, n1);
} }
n0->RemoveAllInputs(); n0->NullAllInputs();
CHECK_INPUTS(n0, NONE); CHECK_INPUTS(n0, NONE);
CHECK_USES(n0, n1, n2); CHECK_USES(n0, n1, n2);
n1->RemoveAllInputs(); n1->NullAllInputs();
CHECK_INPUTS(n1, NULL); CHECK_INPUTS(n1, NULL);
CHECK_INPUTS(n2, n0, n1); CHECK_INPUTS(n2, n0, n1);
CHECK_USES(n0, n2); CHECK_USES(n0, n2);
n2->RemoveAllInputs(); n2->NullAllInputs();
CHECK_INPUTS(n1, NULL); CHECK_INPUTS(n1, NULL);
CHECK_INPUTS(n2, NULL, NULL); CHECK_INPUTS(n2, NULL, NULL);
CHECK_USES(n0, NONE); CHECK_USES(n0, NONE);
...@@ -709,7 +709,7 @@ TEST(RemoveAllInputs) { ...@@ -709,7 +709,7 @@ TEST(RemoveAllInputs) {
CHECK_INPUTS(n1, n1); CHECK_INPUTS(n1, n1);
CHECK_USES(n0, NONE); CHECK_USES(n0, NONE);
CHECK_USES(n1, n1); CHECK_USES(n1, n1);
n1->RemoveAllInputs(); n1->NullAllInputs();
CHECK_INPUTS(n0, NONE); CHECK_INPUTS(n0, NONE);
CHECK_INPUTS(n1, NULL); CHECK_INPUTS(n1, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment