OLD | NEW |
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 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1770 | 1770 |
1771 // TODO(ishell): Always enable graph verification of stubs in debug mode | 1771 // TODO(ishell): Always enable graph verification of stubs in debug mode |
1772 // once all the issues are fixed. | 1772 // once all the issues are fixed. |
1773 bool verify_stub_graph = | 1773 bool verify_stub_graph = |
1774 DEBUG_BOOL && FLAG_csa_verify && data->info()->IsStub(); | 1774 DEBUG_BOOL && FLAG_csa_verify && data->info()->IsStub(); |
1775 | 1775 |
1776 if (verify_stub_graph || (FLAG_turbo_verify_machine_graph != nullptr && | 1776 if (verify_stub_graph || (FLAG_turbo_verify_machine_graph != nullptr && |
1777 (!strcmp(FLAG_turbo_verify_machine_graph, "*") || | 1777 (!strcmp(FLAG_turbo_verify_machine_graph, "*") || |
1778 !strcmp(FLAG_turbo_verify_machine_graph, | 1778 !strcmp(FLAG_turbo_verify_machine_graph, |
1779 data->info()->GetDebugName().get())))) { | 1779 data->info()->GetDebugName().get())))) { |
| 1780 if (FLAG_trace_csa_verify) { |
| 1781 AllowHandleDereference allow_deref; |
| 1782 CompilationInfo* info = data->info(); |
| 1783 CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer()); |
| 1784 OFStream os(tracing_scope.file()); |
| 1785 os << "--------------------------------------------------\n" |
| 1786 << "--- Verifying " << info->GetDebugName().get() |
| 1787 << " generated by TurboFan\n" |
| 1788 << "--------------------------------------------------\n" |
| 1789 << *data->schedule() |
| 1790 << "--------------------------------------------------\n" |
| 1791 << "--- End of " << info->GetDebugName().get() |
| 1792 << " generated by TurboFan\n" |
| 1793 << "--------------------------------------------------\n"; |
| 1794 } |
1780 Zone temp_zone(data->isolate()->allocator(), ZONE_NAME); | 1795 Zone temp_zone(data->isolate()->allocator(), ZONE_NAME); |
1781 MachineGraphVerifier::Run(data->graph(), data->schedule(), linkage, | 1796 MachineGraphVerifier::Run(data->graph(), data->schedule(), linkage, |
1782 data->info()->IsStub(), &temp_zone); | 1797 data->info()->IsStub(), &temp_zone); |
1783 } | 1798 } |
1784 | 1799 |
1785 data->InitializeInstructionSequence(call_descriptor); | 1800 data->InitializeInstructionSequence(call_descriptor); |
1786 | 1801 |
1787 data->InitializeFrameData(call_descriptor); | 1802 data->InitializeFrameData(call_descriptor); |
1788 // Select and schedule instructions covering the scheduled graph. | 1803 // Select and schedule instructions covering the scheduled graph. |
1789 Run<InstructionSelectionPhase>(linkage); | 1804 Run<InstructionSelectionPhase>(linkage); |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1980 data->DeleteRegisterAllocationZone(); | 1995 data->DeleteRegisterAllocationZone(); |
1981 } | 1996 } |
1982 | 1997 |
1983 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1998 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
1984 | 1999 |
1985 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 2000 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
1986 | 2001 |
1987 } // namespace compiler | 2002 } // namespace compiler |
1988 } // namespace internal | 2003 } // namespace internal |
1989 } // namespace v8 | 2004 } // namespace v8 |
OLD | NEW |