Home | History | Annotate | Download | only in dex

Lines Matching defs:bb

180       BasicBlock *bb = successor_block_info->block;
181 bb->predecessors->Delete(orig_block);
182 bb->predecessors->Insert(bottom_block);
211 BasicBlock* bb;
224 bb = block_list_.Get(i);
225 if (bb->block_type != kDalvikByteCode) continue;
227 if ((code_offset > bb->start_offset) && (bb->last_mir_insn != NULL) &&
228 (code_offset <= bb->last_mir_insn->offset)) {
229 BasicBlock *new_bb = SplitBlock(code_offset, bb, bb == *immed_pred_block_p ?
237 bb = NewMemBB(kDalvikByteCode, num_blocks_++);
238 block_list_.Insert(bb);
239 bb->start_offset = code_offset;
240 block_map_.Put(bb->start_offset, bb);
241 return bb;
729 BasicBlock *bb = GetBasicBlock(block_idx);
730 if (bb == NULL) break;
731 if (bb->block_type == kDead) continue;
732 if (bb->block_type == kEntryBlock) {
733 fprintf(file, " entry_%d [shape=Mdiamond];\n", bb->id);
734 } else if (bb->block_type == kExitBlock) {
735 fprintf(file, " exit_%d [shape=Mdiamond];\n", bb->id);
736 } else if (bb->block_type == kDalvikByteCode) {
738 bb->start_offset, bb->id);
740 fprintf(file, " {block id %d\\l}%s\\\n", bb->id,
741 bb->first_mir_insn ? " | " : " ");
742 for (mir = bb->first_mir_insn; mir; mir = mir->next) {
753 } else if (bb->block_type == kExceptionHandling) {
756 GetBlockName(bb, block_name);
762 if (bb->taken) {
763 GetBlockName(bb, block_name1);
764 GetBlockName(bb->taken, block_name2);
768 if (bb->fall_through) {
769 GetBlockName(bb, block_name1);
770 GetBlockName(bb->fall_through, block_name2);
774 if (bb->successor_block_list.block_list_type != kNotUsed) {
776 bb->start_offset, bb->id,
777 (bb->successor_block_list.block_list_type == kCatch) ?
779 GrowableArray<SuccessorBlockInfo*>::Iterator iterator(bb->successor_block_list.blocks);
799 GetBlockName(bb, block_name1);
801 block_name1, bb->start_offset, bb->id);
803 if (bb->successor_block_list.block_list_type == kPackedSwitch ||
804 bb->successor_block_list.block_list_type == kSparseSwitch) {
805 GrowableArray<SuccessorBlockInfo*>::Iterator iter(bb->successor_block_list.blocks);
815 bb->start_offset,
816 bb->id, succ_id++, block_name2);
824 GetBlockName(bb, block_name1);
827 if (bb->i_dom) {
828 GetBlockName(bb->i_dom, block_name2);
838 void MIRGraph::AppendMIR(BasicBlock* bb, MIR* mir) {
839 if (bb->first_mir_insn == NULL) {
840 DCHECK(bb->last_mir_insn == NULL);
841 bb->last_mir_insn = bb->first_mir_insn = mir;
844 bb->last_mir_insn->next = mir;
845 mir->prev = bb->last_mir_insn;
847 bb->last_mir_insn = mir;
852 void MIRGraph::PrependMIR(BasicBlock* bb, MIR* mir) {
853 if (bb->first_mir_insn == NULL) {
854 DCHECK(bb->last_mir_insn == NULL);
855 bb->last_mir_insn = bb->first_mir_insn = mir;
858 bb->first_mir_insn->prev = mir;
859 mir->next = bb->first_mir_insn;
861 bb->first_mir_insn = mir;
866 void MIRGraph::InsertMIRAfter(BasicBlock* bb, MIR* current_mir, MIR* new_mir) {
876 bb->last_mir_insn = new_mir;
1046 void MIRGraph::GetBlockName(BasicBlock* bb, char* name) {
1047 switch (bb->block_type) {
1049 snprintf(name, BLOCK_NAME_LEN, "entry_%d", bb->id);
1052 snprintf(name, BLOCK_NAME_LEN, "exit_%d", bb->id);
1055 snprintf(name, BLOCK_NAME_LEN, "block%04x_%d", bb->start_offset, bb->id);
1058 snprintf(name, BLOCK_NAME_LEN, "exception%04x_%d", bb->start_offset,
1059 bb->id);
1062 snprintf(name, BLOCK_NAME_LEN, "_%d", bb->id);
1075 BasicBlock* bb;
1090 bb = iterator.Next();
1091 if (bb == NULL) break;
1093 bb->id,
1094 block_type_names[bb->block_type],
1095 bb->start_offset,
1096 bb->last_mir_insn ? bb->last_mir_insn->offset : bb->start_offset,
1097 bb->last_mir_insn ? "" : " empty");
1098 if (bb->taken) {
1099 LOG(INFO) << " Taken branch: block " << bb->taken->id
1100 << "(0x" << std::hex << bb->taken->start_offset << ")";
1102 if (bb->fall_through) {
1103 LOG(INFO) << " Fallthrough : block " << bb->fall_through->id
1104 << " (0x" << std::hex << bb->fall_through->start_offset << ")";
1115 CallInfo* MIRGraph::NewMemCallInfo(BasicBlock* bb, MIR* mir, InvokeType type,
1119 MIR* move_result_mir = FindMoveResult(bb, mir);
1143 BasicBlock* bb = static_cast<BasicBlock*>(arena_->Alloc(sizeof(BasicBlock),
1145 bb->block_type = block_type;
1146 bb->id = block_id;
1148 bb->predecessors = new (arena_) GrowableArray<BasicBlock*>(arena_,
1151 bb->successor_block_list.block_list_type = kNotUsed;
1153 return bb;