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 27 matching lines...) Expand all Loading... |
38 #include "src/compiler/js-global-object-specialization.h" | 38 #include "src/compiler/js-global-object-specialization.h" |
39 #include "src/compiler/js-inlining-heuristic.h" | 39 #include "src/compiler/js-inlining-heuristic.h" |
40 #include "src/compiler/js-intrinsic-lowering.h" | 40 #include "src/compiler/js-intrinsic-lowering.h" |
41 #include "src/compiler/js-native-context-specialization.h" | 41 #include "src/compiler/js-native-context-specialization.h" |
42 #include "src/compiler/js-typed-lowering.h" | 42 #include "src/compiler/js-typed-lowering.h" |
43 #include "src/compiler/jump-threading.h" | 43 #include "src/compiler/jump-threading.h" |
44 #include "src/compiler/live-range-separator.h" | 44 #include "src/compiler/live-range-separator.h" |
45 #include "src/compiler/load-elimination.h" | 45 #include "src/compiler/load-elimination.h" |
46 #include "src/compiler/loop-analysis.h" | 46 #include "src/compiler/loop-analysis.h" |
47 #include "src/compiler/loop-peeling.h" | 47 #include "src/compiler/loop-peeling.h" |
| 48 #include "src/compiler/loop-variable-optimizer.h" |
48 #include "src/compiler/machine-operator-reducer.h" | 49 #include "src/compiler/machine-operator-reducer.h" |
49 #include "src/compiler/memory-optimizer.h" | 50 #include "src/compiler/memory-optimizer.h" |
50 #include "src/compiler/move-optimizer.h" | 51 #include "src/compiler/move-optimizer.h" |
51 #include "src/compiler/osr.h" | 52 #include "src/compiler/osr.h" |
52 #include "src/compiler/pipeline-statistics.h" | 53 #include "src/compiler/pipeline-statistics.h" |
53 #include "src/compiler/redundancy-elimination.h" | 54 #include "src/compiler/redundancy-elimination.h" |
54 #include "src/compiler/register-allocator-verifier.h" | 55 #include "src/compiler/register-allocator-verifier.h" |
55 #include "src/compiler/register-allocator.h" | 56 #include "src/compiler/register-allocator.h" |
56 #include "src/compiler/schedule.h" | 57 #include "src/compiler/schedule.h" |
57 #include "src/compiler/scheduler.h" | 58 #include "src/compiler/scheduler.h" |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 } | 828 } |
828 }; | 829 }; |
829 | 830 |
830 | 831 |
831 struct TyperPhase { | 832 struct TyperPhase { |
832 static const char* phase_name() { return "typer"; } | 833 static const char* phase_name() { return "typer"; } |
833 | 834 |
834 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) { | 835 void Run(PipelineData* data, Zone* temp_zone, Typer* typer) { |
835 NodeVector roots(temp_zone); | 836 NodeVector roots(temp_zone); |
836 data->jsgraph()->GetCachedNodes(&roots); | 837 data->jsgraph()->GetCachedNodes(&roots); |
837 typer->Run(roots); | 838 LoopVariableOptimizer induction_vars(data->jsgraph()->graph(), |
| 839 data->common(), temp_zone); |
| 840 if (FLAG_turbo_loop_variable) induction_vars.Run(); |
| 841 typer->Run(roots, &induction_vars); |
838 } | 842 } |
839 }; | 843 }; |
840 | 844 |
841 #ifdef DEBUG | 845 #ifdef DEBUG |
842 | 846 |
843 struct UntyperPhase { | 847 struct UntyperPhase { |
844 static const char* phase_name() { return "untyper"; } | 848 static const char* phase_name() { return "untyper"; } |
845 | 849 |
846 void Run(PipelineData* data, Zone* temp_zone) { | 850 void Run(PipelineData* data, Zone* temp_zone) { |
847 class RemoveTypeReducer final : public Reducer { | 851 class RemoveTypeReducer final : public Reducer { |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1879 data->DeleteRegisterAllocationZone(); | 1883 data->DeleteRegisterAllocationZone(); |
1880 } | 1884 } |
1881 | 1885 |
1882 CompilationInfo* PipelineImpl::info() const { return data_->info(); } | 1886 CompilationInfo* PipelineImpl::info() const { return data_->info(); } |
1883 | 1887 |
1884 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } | 1888 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } |
1885 | 1889 |
1886 } // namespace compiler | 1890 } // namespace compiler |
1887 } // namespace internal | 1891 } // namespace internal |
1888 } // namespace v8 | 1892 } // namespace v8 |
OLD | NEW |