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

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

Issue 2218703003: [turbofan] Add support for copy-on-write element stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix off-by-one loop iteration count. Created 4 years, 4 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 | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.cc » ('j') | 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 if (!info()->is_optimizing_from_bytecode()) { 608 if (!info()->is_optimizing_from_bytecode()) {
609 if (FLAG_inline_accessors) { 609 if (FLAG_inline_accessors) {
610 info()->MarkAsAccessorInliningEnabled(); 610 info()->MarkAsAccessorInliningEnabled();
611 } 611 }
612 if (info()->is_deoptimization_enabled() && FLAG_turbo_type_feedback) { 612 if (info()->is_deoptimization_enabled() && FLAG_turbo_type_feedback) {
613 info()->MarkAsTypeFeedbackEnabled(); 613 info()->MarkAsTypeFeedbackEnabled();
614 } 614 }
615 if (!Compiler::EnsureDeoptimizationSupport(info())) return FAILED; 615 if (!Compiler::EnsureDeoptimizationSupport(info())) return FAILED;
616 } 616 }
617 617
618 // TODO(mstarzinger): Hack to ensure that the ToNumber call descriptor is 618 // TODO(mstarzinger): Hack to ensure that certain call descriptors are
619 // initialized on the main thread, since it is needed off-thread by the 619 // initialized on the main thread, since it is needed off-thread by the
620 // effect control linearizer. 620 // effect control linearizer.
621 CodeFactory::CopyFixedArray(info()->isolate());
621 CodeFactory::ToNumber(info()->isolate()); 622 CodeFactory::ToNumber(info()->isolate());
622 623
623 linkage_ = new (&zone_) Linkage(Linkage::ComputeIncoming(&zone_, info())); 624 linkage_ = new (&zone_) Linkage(Linkage::ComputeIncoming(&zone_, info()));
624 625
625 if (!pipeline_.CreateGraph()) { 626 if (!pipeline_.CreateGraph()) {
626 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed. 627 if (isolate()->has_pending_exception()) return FAILED; // Stack overflowed.
627 return AbortOptimization(kGraphBuildingFailed); 628 return AbortOptimization(kGraphBuildingFailed);
628 } 629 }
629 630
630 return SUCCEEDED; 631 return SUCCEEDED;
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 struct LoadEliminationPhase { 1068 struct LoadEliminationPhase {
1068 static const char* phase_name() { return "load elimination"; } 1069 static const char* phase_name() { return "load elimination"; }
1069 1070
1070 void Run(PipelineData* data, Zone* temp_zone) { 1071 void Run(PipelineData* data, Zone* temp_zone) {
1071 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 1072 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
1072 BranchElimination branch_condition_elimination(&graph_reducer, 1073 BranchElimination branch_condition_elimination(&graph_reducer,
1073 data->jsgraph(), temp_zone); 1074 data->jsgraph(), temp_zone);
1074 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 1075 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
1075 data->common()); 1076 data->common());
1076 RedundancyElimination redundancy_elimination(&graph_reducer, temp_zone); 1077 RedundancyElimination redundancy_elimination(&graph_reducer, temp_zone);
1077 LoadElimination load_elimination(&graph_reducer, temp_zone); 1078 LoadElimination load_elimination(&graph_reducer, data->jsgraph(),
1079 temp_zone);
1078 ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone()); 1080 ValueNumberingReducer value_numbering(temp_zone, data->graph()->zone());
1079 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 1081 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
1080 data->common(), data->machine()); 1082 data->common(), data->machine());
1081 AddReducer(data, &graph_reducer, &branch_condition_elimination); 1083 AddReducer(data, &graph_reducer, &branch_condition_elimination);
1082 AddReducer(data, &graph_reducer, &dead_code_elimination); 1084 AddReducer(data, &graph_reducer, &dead_code_elimination);
1083 AddReducer(data, &graph_reducer, &redundancy_elimination); 1085 AddReducer(data, &graph_reducer, &redundancy_elimination);
1084 AddReducer(data, &graph_reducer, &load_elimination); 1086 AddReducer(data, &graph_reducer, &load_elimination);
1085 AddReducer(data, &graph_reducer, &value_numbering); 1087 AddReducer(data, &graph_reducer, &value_numbering);
1086 AddReducer(data, &graph_reducer, &common_reducer); 1088 AddReducer(data, &graph_reducer, &common_reducer);
1087 graph_reducer.ReduceGraph(); 1089 graph_reducer.ReduceGraph();
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 data->DeleteRegisterAllocationZone(); 1895 data->DeleteRegisterAllocationZone();
1894 } 1896 }
1895 1897
1896 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 1898 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
1897 1899
1898 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 1900 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
1899 1901
1900 } // namespace compiler 1902 } // namespace compiler
1901 } // namespace internal 1903 } // namespace internal
1902 } // namespace v8 1904 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698