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

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

Issue 2613463002: [Turbofan] Run loop peeling concurrently. (Closed)
Patch Set: Moved to be concurrent. Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 // leave this scope below. 1535 // leave this scope below.
1536 Typer typer(isolate(), flags, data->graph()); 1536 Typer typer(isolate(), flags, data->graph());
1537 Run<TyperPhase>(&typer); 1537 Run<TyperPhase>(&typer);
1538 RunPrintAndVerify("Typed"); 1538 RunPrintAndVerify("Typed");
1539 1539
1540 data->BeginPhaseKind("lowering"); 1540 data->BeginPhaseKind("lowering");
1541 1541
1542 // Lower JSOperators where we can determine types. 1542 // Lower JSOperators where we can determine types.
1543 Run<TypedLoweringPhase>(); 1543 Run<TypedLoweringPhase>();
1544 RunPrintAndVerify("Lowered typed"); 1544 RunPrintAndVerify("Lowered typed");
1545
1546 if (data->info()->is_loop_peeling_enabled()) {
1547 Run<LoopPeelingPhase>();
1548 RunPrintAndVerify("Loops peeled", true);
1549 } else {
1550 Run<LoopExitEliminationPhase>();
1551 RunPrintAndVerify("Loop exits eliminated", true);
1552 }
1553 } 1545 }
1554 1546
1555 // Do some hacky things to prepare for the optimization phase. 1547 // Do some hacky things to prepare for the optimization phase.
1556 // (caching handles, etc.). 1548 // (caching handles, etc.).
1557 Run<ConcurrentOptimizationPrepPhase>(); 1549 Run<ConcurrentOptimizationPrepPhase>();
1558 1550
1559 data->EndPhaseKind(); 1551 data->EndPhaseKind();
1560 1552
1561 return true; 1553 return true;
1562 } 1554 }
1563 1555
1564 bool PipelineImpl::OptimizeGraph(Linkage* linkage) { 1556 bool PipelineImpl::OptimizeGraph(Linkage* linkage) {
1565 PipelineData* data = this->data_; 1557 PipelineData* data = this->data_;
1566 1558
1559 if (data->info()->is_loop_peeling_enabled()) {
1560 Run<LoopPeelingPhase>();
1561 RunPrintAndVerify("Loops peeled", true);
1562 } else {
1563 Run<LoopExitEliminationPhase>();
1564 RunPrintAndVerify("Loop exits eliminated", true);
1565 }
1566
1567 if (!data->is_asm()) { 1567 if (!data->is_asm()) {
1568 if (FLAG_turbo_load_elimination) { 1568 if (FLAG_turbo_load_elimination) {
1569 Run<LoadEliminationPhase>(); 1569 Run<LoadEliminationPhase>();
1570 RunPrintAndVerify("Load eliminated"); 1570 RunPrintAndVerify("Load eliminated");
1571 } 1571 }
1572 1572
1573 if (FLAG_turbo_escape) { 1573 if (FLAG_turbo_escape) {
1574 Run<EscapeAnalysisPhase>(); 1574 Run<EscapeAnalysisPhase>();
1575 if (data->compilation_failed()) { 1575 if (data->compilation_failed()) {
1576 info()->AbortOptimization(kCyclicObjectStateDetectedInEscapeAnalysis); 1576 info()->AbortOptimization(kCyclicObjectStateDetectedInEscapeAnalysis);
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 data->DeleteRegisterAllocationZone(); 2010 data->DeleteRegisterAllocationZone();
2011 } 2011 }
2012 2012
2013 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 2013 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
2014 2014
2015 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 2015 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
2016 2016
2017 } // namespace compiler 2017 } // namespace compiler
2018 } // namespace internal 2018 } // namespace internal
2019 } // namespace v8 2019 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698