Fix typer to actually visit the entire graph.
authormstarzinger@chromium.org <mstarzinger@chromium.org>
Fri, 5 Sep 2014 15:01:51 +0000 (15:01 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org>
Fri, 5 Sep 2014 15:01:51 +0000 (15:01 +0000)
R=titzer@chromium.org
TEST=mjsunit

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/compiler/pipeline.cc
src/compiler/typer.cc

index f1d986a..6b5fdcf 100644 (file)
@@ -221,6 +221,7 @@ Handle<Code> Pipeline::GenerateCode() {
       // Type the graph.
       PhaseStats typer_stats(info(), PhaseStats::CREATE_GRAPH, "typer");
       typer.Run(&graph, info()->context());
+      VerifyAndPrintGraph(&graph, "Typed");
     }
     // All new nodes must be typed.
     typer.DecorateGraph(&graph);
index e898eb3..a23d37a 100644 (file)
@@ -117,14 +117,6 @@ class Typer::RunVisitor : public Typer::Visitor {
       : Visitor(typer, context),
         phis(NodeSet::key_compare(), NodeSet::allocator_type(typer->zone())) {}
 
-  GenericGraphVisit::Control Pre(Node* node) {
-    return NodeProperties::IsControl(node)
-        && node->opcode() != IrOpcode::kEnd
-        && node->opcode() != IrOpcode::kMerge
-        && node->opcode() != IrOpcode::kReturn
-        ? GenericGraphVisit::SKIP : GenericGraphVisit::CONTINUE;
-  }
-
   GenericGraphVisit::Control Post(Node* node) {
     Bounds bounds = TypeNode(node);
     if (node->opcode() == IrOpcode::kPhi) {