Lines Matching refs:bb
241 int collectInfoOfBasicBlock(Method* method, BasicBlock_O1* bb);
242 void dumpVirtualInfoOfBasicBlock(BasicBlock_O1* bb);
246 int codeGenBasicBlock(const Method* method, BasicBlock_O1* bb);
249 int mergeEntry2(BasicBlock_O1* bb);
254 void insertFromVirtualInfo(BasicBlock_O1* bb, int k); //update compileTable
259 bool isFirstOfHandler(BasicBlock_O1* bb);
279 int fakeUsageAtEndOfBB(BasicBlock_O1* bb);
404 void initializeRegStateOfBB(BasicBlock_O1* bb) { in initializeRegStateOfBB() argument
410 if(bb->bb_index > 0) { //non-entry block in initializeRegStateOfBB()
411 if(isFirstOfHandler(bb)) { in initializeRegStateOfBB()
515 BasicBlock_O1* createBasicBlockO1(BasicBlock* bb) { in createBasicBlockO1() argument
517 bb1->jitBasicBlock = bb; in createBasicBlockO1()
523 void preprocessingBB(BasicBlock* bb) { in preprocessingBB() argument
524 currentBB = createBasicBlockO1(bb); in preprocessingBB()
622 int codeGenBasicBlockJit(const Method* method, BasicBlock* bb) { in codeGenBasicBlockJit() argument
626 if(method_bbs_sorted[k]->jitBasicBlock == bb) { in codeGenBasicBlockJit()
635 bb->id, bb->blockType); in codeGenBasicBlockJit()
638 void endOfBasicBlock(BasicBlock* bb) { in endOfBasicBlock() argument
652 int collectInfoOfBasicBlock(Method* method, BasicBlock_O1* bb) { in collectInfoOfBasicBlock() argument
653 bb->num_regs = 0; in collectInfoOfBasicBlock()
654 bb->num_defs = 0; in collectInfoOfBasicBlock()
655 bb->defUseTable = NULL; in collectInfoOfBasicBlock()
656 bb->defUseTail = NULL; in collectInfoOfBasicBlock()
659 bb->endsWithReturn = false; in collectInfoOfBasicBlock()
660 bb->hasAccessToGlue = false; in collectInfoOfBasicBlock()
666 for(mir = bb->jitBasicBlock->firstMIRInsn; mir; mir = mir->next) { in collectInfoOfBasicBlock()
690 bb->hasAccessToGlue = true; in collectInfoOfBasicBlock()
694 bb->endsWithReturn = true; in collectInfoOfBasicBlock()
705 mergeEntry2(bb); //update defUseTable of the basic block in collectInfoOfBasicBlock()
711 bb->pc_end = seqNum; in collectInfoOfBasicBlock()
714 for(kk = 0; kk < bb->num_regs; kk++) { in collectInfoOfBasicBlock()
716 ALOGI("sort virtual reg %d type %d -------", bb->infoBasicBlock[kk].regNum, in collectInfoOfBasicBlock()
717 bb->infoBasicBlock[kk].physicalType); in collectInfoOfBasicBlock()
719 sortAllocConstraint(bb->infoBasicBlock[kk].allocConstraints, in collectInfoOfBasicBlock()
720 bb->infoBasicBlock[kk].allocConstraintsSorted, true); in collectInfoOfBasicBlock()
723 ALOGI("sort constraints for BB %d --------", bb->bb_index); in collectInfoOfBasicBlock()
725 sortAllocConstraint(bb->allocConstraints, bb->allocConstraintsSorted, false); in collectInfoOfBasicBlock()
740 int codeGenBasicBlock(const Method* method, BasicBlock_O1* bb) { argument
746 for(k = 0; k < bb->num_regs; k++) {
747 insertFromVirtualInfo(bb, k);
761 ALOGI("At start of basic block %d (num of VRs %d) -------", bb->bb_index, bb->num_regs);
764 initializeRegStateOfBB(bb);
769 ALOGI("At start of basic block %d (num of VRs %d) -------", bb->bb_index, bb->num_regs);
775 for(mir = bb->jitBasicBlock->firstMIRInsn; mir; mir = mir->next) {
806 ALOGI("before one bytecode %d (num of VRs %d) -------", bb->bb_index, bb->num_regs);
810 bool isConst = getConstInfo(bb); //will reset isConst if a VR is updated by the bytecode
878 updateConstInfo(bb);
906 ALOGI("after one bytecode BB %d (num of VRs %d)", bb->bb_index, bb->num_regs);
967 int mergeEntry2(BasicBlock_O1* bb) { argument
971 int jjend = bb->num_regs;
980 int regA = bb->infoBasicBlock[jj].regNum;
981 LowOpndRegType typeA = bb->infoBasicBlock[jj].physicalType;
986 …bb->infoBasicBlock[jj].accessType = mergeAccess2(bb->infoBasicBlock[jj].accessType, currentInfo.ac…
988 bb->infoBasicBlock[jj].refCount += currentInfo.refCount;
990 currentInfo.num_reaching_defs = bb->infoBasicBlock[jj].num_reaching_defs;
992 currentInfo.reachingDefs[k] = bb->infoBasicBlock[jj].reachingDefs[k];
1000 … bb->infoBasicBlock[jj].allocConstraints[k].count += currentInfo.allocConstraints[k].count;
1005 …tmpType = updateAccess2(tmpType, updateAccess1(bb->infoBasicBlock[jj].accessType, isAPartiallyOver…
1006 …bb->infoBasicBlock[jj].accessType = mergeAccess2(bb->infoBasicBlock[jj].accessType, currentInfo.ac…
1009 …ALOGI("update accessType in case 2: VR %d %d accessType %d", regA, typeA, bb->infoBasicBlock[jj].a…
1028 bb->infoBasicBlock[bb->num_regs].refCount = currentInfo.refCount;
1029 bb->infoBasicBlock[bb->num_regs].physicalType = typeB;
1031 … bb->infoBasicBlock[bb->num_regs].accessType = updateAccess3(tmpType, currentInfo.accessType);
1033 bb->infoBasicBlock[bb->num_regs].accessType = currentInfo.accessType;
1035 …pdate accessType in case 3: VR %d %d accessType %d", regB, typeB, bb->infoBasicBlock[bb->num_regs]…
1037 bb->infoBasicBlock[bb->num_regs].regNum = regB;
1039 bb->infoBasicBlock[bb->num_regs].allocConstraints[k] = currentInfo.allocConstraints[k];
1047 bb->infoBasicBlock[bb->num_regs].num_reaching_defs = currentInfo.num_reaching_defs;
1049 bb->infoBasicBlock[bb->num_regs].reachingDefs[k] = currentInfo.reachingDefs[k];
1052 for(k = 0; k < bb->infoBasicBlock[bb->num_regs].num_reaching_defs; k++)
1057 bb->num_regs++;
1058 if(bb->num_regs >= MAX_REG_PER_BASICBLOCK) {
1447 int fakeUsageAtEndOfBB(BasicBlock_O1* bb) { argument
1453 for(jj = 0; jj < bb->num_regs; jj++) {
1454 int regA = bb->infoBasicBlock[jj].regNum;
1455 LowOpndRegType typeA = bb->infoBasicBlock[jj].physicalType;
1459 currentInfo.num_reaching_defs = bb->infoBasicBlock[jj].num_reaching_defs;
1461 currentInfo.reachingDefs[k] = bb->infoBasicBlock[jj].reachingDefs[k];
2278 int searchVirtualInfoOfBB(LowOpndRegType type, int regNum, BasicBlock_O1* bb);
3153 BasicBlock_O1* bb = currentBB; local
3160 for(mir = bb->jitBasicBlock->firstMIRInsn; mir; mir = mir->next) {
3516 bool isUsedInBB(int regNum, int type, BasicBlock_O1* bb) { argument
3518 for(k = 0; k < bb->num_regs; k++) {
3519 …if(bb->infoBasicBlock[k].physicalType == (type&MASK_FOR_TYPE) && bb->infoBasicBlock[k].regNum == r…
3527 int searchVirtualInfoOfBB(LowOpndRegType type, int regNum, BasicBlock_O1* bb) { argument
3529 for(k = 0; k < bb->num_regs; k++) {
3530 if(bb->infoBasicBlock[k].physicalType == type && bb->infoBasicBlock[k].regNum == regNum)
3585 bool hasExposedUsage2(BasicBlock_O1* bb, int index) { argument
3586 RegAccessType atype = bb->infoBasicBlock[index].accessType;
4515 bool hasExposedUsage(LowOpndRegType type, int regNum, BasicBlock_O1* bb) { argument
4516 int index = searchVirtualInfoOfBB(type, regNum, bb);
4517 if(index >= 0 && hasExposedUsage2(bb, index)) {
4525 bool hasOtherExposedUsage(OpndSize size, int regNum, BasicBlock_O1* bb) { argument
4533 BasicBlock_O1* bb = currentBB; local
4563 hasExp = hasOtherExposedUsage(OpndSize_32, constVRTable[k].regNum, bb);
4650 void insertFromVirtualInfo(BasicBlock_O1* bb, int k) { argument
4651 …int index = searchCompileTable(LowOpndRegType_virtual | bb->infoBasicBlock[k].physicalType, bb->in…
4655 …compileTable[num_compile_entries].physicalType = (LowOpndRegType_virtual | bb->infoBasicBlock[k].p…
4656 compileTable[num_compile_entries].regNum = bb->infoBasicBlock[k].regNum;
4658 compileTable[num_compile_entries].bb = bb;
4661 compileTable[num_compile_entries].gType = bb->infoBasicBlock[k].gType;
4669 compileTable[index].refCount = bb->infoBasicBlock[k].refCount;
4670 compileTable[index].accessType = bb->infoBasicBlock[k].accessType;
4672 compileTable[index].physicalReg_prev = bb->infoBasicBlock[k].physicalReg_GG;
4703 compileTable[num_compile_entries].bb = NULL;
4718 void dumpVirtualInfoOfBasicBlock(BasicBlock_O1* bb) { argument
4720 ALOGI("Virtual Info for BB%d --------", bb->bb_index);
4721 for(jj = 0; jj < bb->num_regs; jj++) {
4723 bb->infoBasicBlock[jj].regNum, bb->infoBasicBlock[jj].physicalType,
4724 bb->infoBasicBlock[jj].accessType, bb->infoBasicBlock[jj].refCount);
4726 for(k = 0; k < bb->infoBasicBlock[jj].num_reaching_defs; k++)
4727 ALOGI("[%x %d %d %d] ", bb->infoBasicBlock[jj].reachingDefs[k].offsetPC,
4728 bb->infoBasicBlock[jj].reachingDefs[k].regNum,
4729 bb->infoBasicBlock[jj].reachingDefs[k].physicalType,
4730 bb->infoBasicBlock[jj].reachingDefs[k].accessType);
4750 bool isFirstOfHandler(BasicBlock_O1* bb) { argument
4753 if(bb->pc_start == exceptionHandlers[i]) return true;
4762 BasicBlock_O1* bb = (BasicBlock_O1*)malloc(sizeof(BasicBlock_O1)); local
4763 if(bb == NULL) {
4767 bb->pc_start = src_pc;
4768 bb->bb_index = num_bbs_for_method;
4769 if(bb_entry == NULL) bb_entry = bb;
4780 method_bbs_sorted[num_bbs_for_method] = bb;
4785 method_bbs_sorted[index] = bb;
4792 return bb;