Lines Matching refs:block
564 // Initialize the live_in sets for each block to NULL.
571 BitVector* LAllocator::ComputeLiveOut(HBasicBlock* block) {
572 // Compute live out for the given block, except not including backward
577 for (HSuccessorIterator it(block->end()); !it.Done(); it.Advance()) {
585 // out from this block.
586 int index = successor->PredecessorIndexOf(block);
600 void LAllocator::AddInitialIntervals(HBasicBlock* block,
602 // Add an interval that includes the entire block to the live range for
605 block->first_instruction_index());
607 block->last_instruction_index()).NextInstruction();
690 LGap* LAllocator::GetLastGap(HBasicBlock* block) {
691 int last_instruction = block->last_instruction_index();
780 void LAllocator::MeetRegisterConstraints(HBasicBlock* block) {
781 int start = block->first_instruction_index();
782 int end = block->last_instruction_index();
910 void LAllocator::ProcessInstructions(HBasicBlock* block, BitVector* live) {
911 int block_start = block->first_instruction_index();
912 int index = block->last_instruction_index();
936 if (!phi->block()->IsLoopHeader()) {
1033 void LAllocator::ResolvePhis(HBasicBlock* block) {
1034 const ZoneList<HPhi*>* phis = block->phis();
1053 HBasicBlock* cur_block = block->predecessors()->at(j);
1080 LLabel* label = chunk_->GetLabel(phi->block()->block_id());
1083 live_range->SetSpillStartIndex(phi->block()->first_instruction_index());
1117 HBasicBlock* block = blocks->at(i);
1118 MeetRegisterConstraints(block);
1130 HBasicBlock* block = blocks->at(block_id);
1131 ResolvePhis(block);
1137 HBasicBlock* block,
1142 LifetimePosition::FromInstructionIndex(block->first_instruction_index());
1165 if (block->predecessors()->length() == 1) {
1166 gap = GapAt(block->first_instruction_index());
1212 return gap->block();
1227 // Add gap move if the two live ranges touch and there is no block
1253 bool LAllocator::CanEagerlyResolveControlFlow(HBasicBlock* block) const {
1254 if (block->predecessors()->length() != 1) return false;
1255 return block->predecessors()->first()->block_id() == block->block_id() - 1;
1263 HBasicBlock* block = blocks->at(block_id);
1264 if (CanEagerlyResolveControlFlow(block)) continue;
1265 BitVector* live = live_in_sets_[block->block_id()];
1269 for (int i = 0; i < block->predecessors()->length(); ++i) {
1270 HBasicBlock* cur = block->predecessors()->at(i);
1272 ResolveControlFlow(cur_range, block, cur);
1286 HBasicBlock* block = blocks->at(block_id);
1287 BitVector* live = ComputeLiveOut(block);
1288 // Initially consider all live_out values live for the entire block. We
1290 AddInitialIntervals(block, live);
1294 ProcessInstructions(block, live);
1295 // All phi output operands are killed by this block.
1296 const ZoneList<HPhi*>* phis = block->phis();
1299 // block.
1305 LGap* gap = GetLastGap(phi->block()->predecessors()->at(0));
1320 block->first_instruction_index());
1324 // Now live is live_in for this block except not including values live
1328 // If this block is a loop header go back and patch up the necessary
1330 if (block->IsLoopHeader()) {
1331 // TODO(kmillikin): Need to be able to get the last block of the loop
1335 HBasicBlock* back_edge = block->loop_information()->GetLastBackEdge();
1338 block->first_instruction_index());
1348 for (int i = block->block_id() + 1; i <= back_edge->block_id(); ++i) {
1946 HBasicBlock* block = GetBlock(pos.InstructionStart());
1948 block->IsLoopHeader() ? block : block->parent_loop_header();
2080 // The interval is split in the same basic block. Split at the latest
2085 HBasicBlock* block = end_block;
2087 while (block->parent_loop_header() != NULL &&
2088 block->parent_loop_header()->block_id() > start_block->block_id()) {
2089 block = block->parent_loop_header();
2094 if (block == end_block && !end_block->IsLoopHeader()) return end;
2097 block->first_instruction_index());