| Index: runtime/vm/flow_graph_allocator.cc
|
| diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
|
| index 4778d7a79642f465bf4e7b4afb9590679d607dfa..009e500bb88e655a793046269450829bf7a62c01 100644
|
| --- a/runtime/vm/flow_graph_allocator.cc
|
| +++ b/runtime/vm/flow_graph_allocator.cc
|
| @@ -441,6 +441,10 @@ void FlowGraphAllocator::BlockLocation(Location loc,
|
| intptr_t to) {
|
| if (loc.IsRegister()) {
|
| BlockRegisterLocation(loc, from, to, blocked_cpu_registers_, cpu_regs_);
|
| +#if defined(TARGET_ARCH_DBC)
|
| + last_used_register_ = Utils::Maximum(last_used_register_,
|
| + loc.register_code());
|
| +#endif
|
| } else if (loc.IsFpuRegister()) {
|
| BlockRegisterLocation(loc, from, to, blocked_fpu_registers_, fpu_regs_);
|
| } else {
|
| @@ -2742,10 +2746,6 @@ void FlowGraphAllocator::PrepareForAllocation(
|
| registers_[reg]->Add(range);
|
| }
|
| }
|
| -
|
| -#if defined(TARGET_ARCH_DBC)
|
| - last_used_register_ = -1;
|
| -#endif
|
| }
|
|
|
|
|
| @@ -3010,6 +3010,10 @@ void FlowGraphAllocator::AllocateRegisters() {
|
|
|
| DiscoverLoops();
|
|
|
| +#if defined(TARGET_ARCH_DBC)
|
| + last_used_register_ = -1;
|
| +#endif
|
| +
|
| BuildLiveRanges();
|
|
|
| if (FLAG_print_ssa_liveranges) {
|
| @@ -3038,6 +3042,7 @@ void FlowGraphAllocator::AllocateRegisters() {
|
| AllocateUnallocatedRanges();
|
| #if defined(TARGET_ARCH_DBC)
|
| const intptr_t last_used_cpu_register = last_used_register_;
|
| + last_used_register_ = -1;
|
| #endif
|
|
|
| cpu_spill_slot_count_ = spill_slots_.length();
|
|
|