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 <memory> | 8 #include <memory> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 Run<TypedLoweringPhase>(); | 1543 Run<TypedLoweringPhase>(); |
1544 RunPrintAndVerify("Lowered typed"); | 1544 RunPrintAndVerify("Lowered typed"); |
1545 | 1545 |
1546 if (data->info()->is_loop_peeling_enabled()) { | 1546 if (data->info()->is_loop_peeling_enabled()) { |
1547 Run<LoopPeelingPhase>(); | 1547 Run<LoopPeelingPhase>(); |
1548 RunPrintAndVerify("Loops peeled", true); | 1548 RunPrintAndVerify("Loops peeled", true); |
1549 } else { | 1549 } else { |
1550 Run<LoopExitEliminationPhase>(); | 1550 Run<LoopExitEliminationPhase>(); |
1551 RunPrintAndVerify("Loop exits eliminated", true); | 1551 RunPrintAndVerify("Loop exits eliminated", true); |
1552 } | 1552 } |
1553 | |
1554 if (!info()->shared_info()->asm_function()) { | |
1555 if (FLAG_turbo_load_elimination) { | |
1556 Run<LoadEliminationPhase>(); | |
1557 RunPrintAndVerify("Load eliminated"); | |
1558 } | |
1559 } | |
1560 } | 1553 } |
1561 | 1554 |
1562 // Do some hacky things to prepare for the optimization phase. | 1555 // Do some hacky things to prepare for the optimization phase. |
1563 // (caching handles, etc.). | 1556 // (caching handles, etc.). |
1564 Run<ConcurrentOptimizationPrepPhase>(); | 1557 Run<ConcurrentOptimizationPrepPhase>(); |
1565 | 1558 |
1566 data->EndPhaseKind(); | 1559 data->EndPhaseKind(); |
1567 | 1560 |
1568 return true; | 1561 return true; |
1569 } | 1562 } |
1570 | 1563 |
1571 bool PipelineImpl::OptimizeGraph(Linkage* linkage) { | 1564 bool PipelineImpl::OptimizeGraph(Linkage* linkage) { |
1572 PipelineData* data = this->data_; | 1565 PipelineData* data = this->data_; |
1573 | 1566 |
1574 if (!data->is_asm()) { | 1567 if (!data->is_asm()) { |
| 1568 if (FLAG_turbo_load_elimination) { |
| 1569 Run<LoadEliminationPhase>(); |
| 1570 RunPrintAndVerify("Load eliminated"); |
| 1571 } |
| 1572 |
1575 if (FLAG_turbo_escape) { | 1573 if (FLAG_turbo_escape) { |
1576 Run<EscapeAnalysisPhase>(); | 1574 Run<EscapeAnalysisPhase>(); |
1577 if (data->compilation_failed()) { | 1575 if (data->compilation_failed()) { |
1578 info()->AbortOptimization(kCyclicObjectStateDetectedInEscapeAnalysis); | 1576 info()->AbortOptimization(kCyclicObjectStateDetectedInEscapeAnalysis); |
1579 data->EndPhaseKind(); | 1577 data->EndPhaseKind(); |
1580 return false; | 1578 return false; |
1581 } | 1579 } |
1582 RunPrintAndVerify("Escape Analysed"); | 1580 RunPrintAndVerify("Escape Analysed"); |
1583 } | 1581 } |
1584 } | 1582 } |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2012 data->DeleteRegisterAllocationZone(); | 2010 data->DeleteRegisterAllocationZone(); |
2013 } | 2011 } |
2014 | 2012 |
2015 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 2013 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
2016 | 2014 |
2017 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 2015 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
2018 | 2016 |
2019 } // namespace compiler | 2017 } // namespace compiler |
2020 } // namespace internal | 2018 } // namespace internal |
2021 } // namespace v8 | 2019 } // namespace v8 |
OLD | NEW |