Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: src/compiler/pipeline.cc

Issue 2388303006: Reland of "[turbofan] Osr value typing + dynamic type checks on entry. (patchset #5 id:80001 of htt… (Closed)
Patch Set: Tweaks Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/osr.cc ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 215104e54f571e5099df055742beb92087d321d3..30be80c370d15547c81a449562683237f5438b8f 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -800,8 +800,8 @@ struct InliningPhase {
data->info()->is_function_context_specializing()
? handle(data->info()->context())
: MaybeHandle<Context>());
- JSFrameSpecialization frame_specialization(data->info()->osr_frame(),
- data->jsgraph());
+ JSFrameSpecialization frame_specialization(
+ &graph_reducer, data->info()->osr_frame(), data->jsgraph());
JSGlobalObjectSpecialization global_object_specialization(
&graph_reducer, data->jsgraph(), data->native_context(),
data->info()->dependencies());
@@ -860,7 +860,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"; }
@@ -877,6 +890,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);
@@ -884,12 +903,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);
}
@@ -1496,7 +1518,11 @@ bool PipelineImpl::CreateGraph() {
// Perform OSR deconstruction.
if (info()->is_osr()) {
+ Run<OsrTyperPhase>();
+
Run<OsrDeconstructionPhase>();
+
+ Run<UntyperPhase>();
RunPrintAndVerify("OSR deconstruction", true);
}
« no previous file with comments | « src/compiler/osr.cc ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698