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

Side by Side Diff: src/compiler/pipeline.cc

Issue 1215333005: [turbofan] Perform OSR deconstruction early and remove type propagation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 data.source_positions()->AddDecorator(); 1034 data.source_positions()->AddDecorator();
1035 1035
1036 if (FLAG_loop_assignment_analysis) { 1036 if (FLAG_loop_assignment_analysis) {
1037 Run<LoopAssignmentAnalysisPhase>(); 1037 Run<LoopAssignmentAnalysisPhase>();
1038 } 1038 }
1039 1039
1040 Run<GraphBuilderPhase>(info()->is_context_specializing()); 1040 Run<GraphBuilderPhase>(info()->is_context_specializing());
1041 if (data.compilation_failed()) return Handle<Code>::null(); 1041 if (data.compilation_failed()) return Handle<Code>::null();
1042 RunPrintAndVerify("Initial untyped", true); 1042 RunPrintAndVerify("Initial untyped", true);
1043 1043
1044 // Perform OSR deconstruction.
1045 if (info()->is_osr()) {
1046 Run<OsrDeconstructionPhase>();
1047 RunPrintAndVerify("OSR deconstruction", true);
1048 }
1049
1044 // Perform context specialization and inlining (if enabled). 1050 // Perform context specialization and inlining (if enabled).
1045 Run<InliningPhase>(); 1051 Run<InliningPhase>();
1046 RunPrintAndVerify("Inlined", true); 1052 RunPrintAndVerify("Inlined", true);
1047 1053
1048 // Remove dead->live edges from the graph. 1054 // Remove dead->live edges from the graph.
1049 Run<EarlyGraphTrimmingPhase>(); 1055 Run<EarlyGraphTrimmingPhase>();
1050 RunPrintAndVerify("Early trimmed", true); 1056 RunPrintAndVerify("Early trimmed", true);
1051 1057
1052 if (FLAG_print_turbo_replay) { 1058 if (FLAG_print_turbo_replay) {
1053 // Print a replay of the initial graph. 1059 // Print a replay of the initial graph.
(...skipping 16 matching lines...) Expand all
1070 if (info()->is_typing_enabled()) { 1076 if (info()->is_typing_enabled()) {
1071 // Lower JSOperators where we can determine types. 1077 // Lower JSOperators where we can determine types.
1072 Run<TypedLoweringPhase>(); 1078 Run<TypedLoweringPhase>();
1073 RunPrintAndVerify("Lowered typed"); 1079 RunPrintAndVerify("Lowered typed");
1074 1080
1075 if (FLAG_turbo_stress_loop_peeling) { 1081 if (FLAG_turbo_stress_loop_peeling) {
1076 Run<StressLoopPeelingPhase>(); 1082 Run<StressLoopPeelingPhase>();
1077 RunPrintAndVerify("Loop peeled"); 1083 RunPrintAndVerify("Loop peeled");
1078 } 1084 }
1079 1085
1080 if (info()->is_osr()) {
1081 Run<OsrDeconstructionPhase>();
1082 RunPrintAndVerify("OSR deconstruction");
1083 }
1084
1085 if (info()->is_type_feedback_enabled()) { 1086 if (info()->is_type_feedback_enabled()) {
1086 Run<JSTypeFeedbackPhase>(); 1087 Run<JSTypeFeedbackPhase>();
1087 RunPrintAndVerify("JSType feedback"); 1088 RunPrintAndVerify("JSType feedback");
1088 } 1089 }
1089 1090
1090 // Lower simplified operators and insert changes. 1091 // Lower simplified operators and insert changes.
1091 Run<SimplifiedLoweringPhase>(); 1092 Run<SimplifiedLoweringPhase>();
1092 RunPrintAndVerify("Lowered simplified"); 1093 RunPrintAndVerify("Lowered simplified");
1093 1094
1094 // Optimize control flow. 1095 // Optimize control flow.
1095 if (FLAG_turbo_cf_optimization) { 1096 if (FLAG_turbo_cf_optimization) {
1096 Run<ControlFlowOptimizationPhase>(); 1097 Run<ControlFlowOptimizationPhase>();
1097 RunPrintAndVerify("Control flow optimized"); 1098 RunPrintAndVerify("Control flow optimized");
1098 } 1099 }
1099 1100
1100 // Lower changes that have been inserted before. 1101 // Lower changes that have been inserted before.
1101 Run<ChangeLoweringPhase>(); 1102 Run<ChangeLoweringPhase>();
1102 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. 1103 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
1103 RunPrintAndVerify("Lowered changes", true); 1104 RunPrintAndVerify("Lowered changes", true);
1104 } else {
1105 if (info()->is_osr()) {
1106 Run<OsrDeconstructionPhase>();
1107 if (info()->bailout_reason() != kNoReason) return Handle<Code>::null();
1108 RunPrintAndVerify("OSR deconstruction", true);
1109 }
1110 } 1105 }
1111 1106
1112 // Lower any remaining generic JSOperators. 1107 // Lower any remaining generic JSOperators.
1113 Run<GenericLoweringPhase>(); 1108 Run<GenericLoweringPhase>();
1114 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. 1109 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
1115 RunPrintAndVerify("Lowered generic", true); 1110 RunPrintAndVerify("Lowered generic", true);
1116 1111
1117 Run<LateGraphTrimmingPhase>(); 1112 Run<LateGraphTrimmingPhase>();
1118 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. 1113 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
1119 RunPrintAndVerify("Late trimmed", true); 1114 RunPrintAndVerify("Late trimmed", true);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 tcf << AsC1VRegisterAllocationData("CodeGen", 1356 tcf << AsC1VRegisterAllocationData("CodeGen",
1362 data->register_allocation_data()); 1357 data->register_allocation_data());
1363 } 1358 }
1364 1359
1365 data->DeleteRegisterAllocationZone(); 1360 data->DeleteRegisterAllocationZone();
1366 } 1361 }
1367 1362
1368 } // namespace compiler 1363 } // namespace compiler
1369 } // namespace internal 1364 } // namespace internal
1370 } // namespace v8 1365 } // namespace v8
OLDNEW
« src/compiler/osr.cc ('K') | « src/compiler/osr.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698