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

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

Issue 1491903002: [turbofan] Refactor escape analysis to only expose one class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ensure only EscapeAnalysis can create EscapeStatusAnalysis Created 5 years 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 AddReducer(data, &graph_reducer, &dead_code_elimination); 645 AddReducer(data, &graph_reducer, &dead_code_elimination);
646 graph_reducer.ReduceGraph(); 646 graph_reducer.ReduceGraph();
647 } 647 }
648 }; 648 };
649 649
650 650
651 struct EscapeAnalysisPhase { 651 struct EscapeAnalysisPhase {
652 static const char* phase_name() { return "escape analysis"; } 652 static const char* phase_name() { return "escape analysis"; }
653 653
654 void Run(PipelineData* data, Zone* temp_zone) { 654 void Run(PipelineData* data, Zone* temp_zone) {
655 EscapeObjectAnalysis escape_analysis(data->graph(), 655 EscapeAnalysis escape_analysis(data->graph(), data->jsgraph()->common(),
656 data->jsgraph()->common(), temp_zone); 656 temp_zone);
657 escape_analysis.Run(); 657 escape_analysis.Run();
658 EscapeStatusAnalysis escape_status(&escape_analysis, data->graph(),
659 temp_zone);
660 escape_status.Run();
661 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 658 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
662 EscapeAnalysisReducer escape_reducer(&graph_reducer, data->jsgraph(), 659 EscapeAnalysisReducer escape_reducer(&graph_reducer, data->jsgraph(),
663 &escape_status, &escape_analysis, 660 &escape_analysis, temp_zone);
664 temp_zone);
665 AddReducer(data, &graph_reducer, &escape_reducer); 661 AddReducer(data, &graph_reducer, &escape_reducer);
666 graph_reducer.ReduceGraph(); 662 graph_reducer.ReduceGraph();
667 } 663 }
668 }; 664 };
669 665
670 666
671 struct SimplifiedLoweringPhase { 667 struct SimplifiedLoweringPhase {
672 static const char* phase_name() { return "simplified lowering"; } 668 static const char* phase_name() { return "simplified lowering"; }
673 669
674 void Run(PipelineData* data, Zone* temp_zone) { 670 void Run(PipelineData* data, Zone* temp_zone) {
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 tcf << AsC1VRegisterAllocationData("CodeGen", 1474 tcf << AsC1VRegisterAllocationData("CodeGen",
1479 data->register_allocation_data()); 1475 data->register_allocation_data());
1480 } 1476 }
1481 1477
1482 data->DeleteRegisterAllocationZone(); 1478 data->DeleteRegisterAllocationZone();
1483 } 1479 }
1484 1480
1485 } // namespace compiler 1481 } // namespace compiler
1486 } // namespace internal 1482 } // namespace internal
1487 } // namespace v8 1483 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/escape-analysis-reducer.cc ('k') | test/unittests/compiler/escape-analysis-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698