| Index: src/compiler/pipeline.cc
|
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
|
| index 0041da25bf31e00b18b135849e1ddf97c1f2390d..049910dee9691593bc5d2261ef211997f5d6a30f 100644
|
| --- a/src/compiler/pipeline.cc
|
| +++ b/src/compiler/pipeline.cc
|
| @@ -859,7 +859,20 @@ struct TyperPhase {
|
| }
|
| };
|
|
|
| -#ifdef DEBUG
|
| +struct OsrTyperPhase {
|
| + static const char* phase_name() { return "osr typer"; }
|
| +
|
| + void Run(PipelineData* data, Zone* temp_zone) {
|
| + NodeVector roots(temp_zone);
|
| + data->jsgraph()->GetCachedNodes(&roots);
|
| + // Dummy induction variable optimizer: at the moment, we do not try
|
| + // to compute loop variable bounds on OSR.
|
| + LoopVariableOptimizer induction_vars(data->jsgraph()->graph(),
|
| + data->common(), temp_zone);
|
| + Typer typer(data->isolate(), data->graph());
|
| + typer.Run(roots, &induction_vars);
|
| + }
|
| +};
|
|
|
| struct UntyperPhase {
|
| static const char* phase_name() { return "untyper"; }
|
| @@ -876,6 +889,12 @@ struct UntyperPhase {
|
| }
|
| };
|
|
|
| + NodeVector roots(temp_zone);
|
| + data->jsgraph()->GetCachedNodes(&roots);
|
| + for (Node* node : roots) {
|
| + NodeProperties::RemoveType(node);
|
| + }
|
| +
|
| JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
|
| RemoveTypeReducer remove_type_reducer;
|
| AddReducer(data, &graph_reducer, &remove_type_reducer);
|
| @@ -883,12 +902,15 @@ struct UntyperPhase {
|
| }
|
| };
|
|
|
| -#endif // DEBUG
|
| -
|
| struct OsrDeconstructionPhase {
|
| static const char* phase_name() { return "OSR deconstruction"; }
|
|
|
| void Run(PipelineData* data, Zone* temp_zone) {
|
| + GraphTrimmer trimmer(temp_zone, data->graph());
|
| + NodeVector roots(temp_zone);
|
| + data->jsgraph()->GetCachedNodes(&roots);
|
| + trimmer.TrimGraph(roots.begin(), roots.end());
|
| +
|
| OsrHelper osr_helper(data->info());
|
| osr_helper.Deconstruct(data->jsgraph(), data->common(), temp_zone);
|
| }
|
| @@ -1493,7 +1515,11 @@ bool PipelineImpl::CreateGraph() {
|
|
|
| // Perform OSR deconstruction.
|
| if (info()->is_osr()) {
|
| + Run<OsrTyperPhase>();
|
| +
|
| Run<OsrDeconstructionPhase>();
|
| +
|
| + Run<UntyperPhase>();
|
| RunPrintAndVerify("OSR deconstruction", true);
|
| }
|
|
|
|
|