[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}
This commit is contained in:
parent
36d7aa6817
commit
e62f754de7
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user