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

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

Issue 2570213002: [stubs] Enable machine graph verification for CodeStubAssembler and friends by default in debug mode (Closed)
Patch Set: Created 4 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 <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 // Lower changes that have been inserted before. 1607 // Lower changes that have been inserted before.
1608 Run<LateOptimizationPhase>(); 1608 Run<LateOptimizationPhase>();
1609 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works. 1609 // TODO(jarin, rossberg): Remove UNTYPED once machine typing works.
1610 RunPrintAndVerify("Late optimized", true); 1610 RunPrintAndVerify("Late optimized", true);
1611 1611
1612 data->source_positions()->RemoveDecorator(); 1612 data->source_positions()->RemoveDecorator();
1613 1613
1614 return ScheduleAndSelectInstructions(linkage, true); 1614 return ScheduleAndSelectInstructions(linkage, true);
1615 } 1615 }
1616 1616
1617 // TODO(ishell): Remove verify_graph parameter and always enable the
1618 // verification once all the issues are fixed.
1619 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, 1617 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate,
1620 CallDescriptor* call_descriptor, 1618 CallDescriptor* call_descriptor,
1621 Graph* graph, Schedule* schedule, 1619 Graph* graph, Schedule* schedule,
1622 Code::Flags flags, 1620 Code::Flags flags,
1623 const char* debug_name, 1621 const char* debug_name) {
1624 bool verify_graph) {
1625 CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), flags); 1622 CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), flags);
1626 if (isolate->serializer_enabled()) info.PrepareForSerializing(); 1623 if (isolate->serializer_enabled()) info.PrepareForSerializing();
1627 1624
1628 // Construct a pipeline for scheduling and code generation. 1625 // Construct a pipeline for scheduling and code generation.
1629 ZoneStats zone_stats(isolate->allocator()); 1626 ZoneStats zone_stats(isolate->allocator());
1630 SourcePositionTable source_positions(graph); 1627 SourcePositionTable source_positions(graph);
1631 PipelineData data(&zone_stats, &info, graph, schedule, &source_positions); 1628 PipelineData data(&zone_stats, &info, graph, schedule, &source_positions);
1632 data.set_verify_graph(verify_graph); 1629 data.set_verify_graph(FLAG_csa_verify);
1633 std::unique_ptr<PipelineStatistics> pipeline_statistics; 1630 std::unique_ptr<PipelineStatistics> pipeline_statistics;
1634 if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { 1631 if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) {
1635 pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats)); 1632 pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats));
1636 pipeline_statistics->BeginPhaseKind("stub codegen"); 1633 pipeline_statistics->BeginPhaseKind("stub codegen");
1637 } 1634 }
1638 1635
1639 PipelineImpl pipeline(&data); 1636 PipelineImpl pipeline(&data);
1640 DCHECK_NOT_NULL(data.schedule()); 1637 DCHECK_NOT_NULL(data.schedule());
1641 1638
1642 if (FLAG_trace_turbo) { 1639 if (FLAG_trace_turbo) {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 data->DeleteRegisterAllocationZone(); 1979 data->DeleteRegisterAllocationZone();
1983 } 1980 }
1984 1981
1985 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 1982 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
1986 1983
1987 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 1984 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
1988 1985
1989 } // namespace compiler 1986 } // namespace compiler
1990 } // namespace internal 1987 } // namespace internal
1991 } // namespace v8 1988 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698