Lines Matching refs:bb

208       BasicBlock* bb = GetBasicBlock(successor_block_info->block);  in SplitBlock()  local
209 if (bb != nullptr) { in SplitBlock()
210 bb->predecessors->Delete(orig_block->id); in SplitBlock()
211 bb->predecessors->Insert(bottom_block->id); in SplitBlock()
241 p->bb = bottom_block->id; in SplitBlock()
273 BasicBlock* bb = (block_id == 0) ? NULL : block_list_.Get(block_id); in FindBlock() local
275 if ((bb != NULL) && (bb->start_offset == code_offset)) { in FindBlock()
277 return bb; in FindBlock()
285 if (bb != NULL) { in FindBlock()
287 return SplitBlock(code_offset, bb, bb == *immed_pred_block_p ? immed_pred_block_p : NULL); in FindBlock()
291 bb = NewMemBB(kDalvikByteCode, num_blocks_++); in FindBlock()
292 block_list_.Insert(bb); in FindBlock()
293 bb->start_offset = code_offset; in FindBlock()
294 dex_pc_to_block_map_.Put(bb->start_offset, bb->id); in FindBlock()
295 return bb; in FindBlock()
900 BasicBlock* bb = GetBasicBlock(block_idx); in DumpCFG() local
901 if (bb == NULL) continue; in DumpCFG()
902 if (bb->block_type == kDead) continue; in DumpCFG()
903 if (bb->hidden) continue; in DumpCFG()
904 if (bb->block_type == kEntryBlock) { in DumpCFG()
905 fprintf(file, " entry_%d [shape=Mdiamond];\n", bb->id); in DumpCFG()
906 } else if (bb->block_type == kExitBlock) { in DumpCFG()
907 fprintf(file, " exit_%d [shape=Mdiamond];\n", bb->id); in DumpCFG()
908 } else if (bb->block_type == kDalvikByteCode) { in DumpCFG()
910 bb->start_offset, bb->id); in DumpCFG()
912 fprintf(file, " {block id %d\\l}%s\\\n", bb->id, in DumpCFG()
913 bb->first_mir_insn ? " | " : " "); in DumpCFG()
914 for (mir = bb->first_mir_insn; mir; mir = mir->next) { in DumpCFG()
948 } else if (bb->block_type == kExceptionHandling) { in DumpCFG()
951 GetBlockName(bb, block_name); in DumpCFG()
957 if (bb->taken != NullBasicBlockId) { in DumpCFG()
958 GetBlockName(bb, block_name1); in DumpCFG()
959 GetBlockName(GetBasicBlock(bb->taken), block_name2); in DumpCFG()
963 if (bb->fall_through != NullBasicBlockId) { in DumpCFG()
964 GetBlockName(bb, block_name1); in DumpCFG()
965 GetBlockName(GetBasicBlock(bb->fall_through), block_name2); in DumpCFG()
969 if (bb->successor_block_list_type != kNotUsed) { in DumpCFG()
971 bb->start_offset, bb->id, in DumpCFG()
972 (bb->successor_block_list_type == kCatch) ? "Mrecord" : "record"); in DumpCFG()
973 GrowableArray<SuccessorBlockInfo*>::Iterator iterator(bb->successor_blocks); in DumpCFG()
993 GetBlockName(bb, block_name1); in DumpCFG()
995 block_name1, bb->start_offset, bb->id); in DumpCFG()
998 GrowableArray<SuccessorBlockInfo*>::Iterator iter(bb->successor_blocks); in DumpCFG()
1008 fprintf(file, " succ%04x_%d:f%d:e -> %s:n\n", bb->start_offset, in DumpCFG()
1009 bb->id, succ_id++, block_name2); in DumpCFG()
1016 GetBlockName(bb, block_name1); in DumpCFG()
1019 if (bb->i_dom) { in DumpCFG()
1020 GetBlockName(GetBasicBlock(bb->i_dom), block_name2); in DumpCFG()
1077 mir->bb = id; in InsertMIRListAfter()
1147 mir->bb = id; in InsertMIRListBefore()
1178 mir->bb = NullBasicBlockId; in RemoveMIRList()
1382 void MIRGraph::GetBlockName(BasicBlock* bb, char* name) { in GetBlockName() argument
1383 switch (bb->block_type) { in GetBlockName()
1385 snprintf(name, BLOCK_NAME_LEN, "entry_%d", bb->id); in GetBlockName()
1388 snprintf(name, BLOCK_NAME_LEN, "exit_%d", bb->id); in GetBlockName()
1391 snprintf(name, BLOCK_NAME_LEN, "block%04x_%d", bb->start_offset, bb->id); in GetBlockName()
1394 snprintf(name, BLOCK_NAME_LEN, "exception%04x_%d", bb->start_offset, in GetBlockName()
1395 bb->id); in GetBlockName()
1398 snprintf(name, BLOCK_NAME_LEN, "_%d", bb->id); in GetBlockName()
1411 BasicBlock* bb; in DumpMIRGraph() local
1427 bb = iterator.Next(); in DumpMIRGraph()
1428 if (bb == NULL) break; in DumpMIRGraph()
1430 bb->id, in DumpMIRGraph()
1431 block_type_names[bb->block_type], in DumpMIRGraph()
1432 bb->start_offset, in DumpMIRGraph()
1433 bb->last_mir_insn ? bb->last_mir_insn->offset : bb->start_offset, in DumpMIRGraph()
1434 bb->last_mir_insn ? "" : " empty"); in DumpMIRGraph()
1435 if (bb->taken != NullBasicBlockId) { in DumpMIRGraph()
1436 LOG(INFO) << " Taken branch: block " << bb->taken in DumpMIRGraph()
1437 << "(0x" << std::hex << GetBasicBlock(bb->taken)->start_offset << ")"; in DumpMIRGraph()
1439 if (bb->fall_through != NullBasicBlockId) { in DumpMIRGraph()
1440 LOG(INFO) << " Fallthrough : block " << bb->fall_through in DumpMIRGraph()
1441 << " (0x" << std::hex << GetBasicBlock(bb->fall_through)->start_offset << ")"; in DumpMIRGraph()
1452 CallInfo* MIRGraph::NewMemCallInfo(BasicBlock* bb, MIR* mir, InvokeType type, in NewMemCallInfo() argument
1456 MIR* move_result_mir = FindMoveResult(bb, mir); in NewMemCallInfo()
1486 BasicBlock* bb = new (arena_) BasicBlock(); in NewMemBB() local
1488 bb->block_type = block_type; in NewMemBB()
1489 bb->id = block_id; in NewMemBB()
1491 bb->predecessors = new (arena_) GrowableArray<BasicBlockId>(arena_, in NewMemBB()
1494 bb->successor_block_list_type = kNotUsed; in NewMemBB()
1496 return bb; in NewMemBB()
1630 for (BasicBlock* bb = iterator.Next(); bb != nullptr; bb = iterator.Next()) { in ComputeTopologicalSortOrder() local
1631 if (bb->hidden == true) { in ComputeTopologicalSortOrder()
1637 if (bb->predecessors->Size() == 0u) { in ComputeTopologicalSortOrder()
1639 q.push(bb); in ComputeTopologicalSortOrder()
1671 BasicBlock* bb = nullptr; in ComputeTopologicalSortOrder() local
1675 bb = q.front(); in ComputeTopologicalSortOrder()
1677 if (bb->visited) { in ComputeTopologicalSortOrder()
1681 topological_order_loop_ends_->Put(topological_order_indexes_->Get(bb->id), idx); in ComputeTopologicalSortOrder()
1682 DCHECK_EQ(loop_head_stack.back(), bb->id); in ComputeTopologicalSortOrder()
1705 bb = SelectTopologicalSortOrderFallBack(this, current_loop, &visited_cnt_values, in ComputeTopologicalSortOrder()
1707 DCHECK(bb != nullptr) << PrettyMethod(cu_->method_idx, *cu_->dex_file); in ComputeTopologicalSortOrder()
1710 << PrettyMethod(cu_->method_idx, *cu_->dex_file) << " BB #" << bb->id in ComputeTopologicalSortOrder()
1711 << " @0x" << std::hex << bb->start_offset in ComputeTopologicalSortOrder()
1733 bb = candidate; in ComputeTopologicalSortOrder()
1740 loop_head_reachable_from[bb->id] = reachable; in ComputeTopologicalSortOrder()
1741 ComputeUnvisitedReachableFrom(this, bb->id, reachable, &tmp_stack); in ComputeTopologicalSortOrder()
1743 loop_head_stack.push_back(bb->id); in ComputeTopologicalSortOrder()
1747 DCHECK_EQ(bb->hidden, false); in ComputeTopologicalSortOrder()
1748 DCHECK_EQ(bb->visited, false); in ComputeTopologicalSortOrder()
1749 bb->visited = true; in ComputeTopologicalSortOrder()
1753 topological_order_indexes_->Put(bb->id, idx); in ComputeTopologicalSortOrder()
1754 topological_order_->Insert(bb->id); in ComputeTopologicalSortOrder()
1757 ChildBlockIterator succIter(bb, this); in ComputeTopologicalSortOrder()
1798 BasicBlock* bb = gen_suspend_test_list_.Get(idx); in HasSuspendTestBetween() local
1799 if (bb == source) in HasSuspendTestBetween()
1801 if (source->dominators->IsBitSet(bb->id) && bb->dominators->IsBitSet(target_id)) in HasSuspendTestBetween()
1808 ChildBlockIterator::ChildBlockIterator(BasicBlock* bb, MIRGraph* mir_graph) in ChildBlockIterator() argument
1809 : basic_block_(bb), mir_graph_(mir_graph), visited_fallthrough_(false), in ChildBlockIterator()
1915 res->bb = NullBasicBlockId; in Copy()
2040 mir->bb = NullBasicBlockId; in Hide()