Fix off-by-one bug in TurboFan register allocator.
R=jarin@chromium.org BUG= Review URL: https://codereview.chromium.org/671703003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
12a82ef32c
commit
2642058760
@ -862,6 +862,11 @@ class InstructionSequence FINAL {
|
||||
return instruction_blocks_[rpo_number.ToSize()];
|
||||
}
|
||||
|
||||
int LastLoopInstructionIndex(const InstructionBlock* block) {
|
||||
return instruction_blocks_[block->loop_end().ToSize() - 1]
|
||||
->last_instruction_index();
|
||||
}
|
||||
|
||||
const InstructionBlock* InstructionBlockAt(
|
||||
BasicBlock::RpoNumber rpo_number) const {
|
||||
return instruction_blocks_[rpo_number.ToSize()];
|
||||
|
@ -1328,11 +1328,9 @@ void RegisterAllocator::BuildLiveRanges() {
|
||||
BitVector::Iterator iterator(live);
|
||||
LifetimePosition start = LifetimePosition::FromInstructionIndex(
|
||||
block->first_instruction_index());
|
||||
int end_index = code()
|
||||
->InstructionBlockAt(block->loop_end())
|
||||
->last_instruction_index();
|
||||
LifetimePosition end =
|
||||
LifetimePosition::FromInstructionIndex(end_index).NextInstruction();
|
||||
LifetimePosition::FromInstructionIndex(
|
||||
code()->LastLoopInstructionIndex(block)).NextInstruction();
|
||||
while (!iterator.Done()) {
|
||||
int operand_index = iterator.Current();
|
||||
LiveRange* range = LiveRangeFor(operand_index);
|
||||
|
Loading…
Reference in New Issue
Block a user