Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 3ea6c2ba812ef824b2ddadd4ee03040b062c3c94..f89484d08426b5a06f826b0adbec247e79e7ed03 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -1302,13 +1302,11 @@ bool Pipeline::CreateGraph() { |
} |
// Type the graph. |
- base::SmartPointer<Typer> typer; |
- typer.Reset(new Typer(isolate(), data->graph(), |
- info()->is_deoptimization_enabled() |
- ? Typer::kDeoptimizationEnabled |
- : Typer::kNoFlags, |
- info()->dependencies())); |
- Run<TyperPhase>(typer.get()); |
+ Typer typer(isolate(), data->graph(), info()->is_deoptimization_enabled() |
+ ? Typer::kDeoptimizationEnabled |
+ : Typer::kNoFlags, |
+ info()->dependencies()); |
+ Run<TyperPhase>(&typer); |
RunPrintAndVerify("Typed"); |
BeginPhaseKind("lowering"); |
@@ -1335,16 +1333,26 @@ bool Pipeline::CreateGraph() { |
Run<EarlyOptimizationPhase>(); |
RunPrintAndVerify("Early optimized"); |
+ EndPhaseKind(); |
+ |
+ return true; |
+} |
+ |
+bool Pipeline::OptimizeGraph(Linkage* linkage) { |
+ PipelineData* data = this->data_; |
+ |
+ BeginPhaseKind("block building"); |
+ |
Run<EffectControlLinearizationPhase>(); |
- RunPrintAndVerify("Effect and control linearized"); |
+ RunPrintAndVerify("Effect and control linearized", true); |
Run<BranchEliminationPhase>(); |
- RunPrintAndVerify("Branch conditions eliminated"); |
+ RunPrintAndVerify("Branch conditions eliminated", true); |
// Optimize control flow. |
if (FLAG_turbo_cf_optimization) { |
Run<ControlFlowOptimizationPhase>(); |
- RunPrintAndVerify("Control flow optimized"); |
+ RunPrintAndVerify("Control flow optimized", true); |
} |
// Lower changes that have been inserted before. |
@@ -1352,19 +1360,6 @@ bool Pipeline::CreateGraph() { |
// TODO(jarin, rossberg): Remove UNTYPED once machine typing works. |
RunPrintAndVerify("Late optimized", true); |
- // Kill the Typer and thereby uninstall the decorator (if any). |
- typer.Reset(nullptr); |
- |
- EndPhaseKind(); |
- |
- return true; |
-} |
- |
-bool Pipeline::OptimizeGraph(Linkage* linkage) { |
- PipelineData* data = this->data_; |
- |
- BeginPhaseKind("block building"); |
- |
Run<LateGraphTrimmingPhase>(); |
// TODO(jarin, rossberg): Remove UNTYPED once machine typing works. |
RunPrintAndVerify("Late trimmed", true); |