Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1196)

Side by Side Diff: runtime/vm/flow_graph_allocator.cc

Issue 14740005: Initial support for polymorphic inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after
2180 UNREACHABLE(); 2180 UNREACHABLE();
2181 } 2181 }
2182 } 2182 }
2183 2183
2184 2184
2185 #if defined(DEBUG) 2185 #if defined(DEBUG)
2186 bool FlowGraphAllocator::UnallocatedIsSorted() { 2186 bool FlowGraphAllocator::UnallocatedIsSorted() {
2187 for (intptr_t i = unallocated_.length() - 1; i >= 1; i--) { 2187 for (intptr_t i = unallocated_.length() - 1; i >= 1; i--) {
2188 LiveRange* a = unallocated_[i]; 2188 LiveRange* a = unallocated_[i];
2189 LiveRange* b = unallocated_[i - 1]; 2189 LiveRange* b = unallocated_[i - 1];
2190 if (!ShouldBeAllocatedBefore(a, b)) return false; 2190 if (!ShouldBeAllocatedBefore(a, b)) {
2191 ASSERT(false);
Kevin Millikin (Google) 2013/05/01 15:36:25 This is unintentional. I will remove it.
Florian Schneider 2013/05/03 10:41:36 I think this is actually useful for debugging here
Kevin Millikin (Google) 2013/05/03 11:47:38 OK, UNREACHABLE() it is.
2192 return false;
2193 }
2191 } 2194 }
2192 return true; 2195 return true;
2193 } 2196 }
2194 #endif 2197 #endif
2195 2198
2196 2199
2197 void FlowGraphAllocator::PrepareForAllocation( 2200 void FlowGraphAllocator::PrepareForAllocation(
2198 Location::Kind register_kind, 2201 Location::Kind register_kind,
2199 intptr_t number_of_registers, 2202 intptr_t number_of_registers,
2200 const GrowableArray<LiveRange*>& unallocated, 2203 const GrowableArray<LiveRange*>& unallocated,
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 2500 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
2498 function.ToFullyQualifiedCString()); 2501 function.ToFullyQualifiedCString());
2499 FlowGraphPrinter printer(flow_graph_, true); 2502 FlowGraphPrinter printer(flow_graph_, true);
2500 printer.PrintBlocks(); 2503 printer.PrintBlocks();
2501 OS::Print("----------------------------------------------\n"); 2504 OS::Print("----------------------------------------------\n");
2502 } 2505 }
2503 } 2506 }
2504 2507
2505 2508
2506 } // namespace dart 2509 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698