| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/register-allocator.h" | 5 #include "src/compiler/register-allocator.h" |
| 6 | 6 |
| 7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
| 8 #include "src/hydrogen.h" | 8 #include "src/hydrogen.h" |
| 9 #include "src/string-stream.h" | 9 #include "src/string-stream.h" |
| 10 | 10 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 BitVector* RegisterAllocator::ComputeLiveOut(const InstructionBlock* block) { | 526 BitVector* RegisterAllocator::ComputeLiveOut(const InstructionBlock* block) { |
| 527 // Compute live out for the given block, except not including backward | 527 // Compute live out for the given block, except not including backward |
| 528 // successor edges. | 528 // successor edges. |
| 529 BitVector* live_out = | 529 BitVector* live_out = |
| 530 new (zone()) BitVector(code()->VirtualRegisterCount(), zone()); | 530 new (zone()) BitVector(code()->VirtualRegisterCount(), zone()); |
| 531 | 531 |
| 532 // Process all successor blocks. | 532 // Process all successor blocks. |
| 533 for (auto succ : block->successors()) { | 533 for (auto succ : block->successors()) { |
| 534 // Add values live on entry to the successor. Note the successor's | 534 // Add values live on entry to the successor. Note the successor's |
| 535 // live_in will not be computed yet for backwards edges. | 535 // live_in will not be computed yet for backwards edges. |
| 536 BitVector* live_in = live_in_sets_[succ.ToSize()]; | 536 BitVector* live_in = live_in_sets_[static_cast<int>(succ.ToSize())]; |
| 537 if (live_in != NULL) live_out->Union(*live_in); | 537 if (live_in != NULL) live_out->Union(*live_in); |
| 538 | 538 |
| 539 // All phi input operands corresponding to this successor edge are live | 539 // All phi input operands corresponding to this successor edge are live |
| 540 // out from this block. | 540 // out from this block. |
| 541 const InstructionBlock* successor = code()->InstructionBlockAt(succ); | 541 const InstructionBlock* successor = code()->InstructionBlockAt(succ); |
| 542 size_t index = successor->PredecessorIndexOf(block->rpo_number()); | 542 size_t index = successor->PredecessorIndexOf(block->rpo_number()); |
| 543 DCHECK(index < successor->PredecessorCount()); | 543 DCHECK(index < successor->PredecessorCount()); |
| 544 for (auto phi : successor->phis()) { | 544 for (auto phi : successor->phis()) { |
| 545 live_out->Add(phi->operands()[index]); | 545 live_out->Add(phi->operands()[index]); |
| 546 } | 546 } |
| (...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2213 allocator_zone_start_allocation_size_; | 2213 allocator_zone_start_allocation_size_; |
| 2214 isolate()->GetTStatistics()->SaveTiming(name(), base::TimeDelta(), size); | 2214 isolate()->GetTStatistics()->SaveTiming(name(), base::TimeDelta(), size); |
| 2215 } | 2215 } |
| 2216 #ifdef DEBUG | 2216 #ifdef DEBUG |
| 2217 if (allocator_ != NULL) allocator_->Verify(); | 2217 if (allocator_ != NULL) allocator_->Verify(); |
| 2218 #endif | 2218 #endif |
| 2219 } | 2219 } |
| 2220 } | 2220 } |
| 2221 } | 2221 } |
| 2222 } // namespace v8::internal::compiler | 2222 } // namespace v8::internal::compiler |
| OLD | NEW |