Reviewers: jarin,

Description:
[turbofan] Properly unlink dead nodes in simplified lowering.

[email protected]

Please review this at https://codereview.chromium.org/964843002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+3, -3 lines):
  M src/compiler/simplified-lowering.cc
  M test/cctest/compiler/test-simplified-lowering.cc


Index: src/compiler/simplified-lowering.cc
diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc index 65e070696be3f863666e5fe0bd1363c4fa332367..b3050719883c0467bf97f8d0610e494a3142c014 100644
--- a/src/compiler/simplified-lowering.cc
+++ b/src/compiler/simplified-lowering.cc
@@ -1056,7 +1056,7 @@ class RepresentationSelector {
       replacements_.push_back(node);
       replacements_.push_back(replacement);
     }
-    // TODO(titzer) node->RemoveAllInputs();  // Node is now dead.
+    node->RemoveAllInputs();  // Node is now dead.
   }

   void PrintUseInfo(Node* node) {
Index: test/cctest/compiler/test-simplified-lowering.cc
diff --git a/test/cctest/compiler/test-simplified-lowering.cc b/test/cctest/compiler/test-simplified-lowering.cc index 6e2480e51e2813f6f362b84df0ff8ffb415349fb..a72f8bb2bbd1f05495a2190352bf7f88a7334963 100644
--- a/test/cctest/compiler/test-simplified-lowering.cc
+++ b/test/cctest/compiler/test-simplified-lowering.cc
@@ -1938,10 +1938,10 @@ TEST(NumberModulus_TruncatingToUint32) {
     Node* k = t.jsgraph.Constant(constants[i]);
Node* mod = t.graph()->NewNode(t.simplified()->NumberModulus(), t.p0, k); Node* trunc = t.graph()->NewNode(t.simplified()->NumberToUint32(), mod);
-    Node* ret = t.Return(trunc);
+    t.Return(trunc);
     t.Lower();

-    CHECK_EQ(IrOpcode::kUint32Mod, ret->InputAt(0)->opcode());
+ CHECK_EQ(IrOpcode::kUint32Mod, t.ret->InputAt(0)->InputAt(0)->opcode());
   }
 }



--
--
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.

Reply via email to