| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/flow_graph_allocator.h" | 5 #include "vm/flow_graph_allocator.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 #include "vm/il_printer.h" | 9 #include "vm/il_printer.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 } | 1975 } |
| 1976 } | 1976 } |
| 1977 | 1977 |
| 1978 | 1978 |
| 1979 void FlowGraphAllocator::AllocateUnallocatedRanges() { | 1979 void FlowGraphAllocator::AllocateUnallocatedRanges() { |
| 1980 #if defined(DEBUG) | 1980 #if defined(DEBUG) |
| 1981 ASSERT(UnallocatedIsSorted()); | 1981 ASSERT(UnallocatedIsSorted()); |
| 1982 #endif | 1982 #endif |
| 1983 | 1983 |
| 1984 while (!unallocated_.is_empty()) { | 1984 while (!unallocated_.is_empty()) { |
| 1985 LiveRange* range = unallocated_.Last(); | 1985 LiveRange* range = unallocated_.RemoveLast(); |
| 1986 unallocated_.RemoveLast(); | |
| 1987 const intptr_t start = range->Start(); | 1986 const intptr_t start = range->Start(); |
| 1988 TRACE_ALLOC(OS::Print("Processing live range for vreg %"Pd" " | 1987 TRACE_ALLOC(OS::Print("Processing live range for vreg %"Pd" " |
| 1989 "starting at %"Pd"\n", | 1988 "starting at %"Pd"\n", |
| 1990 range->vreg(), | 1989 range->vreg(), |
| 1991 start)); | 1990 start)); |
| 1992 | 1991 |
| 1993 // TODO(vegorov): eagerly spill liveranges without register uses. | 1992 // TODO(vegorov): eagerly spill liveranges without register uses. |
| 1994 AdvanceActiveIntervals(start); | 1993 AdvanceActiveIntervals(start); |
| 1995 | 1994 |
| 1996 if (!AllocateFreeRegister(range)) { | 1995 if (!AllocateFreeRegister(range)) { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2236 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", | 2235 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", |
| 2237 function.ToFullyQualifiedCString()); | 2236 function.ToFullyQualifiedCString()); |
| 2238 FlowGraphPrinter printer(flow_graph_, true); | 2237 FlowGraphPrinter printer(flow_graph_, true); |
| 2239 printer.PrintBlocks(); | 2238 printer.PrintBlocks(); |
| 2240 OS::Print("----------------------------------------------\n"); | 2239 OS::Print("----------------------------------------------\n"); |
| 2241 } | 2240 } |
| 2242 } | 2241 } |
| 2243 | 2242 |
| 2244 | 2243 |
| 2245 } // namespace dart | 2244 } // namespace dart |
| OLD | NEW |