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

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

Issue 10825300: In AllocateAnyRegister allow spliting at blocked_at position inclusive. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | no next file » | 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) 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_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 SpillBetween(unallocated, unallocated->Start(), register_use->pos()); 1489 SpillBetween(unallocated, unallocated->Start(), register_use->pos());
1490 return; 1490 return;
1491 } 1491 }
1492 1492
1493 TRACE_ALLOC(OS::Print("assigning blocked register ")); 1493 TRACE_ALLOC(OS::Print("assigning blocked register "));
1494 TRACE_ALLOC(Location::RegisterLocation(candidate).Print()); 1494 TRACE_ALLOC(Location::RegisterLocation(candidate).Print());
1495 TRACE_ALLOC(OS::Print(" to live range %d until %d\n", 1495 TRACE_ALLOC(OS::Print(" to live range %d until %d\n",
1496 unallocated->vreg(), blocked_at)); 1496 unallocated->vreg(), blocked_at));
1497 1497
1498 if (blocked_at < unallocated->End()) { 1498 if (blocked_at < unallocated->End()) {
1499 // Register is blocked before the end of the live range. Split the range
1500 // at latest at blocked_at position.
1499 LiveRange* tail = SplitBetween(unallocated, 1501 LiveRange* tail = SplitBetween(unallocated,
1500 unallocated->Start(), 1502 unallocated->Start(),
1501 blocked_at); 1503 blocked_at + 1);
1502 AddToUnallocated(tail); 1504 AddToUnallocated(tail);
1503 } 1505 }
1504 1506
1505 AssignNonFreeRegister(unallocated, candidate); 1507 AssignNonFreeRegister(unallocated, candidate);
1506 } 1508 }
1507 1509
1508 1510
1509 bool FlowGraphAllocator::UpdateFreeUntil(Register reg, 1511 bool FlowGraphAllocator::UpdateFreeUntil(Register reg,
1510 LiveRange* unallocated, 1512 LiveRange* unallocated,
1511 intptr_t* cur_free_until, 1513 intptr_t* cur_free_until,
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 1943 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
1942 function.ToFullyQualifiedCString()); 1944 function.ToFullyQualifiedCString());
1943 FlowGraphPrinter printer(Function::Handle(), block_order_, true); 1945 FlowGraphPrinter printer(Function::Handle(), block_order_, true);
1944 printer.PrintBlocks(); 1946 printer.PrintBlocks();
1945 OS::Print("----------------------------------------------\n"); 1947 OS::Print("----------------------------------------------\n");
1946 } 1948 }
1947 } 1949 }
1948 1950
1949 1951
1950 } // namespace dart 1952 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698