Lines Matching refs:curBlock
902 static void processCanBranch(CompilationUnit *cUnit, BasicBlock *curBlock, in processCanBranch() argument
940 &curBlock); in processCanBranch()
941 curBlock->taken = takenBlock; in processCanBranch()
942 dvmCompilerSetBit(takenBlock->predecessors, curBlock->id); in processCanBranch()
964 &curBlock); in processCanBranch()
965 curBlock->fallThrough = fallthroughBlock; in processCanBranch()
966 dvmCompilerSetBit(fallthroughBlock->predecessors, curBlock->id); in processCanBranch()
982 static void processCanSwitch(CompilationUnit *cUnit, BasicBlock *curBlock, in processCanSwitch() argument
1025 if (curBlock->successorBlockList.blockListType != kNotUsed) { in processCanSwitch()
1027 curBlock->successorBlockList.blockListType); in processCanSwitch()
1030 curBlock->successorBlockList.blockListType = in processCanSwitch()
1033 dvmInitGrowableList(&curBlock->successorBlockList.blocks, size); in processCanSwitch()
1042 &curBlock); in processCanSwitch()
1049 dvmInsertGrowableList(&curBlock->successorBlockList.blocks, in processCanSwitch()
1051 dvmCompilerSetBit(caseBlock->predecessors, curBlock->id); in processCanSwitch()
1063 curBlock->fallThrough = fallthroughBlock; in processCanSwitch()
1064 dvmCompilerSetBit(fallthroughBlock->predecessors, curBlock->id); in processCanSwitch()
1068 static void processCanThrow(CompilationUnit *cUnit, BasicBlock *curBlock, in processCanThrow() argument
1086 if (curBlock->successorBlockList.blockListType != kNotUsed) { in processCanThrow()
1088 curBlock->successorBlockList.blockListType); in processCanThrow()
1091 curBlock->successorBlockList.blockListType = kCatch; in processCanThrow()
1092 dvmInitGrowableList(&curBlock->successorBlockList.blocks, 2); in processCanThrow()
1114 dvmInsertGrowableList(&curBlock->successorBlockList.blocks, in processCanThrow()
1116 dvmCompilerSetBit(catchBlock->predecessors, curBlock->id); in processCanThrow()
1121 curBlock->taken = ehBlock; in processCanThrow()
1124 dvmCompilerSetBit(ehBlock->predecessors, curBlock->id); in processCanThrow()
1150 curBlock->fallThrough = fallthroughBlock; in processCanThrow()
1151 dvmCompilerSetBit(fallthroughBlock->predecessors, curBlock->id); in processCanThrow()
1210 BasicBlock *curBlock = dvmCompilerNewBB(kDalvikByteCode, numBlocks++); in dvmCompileMethod() local
1211 curBlock->startOffset = 0; in dvmCompileMethod()
1212 dvmInsertGrowableList(&cUnit.blockList, (intptr_t) curBlock); in dvmCompileMethod()
1213 entryBlock->fallThrough = curBlock; in dvmCompileMethod()
1214 dvmCompilerSetBit(curBlock->predecessors, entryBlock->id); in dvmCompileMethod()
1236 dvmCompilerAppendMIR(curBlock, insn); in dvmCompileMethod()
1242 processCanBranch(&cUnit, curBlock, insn, curOffset, width, flags, in dvmCompileMethod()
1245 curBlock->fallThrough = exitBlock; in dvmCompileMethod()
1246 dvmCompilerSetBit(exitBlock->predecessors, curBlock->id); in dvmCompileMethod()
1267 processCanThrow(&cUnit, curBlock, insn, curOffset, width, flags, in dvmCompileMethod()
1270 processCanSwitch(&cUnit, curBlock, insn, curOffset, width, flags); in dvmCompileMethod()
1287 assert(curBlock->fallThrough == NULL || in dvmCompileMethod()
1288 curBlock->fallThrough == nextBlock || in dvmCompileMethod()
1289 curBlock->fallThrough == exitBlock); in dvmCompileMethod()
1291 if ((curBlock->fallThrough == NULL) && in dvmCompileMethod()
1293 curBlock->fallThrough = nextBlock; in dvmCompileMethod()
1294 dvmCompilerSetBit(nextBlock->predecessors, curBlock->id); in dvmCompileMethod()
1296 curBlock = nextBlock; in dvmCompileMethod()
1359 static bool exhaustTrace(CompilationUnit *cUnit, BasicBlock *curBlock) in exhaustTrace() argument
1361 unsigned int curOffset = curBlock->startOffset; in exhaustTrace()
1364 if (curBlock->visited == true) return false; in exhaustTrace()
1366 curBlock->visited = true; in exhaustTrace()
1368 if (curBlock->blockType == kEntryBlock || in exhaustTrace()
1369 curBlock->blockType == kExitBlock) { in exhaustTrace()
1377 if (curBlock->firstMIRInsn != NULL) { in exhaustTrace()
1379 if (curBlock->taken) in exhaustTrace()
1380 changed |= exhaustTrace(cUnit, curBlock->taken); in exhaustTrace()
1381 if (curBlock->fallThrough) in exhaustTrace()
1382 changed |= exhaustTrace(cUnit, curBlock->fallThrough); in exhaustTrace()
1395 dvmCompilerAppendMIR(curBlock, insn); in exhaustTrace()
1402 curBlock->fallThrough = cUnit->exitBlock; in exhaustTrace()
1403 dvmCompilerSetBit(cUnit->exitBlock->predecessors, curBlock->id); in exhaustTrace()
1406 processCanBranch(cUnit, curBlock, insn, curOffset, width, flags, in exhaustTrace()
1408 if (curBlock->taken) { in exhaustTrace()
1409 exhaustTrace(cUnit, curBlock->taken); in exhaustTrace()
1411 if (curBlock->fallThrough) { in exhaustTrace()
1412 exhaustTrace(cUnit, curBlock->fallThrough); in exhaustTrace()
1431 assert(curBlock->fallThrough == NULL || in exhaustTrace()
1432 curBlock->fallThrough == nextBlock || in exhaustTrace()
1433 curBlock->fallThrough == cUnit->exitBlock); in exhaustTrace()
1435 if ((curBlock->fallThrough == NULL) && in exhaustTrace()
1437 curBlock->needFallThroughBranch = true; in exhaustTrace()
1438 curBlock->fallThrough = nextBlock; in exhaustTrace()
1439 dvmCompilerSetBit(nextBlock->predecessors, curBlock->id); in exhaustTrace()
1445 curBlock = nextBlock; in exhaustTrace()
1485 BasicBlock *curBlock = dvmCompilerNewBB(kDalvikByteCode, numBlocks++); in compileLoop() local
1486 curBlock->startOffset = curOffset; in compileLoop()
1488 dvmInsertGrowableList(&cUnit->blockList, (intptr_t) curBlock); in compileLoop()
1489 entryBlock->fallThrough = curBlock; in compileLoop()
1490 dvmCompilerSetBit(curBlock->predecessors, entryBlock->id); in compileLoop()
1503 changed = exhaustTrace(cUnit, curBlock); in compileLoop()