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

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

Issue 2650273006: Make enabling of CSA verifier a build-time flag (Closed)
Patch Set: Fix tests 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 | « gypfiles/features.gypi ('k') | src/compiler/raw-machine-assembler.h » ('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 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 Graph* graph, Schedule* schedule, 1655 Graph* graph, Schedule* schedule,
1656 Code::Flags flags, 1656 Code::Flags flags,
1657 const char* debug_name) { 1657 const char* debug_name) {
1658 CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), flags); 1658 CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), flags);
1659 if (isolate->serializer_enabled()) info.PrepareForSerializing(); 1659 if (isolate->serializer_enabled()) info.PrepareForSerializing();
1660 1660
1661 // Construct a pipeline for scheduling and code generation. 1661 // Construct a pipeline for scheduling and code generation.
1662 ZoneStats zone_stats(isolate->allocator()); 1662 ZoneStats zone_stats(isolate->allocator());
1663 SourcePositionTable source_positions(graph); 1663 SourcePositionTable source_positions(graph);
1664 PipelineData data(&zone_stats, &info, graph, schedule, &source_positions); 1664 PipelineData data(&zone_stats, &info, graph, schedule, &source_positions);
1665 data.set_verify_graph(FLAG_csa_verify); 1665 data.set_verify_graph(FLAG_verify_csa);
1666 std::unique_ptr<PipelineStatistics> pipeline_statistics; 1666 std::unique_ptr<PipelineStatistics> pipeline_statistics;
1667 if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { 1667 if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) {
1668 pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats)); 1668 pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats));
1669 pipeline_statistics->BeginPhaseKind("stub codegen"); 1669 pipeline_statistics->BeginPhaseKind("stub codegen");
1670 } 1670 }
1671 1671
1672 PipelineImpl pipeline(&data); 1672 PipelineImpl pipeline(&data);
1673 DCHECK_NOT_NULL(data.schedule()); 1673 DCHECK_NOT_NULL(data.schedule());
1674 1674
1675 if (FLAG_trace_turbo) { 1675 if (FLAG_trace_turbo) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 if (FLAG_turbo_profiling) { 1790 if (FLAG_turbo_profiling) {
1791 data->set_profiler_data(BasicBlockInstrumentor::Instrument( 1791 data->set_profiler_data(BasicBlockInstrumentor::Instrument(
1792 info(), data->graph(), data->schedule())); 1792 info(), data->graph(), data->schedule()));
1793 } 1793 }
1794 1794
1795 bool verify_stub_graph = data->verify_graph(); 1795 bool verify_stub_graph = data->verify_graph();
1796 if (verify_stub_graph || 1796 if (verify_stub_graph ||
1797 (FLAG_turbo_verify_machine_graph != nullptr && 1797 (FLAG_turbo_verify_machine_graph != nullptr &&
1798 (!strcmp(FLAG_turbo_verify_machine_graph, "*") || 1798 (!strcmp(FLAG_turbo_verify_machine_graph, "*") ||
1799 !strcmp(FLAG_turbo_verify_machine_graph, data->debug_name())))) { 1799 !strcmp(FLAG_turbo_verify_machine_graph, data->debug_name())))) {
1800 if (FLAG_trace_csa_verify) { 1800 if (FLAG_trace_verify_csa) {
1801 AllowHandleDereference allow_deref; 1801 AllowHandleDereference allow_deref;
1802 CompilationInfo* info = data->info(); 1802 CompilationInfo* info = data->info();
1803 CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer()); 1803 CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer());
1804 OFStream os(tracing_scope.file()); 1804 OFStream os(tracing_scope.file());
1805 os << "--------------------------------------------------\n" 1805 os << "--------------------------------------------------\n"
1806 << "--- Verifying " << data->debug_name() << " generated by TurboFan\n" 1806 << "--- Verifying " << data->debug_name() << " generated by TurboFan\n"
1807 << "--------------------------------------------------\n" 1807 << "--------------------------------------------------\n"
1808 << *data->schedule() 1808 << *data->schedule()
1809 << "--------------------------------------------------\n" 1809 << "--------------------------------------------------\n"
1810 << "--- End of " << data->debug_name() << " generated by TurboFan\n" 1810 << "--- End of " << data->debug_name() << " generated by TurboFan\n"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 data->DeleteRegisterAllocationZone(); 2014 data->DeleteRegisterAllocationZone();
2015 } 2015 }
2016 2016
2017 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 2017 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
2018 2018
2019 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 2019 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
2020 2020
2021 } // namespace compiler 2021 } // namespace compiler
2022 } // namespace internal 2022 } // namespace internal
2023 } // namespace v8 2023 } // namespace v8
OLDNEW
« no previous file with comments | « gypfiles/features.gypi ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698