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 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2746 range->assigned_location()); | 2746 range->assigned_location()); |
2747 } | 2747 } |
2748 } | 2748 } |
2749 } | 2749 } |
2750 | 2750 |
2751 | 2751 |
2752 static Representation RepresentationForRange(Representation definition_rep) { | 2752 static Representation RepresentationForRange(Representation definition_rep) { |
2753 if (definition_rep == kUnboxedMint) { | 2753 if (definition_rep == kUnboxedMint) { |
2754 // kUnboxedMint is split into two ranges, each of which are kUntagged. | 2754 // kUnboxedMint is split into two ranges, each of which are kUntagged. |
2755 return kUntagged; | 2755 return kUntagged; |
| 2756 } else if (definition_rep == kUnboxedUint32) { |
| 2757 // kUnboxedUint32 is untagged. |
| 2758 return kUntagged; |
2756 } | 2759 } |
2757 return definition_rep; | 2760 return definition_rep; |
2758 } | 2761 } |
2759 | 2762 |
2760 | 2763 |
2761 void FlowGraphAllocator::CollectRepresentations() { | 2764 void FlowGraphAllocator::CollectRepresentations() { |
2762 // Parameters. | 2765 // Parameters. |
2763 GraphEntryInstr* graph_entry = flow_graph_.graph_entry(); | 2766 GraphEntryInstr* graph_entry = flow_graph_.graph_entry(); |
2764 for (intptr_t i = 0; i < graph_entry->initial_definitions()->length(); ++i) { | 2767 for (intptr_t i = 0; i < graph_entry->initial_definitions()->length(); ++i) { |
2765 Definition* def = (*graph_entry->initial_definitions())[i]; | 2768 Definition* def = (*graph_entry->initial_definitions())[i]; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2884 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", | 2887 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", |
2885 function.ToFullyQualifiedCString()); | 2888 function.ToFullyQualifiedCString()); |
2886 FlowGraphPrinter printer(flow_graph_, true); | 2889 FlowGraphPrinter printer(flow_graph_, true); |
2887 printer.PrintBlocks(); | 2890 printer.PrintBlocks(); |
2888 OS::Print("----------------------------------------------\n"); | 2891 OS::Print("----------------------------------------------\n"); |
2889 } | 2892 } |
2890 } | 2893 } |
2891 | 2894 |
2892 | 2895 |
2893 } // namespace dart | 2896 } // namespace dart |
OLD | NEW |