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()];
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);