OLD | NEW |
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 if (!FLAG_always_opt) { | 495 if (!FLAG_always_opt) { |
496 info()->MarkAsBailoutOnUninitialized(); | 496 info()->MarkAsBailoutOnUninitialized(); |
497 } | 497 } |
498 if (FLAG_native_context_specialization) { | 498 if (FLAG_native_context_specialization) { |
499 info()->MarkAsNativeContextSpecializing(); | 499 info()->MarkAsNativeContextSpecializing(); |
500 } | 500 } |
501 } | 501 } |
502 if (!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) { | 502 if (!info()->shared_info()->asm_function() || FLAG_turbo_asm_deoptimization) { |
503 info()->MarkAsDeoptimizationEnabled(); | 503 info()->MarkAsDeoptimizationEnabled(); |
504 } | 504 } |
505 if (!info()->shared_info()->asm_function()) { | |
506 info()->MarkAsEffectSchedulingEnabled(); | |
507 } | |
508 | |
509 if (!info()->shared_info()->HasBytecodeArray()) { | 505 if (!info()->shared_info()->HasBytecodeArray()) { |
510 if (!Compiler::EnsureDeoptimizationSupport(info())) return FAILED; | 506 if (!Compiler::EnsureDeoptimizationSupport(info())) return FAILED; |
511 } | 507 } |
512 | 508 |
513 Pipeline pipeline(info()); | 509 Pipeline pipeline(info()); |
514 pipeline.GenerateCode(); | 510 pipeline.GenerateCode(); |
515 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed. | 511 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed. |
516 if (info()->code().is_null()) return AbortOptimization(kGraphBuildingFailed); | 512 if (info()->code().is_null()) return AbortOptimization(kGraphBuildingFailed); |
517 | 513 |
518 return SUCCEEDED; | 514 return SUCCEEDED; |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 } | 1272 } |
1277 | 1273 |
1278 // Select representations. | 1274 // Select representations. |
1279 Run<RepresentationSelectionPhase>(); | 1275 Run<RepresentationSelectionPhase>(); |
1280 RunPrintAndVerify("Representations selected"); | 1276 RunPrintAndVerify("Representations selected"); |
1281 | 1277 |
1282 // Run early optimization pass. | 1278 // Run early optimization pass. |
1283 Run<EarlyOptimizationPhase>(); | 1279 Run<EarlyOptimizationPhase>(); |
1284 RunPrintAndVerify("Early optimized"); | 1280 RunPrintAndVerify("Early optimized"); |
1285 | 1281 |
1286 if (info()->is_effect_scheduling_enabled()) { | 1282 Run<EffectControlLinearizationPhase>(); |
1287 Run<EffectControlLinearizationPhase>(); | 1283 RunPrintAndVerify("Effect and control linearized"); |
1288 RunPrintAndVerify("Effect and control linearized"); | |
1289 } | |
1290 | 1284 |
1291 Run<BranchEliminationPhase>(); | 1285 Run<BranchEliminationPhase>(); |
1292 RunPrintAndVerify("Branch conditions eliminated"); | 1286 RunPrintAndVerify("Branch conditions eliminated"); |
1293 | 1287 |
1294 // Optimize control flow. | 1288 // Optimize control flow. |
1295 if (FLAG_turbo_cf_optimization) { | 1289 if (FLAG_turbo_cf_optimization) { |
1296 Run<ControlFlowOptimizationPhase>(); | 1290 Run<ControlFlowOptimizationPhase>(); |
1297 RunPrintAndVerify("Control flow optimized"); | 1291 RunPrintAndVerify("Control flow optimized"); |
1298 } | 1292 } |
1299 | 1293 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 } | 1591 } |
1598 | 1592 |
1599 data->DeleteRegisterAllocationZone(); | 1593 data->DeleteRegisterAllocationZone(); |
1600 } | 1594 } |
1601 | 1595 |
1602 Isolate* Pipeline::isolate() const { return info()->isolate(); } | 1596 Isolate* Pipeline::isolate() const { return info()->isolate(); } |
1603 | 1597 |
1604 } // namespace compiler | 1598 } // namespace compiler |
1605 } // namespace internal | 1599 } // namespace internal |
1606 } // namespace v8 | 1600 } // namespace v8 |
OLD | NEW |