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

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

Issue 286973011: Fix register allocator to properly allocate containers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef VM_FLOW_GRAPH_ALLOCATOR_H_ 5 #ifndef VM_FLOW_GRAPH_ALLOCATOR_H_
6 #define VM_FLOW_GRAPH_ALLOCATOR_H_ 6 #define VM_FLOW_GRAPH_ALLOCATOR_H_
7 7
8 #include "vm/flow_graph.h" 8 #include "vm/flow_graph.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/intermediate_language.h" 10 #include "vm/intermediate_language.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 GrowableArray<Instruction*> safepoints_; 291 GrowableArray<Instruction*> safepoints_;
292 292
293 Location::Kind register_kind_; 293 Location::Kind register_kind_;
294 294
295 intptr_t number_of_registers_; 295 intptr_t number_of_registers_;
296 296
297 // Per register lists of allocated live ranges. Contain only those 297 // Per register lists of allocated live ranges. Contain only those
298 // ranges that can be affected by future allocation decisions. 298 // ranges that can be affected by future allocation decisions.
299 // Those live ranges that end before the start of the current live range are 299 // Those live ranges that end before the start of the current live range are
300 // removed from the list and will not be affected. 300 // removed from the list and will not be affected.
301 GrowableArray<LiveRange*> registers_[kNumberOfCpuRegisters]; 301 // The length of both arrays is 'number_of_registers_'
302 GrowableArray<ZoneGrowableArray<LiveRange*>*> registers_;
hausner 2014/05/16 18:15:12 The array of LiveRange* values was previously not
srdjan 2014/05/16 18:21:03 Yes, because GrowableArray cannot contain another
302 303
303 bool blocked_registers_[kNumberOfCpuRegisters]; 304 GrowableArray<bool> blocked_registers_;
304 305
305 306
306 // Worklist for register allocator. Always maintained sorted according 307 // Worklist for register allocator. Always maintained sorted according
307 // to ShouldBeAllocatedBefore predicate. 308 // to ShouldBeAllocatedBefore predicate.
308 GrowableArray<LiveRange*> unallocated_; 309 GrowableArray<LiveRange*> unallocated_;
309 310
310 // List of used spill slots. Contains positions after which spill slots 311 // List of used spill slots. Contains positions after which spill slots
311 // become free and can be reused for allocation. 312 // become free and can be reused for allocation.
312 GrowableArray<intptr_t> spill_slots_; 313 GrowableArray<intptr_t> spill_slots_;
313 314
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 663
663 AllocationFinger finger_; 664 AllocationFinger finger_;
664 665
665 DISALLOW_COPY_AND_ASSIGN(LiveRange); 666 DISALLOW_COPY_AND_ASSIGN(LiveRange);
666 }; 667 };
667 668
668 669
669 } // namespace dart 670 } // namespace dart
670 671
671 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_ 672 #endif // VM_FLOW_GRAPH_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698