| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" |
| 6 | 6 |
| 7 #include "src/isolate-inl.h" | 7 #include "src/isolate-inl.h" |
| 8 | 8 |
| 9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
| 10 | 10 |
| (...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1980 // Run the compilation pipeline. | 1980 // Run the compilation pipeline. |
| 1981 //---------------------------------------------------------------------------- | 1981 //---------------------------------------------------------------------------- |
| 1982 { | 1982 { |
| 1983 // Changes lowering requires types. | 1983 // Changes lowering requires types. |
| 1984 Typer typer(isolate, &graph); | 1984 Typer typer(isolate, &graph); |
| 1985 NodeVector roots(&zone); | 1985 NodeVector roots(&zone); |
| 1986 jsgraph.GetCachedNodes(&roots); | 1986 jsgraph.GetCachedNodes(&roots); |
| 1987 typer.Run(roots); | 1987 typer.Run(roots); |
| 1988 | 1988 |
| 1989 // Run generic and change lowering. | 1989 // Run generic and change lowering. |
| 1990 JSGenericLowering generic(true, &jsgraph); |
| 1991 ChangeLowering changes(&jsgraph); |
| 1990 GraphReducer graph_reducer(&zone, &graph, jsgraph.Dead()); | 1992 GraphReducer graph_reducer(&zone, &graph, jsgraph.Dead()); |
| 1991 JSGenericLowering generic(true, &jsgraph); | |
| 1992 ChangeLowering changes(&graph_reducer, &jsgraph); | |
| 1993 graph_reducer.AddReducer(&changes); | 1993 graph_reducer.AddReducer(&changes); |
| 1994 graph_reducer.AddReducer(&generic); | 1994 graph_reducer.AddReducer(&generic); |
| 1995 graph_reducer.ReduceGraph(); | 1995 graph_reducer.ReduceGraph(); |
| 1996 | 1996 |
| 1997 if (FLAG_trace_turbo_graph) { // Simple textual RPO. | 1997 if (FLAG_trace_turbo_graph) { // Simple textual RPO. |
| 1998 OFStream os(stdout); | 1998 OFStream os(stdout); |
| 1999 os << "-- Graph after change lowering -- " << std::endl; | 1999 os << "-- Graph after change lowering -- " << std::endl; |
| 2000 os << AsRPO(graph); | 2000 os << AsRPO(graph); |
| 2001 } | 2001 } |
| 2002 | 2002 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2045 | 2045 |
| 2046 Handle<Code> code = Handle<Code>::null(); | 2046 Handle<Code> code = Handle<Code>::null(); |
| 2047 { | 2047 { |
| 2048 // Changes lowering requires types. | 2048 // Changes lowering requires types. |
| 2049 Typer typer(isolate, &graph); | 2049 Typer typer(isolate, &graph); |
| 2050 NodeVector roots(&zone); | 2050 NodeVector roots(&zone); |
| 2051 jsgraph.GetCachedNodes(&roots); | 2051 jsgraph.GetCachedNodes(&roots); |
| 2052 typer.Run(roots); | 2052 typer.Run(roots); |
| 2053 | 2053 |
| 2054 // Run generic and change lowering. | 2054 // Run generic and change lowering. |
| 2055 JSGenericLowering generic(true, &jsgraph); |
| 2056 ChangeLowering changes(&jsgraph); |
| 2055 GraphReducer graph_reducer(&zone, &graph, jsgraph.Dead()); | 2057 GraphReducer graph_reducer(&zone, &graph, jsgraph.Dead()); |
| 2056 JSGenericLowering generic(true, &jsgraph); | |
| 2057 ChangeLowering changes(&graph_reducer, &jsgraph); | |
| 2058 graph_reducer.AddReducer(&changes); | 2058 graph_reducer.AddReducer(&changes); |
| 2059 graph_reducer.AddReducer(&generic); | 2059 graph_reducer.AddReducer(&generic); |
| 2060 graph_reducer.ReduceGraph(); | 2060 graph_reducer.ReduceGraph(); |
| 2061 | 2061 |
| 2062 if (FLAG_trace_turbo_graph) { // Simple textual RPO. | 2062 if (FLAG_trace_turbo_graph) { // Simple textual RPO. |
| 2063 OFStream os(stdout); | 2063 OFStream os(stdout); |
| 2064 os << "-- Graph after change lowering -- " << std::endl; | 2064 os << "-- Graph after change lowering -- " << std::endl; |
| 2065 os << AsRPO(graph); | 2065 os << AsRPO(graph); |
| 2066 } | 2066 } |
| 2067 | 2067 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 module_env->module->GetName(function.name_offset)); | 2163 module_env->module->GetName(function.name_offset)); |
| 2164 } | 2164 } |
| 2165 | 2165 |
| 2166 return code; | 2166 return code; |
| 2167 } | 2167 } |
| 2168 | 2168 |
| 2169 | 2169 |
| 2170 } // namespace compiler | 2170 } // namespace compiler |
| 2171 } // namespace internal | 2171 } // namespace internal |
| 2172 } // namespace v8 | 2172 } // namespace v8 |
| OLD | NEW |