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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1646 if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { | 1646 if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { |
1647 pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats)); | 1647 pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats)); |
1648 pipeline_statistics->BeginPhaseKind("stub codegen"); | 1648 pipeline_statistics->BeginPhaseKind("stub codegen"); |
1649 } | 1649 } |
1650 | 1650 |
1651 PipelineImpl pipeline(&data); | 1651 PipelineImpl pipeline(&data); |
1652 DCHECK_NOT_NULL(data.schedule()); | 1652 DCHECK_NOT_NULL(data.schedule()); |
1653 | 1653 |
1654 if (FLAG_trace_turbo) { | 1654 if (FLAG_trace_turbo) { |
1655 { | 1655 { |
| 1656 CodeTracer::Scope tracing_scope(isolate->GetCodeTracer()); |
| 1657 OFStream os(tracing_scope.file()); |
| 1658 os << "---------------------------------------------------\n" |
| 1659 << "Begin compiling " << debug_name << " using Turbofan" << std::endl; |
| 1660 } |
| 1661 { |
1656 TurboJsonFile json_of(&info, std::ios_base::trunc); | 1662 TurboJsonFile json_of(&info, std::ios_base::trunc); |
1657 json_of << "{\"function\":\"" << info.GetDebugName().get() | 1663 json_of << "{\"function\":\"" << info.GetDebugName().get() |
1658 << "\", \"source\":\"\",\n\"phases\":["; | 1664 << "\", \"source\":\"\",\n\"phases\":["; |
1659 } | 1665 } |
1660 pipeline.Run<PrintGraphPhase>("Machine"); | 1666 pipeline.Run<PrintGraphPhase>("Machine"); |
1661 } | 1667 } |
1662 | 1668 |
1663 pipeline.Run<VerifyGraphPhase>(false, true); | 1669 pipeline.Run<VerifyGraphPhase>(false, true); |
1664 return pipeline.ScheduleAndGenerateCode(call_descriptor); | 1670 return pipeline.ScheduleAndGenerateCode(call_descriptor); |
1665 } | 1671 } |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 data->DeleteRegisterAllocationZone(); | 1980 data->DeleteRegisterAllocationZone(); |
1975 } | 1981 } |
1976 | 1982 |
1977 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1983 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
1978 | 1984 |
1979 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1985 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
1980 | 1986 |
1981 } // namespace compiler | 1987 } // namespace compiler |
1982 } // namespace internal | 1988 } // namespace internal |
1983 } // namespace v8 | 1989 } // namespace v8 |
OLD | NEW |