OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2912 | 2912 |
2913 DiscoverLoops(); | 2913 DiscoverLoops(); |
2914 | 2914 |
2915 BuildLiveRanges(); | 2915 BuildLiveRanges(); |
2916 | 2916 |
2917 if (FLAG_print_ssa_liveness) { | 2917 if (FLAG_print_ssa_liveness) { |
2918 liveness_.Dump(); | 2918 liveness_.Dump(); |
2919 } | 2919 } |
2920 | 2920 |
2921 if (FLAG_print_ssa_liveranges) { | 2921 if (FLAG_print_ssa_liveranges) { |
2922 const Function& function = flow_graph_.parsed_function()->function(); | 2922 const Function& function = flow_graph_.function(); |
2923 | 2923 |
2924 OS::Print("-- [before ssa allocator] ranges [%s] ---------\n", | 2924 OS::Print("-- [before ssa allocator] ranges [%s] ---------\n", |
2925 function.ToFullyQualifiedCString()); | 2925 function.ToFullyQualifiedCString()); |
2926 PrintLiveRanges(); | 2926 PrintLiveRanges(); |
2927 OS::Print("----------------------------------------------\n"); | 2927 OS::Print("----------------------------------------------\n"); |
2928 | 2928 |
2929 OS::Print("-- [before ssa allocator] ir [%s] -------------\n", | 2929 OS::Print("-- [before ssa allocator] ir [%s] -------------\n", |
2930 function.ToFullyQualifiedCString()); | 2930 function.ToFullyQualifiedCString()); |
2931 FlowGraphPrinter printer(flow_graph_, true); | 2931 FlowGraphPrinter printer(flow_graph_, true); |
2932 printer.PrintBlocks(); | 2932 printer.PrintBlocks(); |
(...skipping 20 matching lines...) Expand all Loading... |
2953 AllocateUnallocatedRanges(); | 2953 AllocateUnallocatedRanges(); |
2954 | 2954 |
2955 ResolveControlFlow(); | 2955 ResolveControlFlow(); |
2956 | 2956 |
2957 GraphEntryInstr* entry = block_order_[0]->AsGraphEntry(); | 2957 GraphEntryInstr* entry = block_order_[0]->AsGraphEntry(); |
2958 ASSERT(entry != NULL); | 2958 ASSERT(entry != NULL); |
2959 intptr_t double_spill_slot_count = spill_slots_.length() * kDoubleSpillFactor; | 2959 intptr_t double_spill_slot_count = spill_slots_.length() * kDoubleSpillFactor; |
2960 entry->set_spill_slot_count(cpu_spill_slot_count_ + double_spill_slot_count); | 2960 entry->set_spill_slot_count(cpu_spill_slot_count_ + double_spill_slot_count); |
2961 | 2961 |
2962 if (FLAG_print_ssa_liveranges) { | 2962 if (FLAG_print_ssa_liveranges) { |
2963 const Function& function = flow_graph_.parsed_function()->function(); | 2963 const Function& function = flow_graph_.function(); |
2964 | 2964 |
2965 OS::Print("-- [after ssa allocator] ranges [%s] ---------\n", | 2965 OS::Print("-- [after ssa allocator] ranges [%s] ---------\n", |
2966 function.ToFullyQualifiedCString()); | 2966 function.ToFullyQualifiedCString()); |
2967 PrintLiveRanges(); | 2967 PrintLiveRanges(); |
2968 OS::Print("----------------------------------------------\n"); | 2968 OS::Print("----------------------------------------------\n"); |
2969 | 2969 |
2970 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", | 2970 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", |
2971 function.ToFullyQualifiedCString()); | 2971 function.ToFullyQualifiedCString()); |
2972 FlowGraphPrinter printer(flow_graph_, true); | 2972 FlowGraphPrinter printer(flow_graph_, true); |
2973 printer.PrintBlocks(); | 2973 printer.PrintBlocks(); |
2974 OS::Print("----------------------------------------------\n"); | 2974 OS::Print("----------------------------------------------\n"); |
2975 } | 2975 } |
2976 } | 2976 } |
2977 | 2977 |
2978 | 2978 |
2979 } // namespace dart | 2979 } // namespace dart |
OLD | NEW |