Lines Matching defs:bb
121 BasicBlock* bb = mir_graph_->FindBlock(vaddr);
122 DCHECK(bb != NULL);
123 return GetLLVMBlock(bb->id);
126 void MirConverter::ConvertPackedSwitch(BasicBlock* bb,
135 irb_->CreateSwitch(value, GetLLVMBlock(bb->fall_through->id),
146 bb->taken = NULL;
147 bb->fall_through = NULL;
150 void MirConverter::ConvertSparseSwitch(BasicBlock* bb,
162 irb_->CreateSwitch(value, GetLLVMBlock(bb->fall_through->id),
173 bb->taken = NULL;
174 bb->fall_through = NULL;
312 void MirConverter::ConvertCompareAndBranch(BasicBlock* bb, MIR* mir,
314 if (bb->taken->start_offset <= mir->offset) {
321 irb_->CreateCondBr(cond_value, GetLLVMBlock(bb->taken->id),
322 GetLLVMBlock(bb->fall_through->id));
323 // Don't redo the fallthrough branch in the BB driver
324 bb->fall_through = NULL;
327 void MirConverter::ConvertCompareZeroAndBranch(BasicBlock* bb,
329 if (bb->taken->start_offset <= mir->offset) {
340 irb_->CreateCondBr(cond_value, GetLLVMBlock(bb->taken->id),
341 GetLLVMBlock(bb->fall_through->id));
342 // Don't redo the fallthrough branch in the BB driver
343 bb->fall_through = NULL;
450 void MirConverter::ConvertInvoke(BasicBlock* bb, MIR* mir,
452 CallInfo* info = mir_graph_->NewMemCallInfo(bb, mir, invoke_type, is_range);
686 bool MirConverter::ConvertMIRNode(MIR* mir, BasicBlock* bb,
884 DCHECK(bb->terminated_by_return);
900 DCHECK(bb->terminated_by_return);
905 ConvertCompareAndBranch(bb, mir, kCondEq, rl_src[0], rl_src[1]);
908 ConvertCompareAndBranch(bb, mir, kCondNe, rl_src[0], rl_src[1]);
911 ConvertCompareAndBranch(bb, mir, kCondLt, rl_src[0], rl_src[1]);
914 ConvertCompareAndBranch(bb, mir, kCondGe, rl_src[0], rl_src[1]);
917 ConvertCompareAndBranch(bb, mir, kCondGt, rl_src[0], rl_src[1]);
920 ConvertCompareAndBranch(bb, mir, kCondLe, rl_src[0], rl_src[1]);
923 ConvertCompareZeroAndBranch(bb, mir, kCondEq, rl_src[0]);
926 ConvertCompareZeroAndBranch(bb, mir, kCondNe, rl_src[0]);
929 ConvertCompareZeroAndBranch(bb, mir, kCondLt, rl_src[0]);
932 ConvertCompareZeroAndBranch(bb, mir, kCondGe, rl_src[0]);
935 ConvertCompareZeroAndBranch(bb, mir, kCondGt, rl_src[0]);
938 ConvertCompareZeroAndBranch(bb, mir, kCondLe, rl_src[0]);
944 if (bb->taken->start_offset <= bb->start_offset) {
947 irb_->CreateBr(GetLLVMBlock(bb->taken->id));
1111 ConvertInvoke(bb, mir, kStatic, false /*range*/,
1115 ConvertInvoke(bb, mir, kStatic, true /*range*/,
1120 ConvertInvoke(bb, mir, kDirect, false /*range*/,
1124 ConvertInvoke(bb, mir, kDirect, true /*range*/,
1129 ConvertInvoke(bb, mir, kVirtual, false /*range*/,
1133 ConvertInvoke(bb, mir, kVirtual, true /*range*/,
1138 ConvertInvoke(bb, mir, kSuper, false /*range*/,
1142 ConvertInvoke(bb, mir, kSuper, true /*range*/,
1147 ConvertInvoke(bb, mir, kInterface, false /*range*/,
1151 ConvertInvoke(bb, mir, kInterface, true /*range*/,
1155 ConvertInvoke(bb, mir, kInterface, false /*range*/,
1159 ConvertInvoke(bb, mir, kInterface, true /*range*/,
1193 if (bb->fall_through == NULL) {
1196 bb->fall_through->fall_through = NULL;
1197 bb->fall_through->taken = NULL;
1491 ConvertPackedSwitch(bb, vB, rl_src[0]);
1495 ConvertSparseSwitch(bb, vB, rl_src[0]);
1532 void MirConverter::HandlePhiNodes(BasicBlock* bb, ::llvm::BasicBlock* llvm_bb) {
1533 SetDexOffset(bb->start_offset);
1534 for (MIR* mir = bb->first_mir_insn; mir != NULL; mir = mir->next) {
1581 void MirConverter::ConvertExtendedMIR(BasicBlock* bb, MIR* mir,
1600 if ((mir == bb->last_mir_insn) && (bb->taken == NULL) &&
1601 (bb->fall_through == NULL)) {
1628 bool MirConverter::BlockBitcodeConversion(BasicBlock* bb) {
1629 if (bb->block_type == kDead) return false;
1630 ::llvm::BasicBlock* llvm_bb = GetLLVMBlock(bb->id);
1632 CHECK(bb->block_type == kExitBlock);
1635 SetDexOffset(bb->start_offset);
1640 LOG(INFO) << "Block id " << bb->id;
1648 if (bb->block_type == kEntryBlock) {
1688 } else if (bb->block_type == kExitBlock) {
1695 } else if (bb->block_type == kExceptionHandling) {
1704 HandlePhiNodes(bb, llvm_bb);
1706 for (MIR* mir = bb->first_mir_insn; mir != NULL; mir = mir->next) {
1723 if (bb->successor_block_list.block_list_type == kCatch) {
1728 GrowableArray<SuccessorBlockInfo*>::Iterator iter(bb->successor_block_list.blocks);
1734 bb->successor_block_list.blocks->Size());
1749 ConvertExtendedMIR(bb, mir, llvm_bb);
1753 bool not_handled = ConvertMIRNode(mir, bb, llvm_bb);
1763 if (bb->block_type == kEntryBlock) {
1764 entry_target_bb_ = GetLLVMBlock(bb->fall_through->id);
1765 } else if ((bb->fall_through != NULL) && !bb->terminated_by_return) {
1766 irb_->CreateBr(GetLLVMBlock(bb->fall_through->id));
1842 bool MirConverter::CreateLLVMBasicBlock(BasicBlock* bb) {
1844 if ((bb->block_type == kDead) ||(bb->block_type == kExitBlock)) {
1845 id_to_block_map_.Put(bb->id, NULL);
1847 int offset = bb->start_offset;
1848 bool entry_block = (bb->block_type == kEntryBlock);
1851 StringPrintf(kLabelFormat, bb->catch_entry ? kCatchBlock :
1852 kNormalBlock, offset, bb->id), func_);
1859 id_to_block_map_.Put(bb->id, llvm_bb);
1881 for (BasicBlock* bb = iter.Next(); bb != NULL; bb = iter.Next()) {
1882 CreateLLVMBasicBlock(bb);
1913 for (BasicBlock* bb = iter2.Next(); bb != NULL; bb = iter2.Next()) {
1914 BlockBitcodeConversion(bb);