Home | History | Annotate | Download | only in compiler

Lines Matching full:cunit

811 int dvmConvertSSARegToDalvik(const CompilationUnit *cUnit, int ssaReg)
813 return GET_ELEM_N(cUnit->ssaToDalvikMap, int, ssaReg);
909 char *getSSAName(const CompilationUnit *cUnit, int ssaReg, char *name)
911 int ssa2DalvikValue = dvmConvertSSARegToDalvik(cUnit, ssaReg);
921 char *dvmCompilerFullDisassembler(const CompilationUnit *cUnit,
937 getSSAName(cUnit, mir->ssaRep->defs[0], operand0),
938 getSSAName(cUnit, mir->ssaRep->uses[0], operand1));
942 getSSAName(cUnit, mir->ssaRep->uses[i], operand0));
962 getSSAName(cUnit, mir->ssaRep->uses[0], operand0));
967 getSSAName(cUnit, mir->ssaRep->uses[0], operand0),
968 getSSAName(cUnit, mir->ssaRep->uses[1], operand1));
988 getSSAName(cUnit, mir->ssaRep->uses[i], operand0));
996 getSSAName(cUnit, mir->ssaRep->defs[udIdx], operand0));
1003 getSSAName(cUnit, mir->ssaRep->uses[0], operand0));
1006 getSSAName(cUnit, mir->ssaRep->uses[udIdx], operand0));
1051 char *dvmCompilerGetSSAString(CompilationUnit *cUnit, SSARepresentation *ssaRep)
1059 int ssa2DalvikValue = dvmConvertSSARegToDalvik(cUnit, ssaRep->defs[i]);
1071 int ssa2DalvikValue = dvmConvertSSARegToDalvik(cUnit, ssaRep->uses[i]);
1108 bool dvmCompilerFindLocalLiveIn(CompilationUnit *cUnit, BasicBlock *bb)
1116 dvmCompilerAllocBitVector(cUnit->numDalvikRegisters, false);
1118 dvmCompilerAllocBitVector(cUnit->numDalvikRegisters, false);
1120 dvmCompilerAllocBitVector(cUnit->numDalvikRegisters, false);
1158 static void handleSSAUse(CompilationUnit *cUnit, int *uses, int dalvikReg,
1161 int encodedValue = cUnit->dalvikToSSAMap[dalvikReg];
1167 static void handleSSADef(CompilationUnit *cUnit, int *defs, int dalvikReg,
1170 int encodedValue = cUnit->dalvikToSSAMap[dalvikReg];
1171 int ssaReg = cUnit->numSSARegs++;
1176 cUnit->dalvikToSSAMap[dalvikReg] = newD2SMapping;
1179 dvmInsertGrowableList(cUnit->ssaToDalvikMap, newS2DMapping);
1185 static void dataFlowSSAFormat35C(CompilationUnit *cUnit, MIR *mir)
1195 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->arg[i], i);
1200 static void dataFlowSSAFormat3RC(CompilationUnit *cUnit, MIR *mir)
1210 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vC+i, i);
1215 bool dvmCompilerDoSSAConversion(CompilationUnit *cUnit, BasicBlock *bb)
1231 dataFlowSSAFormat35C(cUnit, mir);
1236 dataFlowSSAFormat3RC(cUnit, mir);
1289 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vA, numUses++);
1292 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vA, numUses++);
1294 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vA+1, numUses++);
1298 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vB, numUses++);
1301 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vB, numUses++);
1303 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vB+1, numUses++);
1307 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vC, numUses++);
1310 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vC, numUses++);
1312 handleSSAUse(cUnit, mir->ssaRep->uses, dInsn->vC+1, numUses++);
1317 handleSSADef(cUnit, mir->ssaRep->defs, dInsn->vA, 0);
1320 handleSSADef(cUnit, mir->ssaRep->defs, dInsn->vA+1, 1);
1331 (int *)dvmCompilerNew(sizeof(int) * cUnit->method->registersSize,
1334 memcpy(bb->dataFlowInfo->dalvikToSSAMap, cUnit->dalvikToSSAMap,
1335 sizeof(int) * cUnit->method->registersSize);
1340 static void setConstant(CompilationUnit *cUnit, int ssaReg, int value)
1342 dvmSetBit(cUnit->isConstantV, ssaReg);
1343 cUnit->constantValues[ssaReg] = value;
1346 bool dvmCompilerDoConstantPropagation(CompilationUnit *cUnit, BasicBlock *bb)
1349 BitVector *isConstantV = cUnit->isConstantV;
1366 setConstant(cUnit, mir->ssaRep->defs[0], dInsn->vB);
1369 setConstant(cUnit, mir->ssaRep->defs[0],
1379 setConstant(cUnit, mir->ssaRep->defs[0], dInsn->vB);
1380 setConstant(cUnit, mir->ssaRep->defs[1], 0);
1383 setConstant(cUnit, mir->ssaRep->defs[0],
1385 setConstant(cUnit, mir->ssaRep->defs[1],
1389 setConstant(cUnit, mir->ssaRep->defs[0], 0);
1390 setConstant(cUnit, mir->ssaRep->defs[1],
1406 setConstant(cUnit, mir->ssaRep->defs[0],
1407 cUnit->constantValues[mir->ssaRep->uses[0]]);
1409 setConstant(cUnit, mir->ssaRep->defs[1],
1410 cUnit->constantValues[mir->ssaRep->uses[1]]);
1419 bool dvmCompilerFindInductionVariables(struct CompilationUnit *cUnit,
1422 BitVector *isIndVarV = cUnit->loopAnalysis->isIndVarV;
1423 BitVector *isConstantV = cUnit->isConstantV;
1424 GrowableList *ivList = cUnit->loopAnalysis->ivList;
1464 cUnit->constantValues[mir->ssaRep->uses[1]];
1472 -cUnit->constantValues[mir->ssaRep->uses[1]];
1495 cUnit->loopAnalysis->numBasicIV++;
1518 int srcDalvikReg = dvmConvertSSARegToDalvik(cUnit,
1520 int dstDalvikReg = dvmConvertSSARegToDalvik(cUnit,
1530 c = cUnit->constantValues[mir->ssaRep->uses[1]];
1537 c = -cUnit->constantValues[mir->ssaRep->uses[1]];
1551 cUnit->loopAnalysis->ssaBIV = mir->ssaRep->defs[0];
1584 void dvmInitializeSSAConversion(CompilationUnit *cUnit)
1587 int numDalvikReg = cUnit->method->registersSize;
1589 cUnit->ssaToDalvikMap = (GrowableList *)dvmCompilerNew(sizeof(GrowableList),
1591 dvmInitGrowableList(cUnit->ssaToDalvikMap, numDalvikReg);
1597 cUnit->numSSARegs = numDalvikReg;
1605 dvmInsertGrowableList(cUnit->ssaToDalvikMap, ENCODE_REG_SUB(i, 0));
1613 cUnit->dalvikToSSAMap = (int *)dvmCompilerNew(sizeof(int) * numDalvikReg,
1616 cUnit->dalvikToSSAMap[i] = i;
1624 dvmGrowableListIteratorInit(&cUnit
1641 bool dvmCompilerClearVisitedFlag(struct CompilationUnit *cUnit,
1648 void dvmCompilerDataFlowAnalysisDispatcher(CompilationUnit *cUnit,
1661 dvmGrowableListIteratorInit(&cUnit->blockList, &iterator);
1667 change |= (*func)(cUnit, bb);
1675 int numReachableBlocks = cUnit->numReachableBlocks;
1677 const GrowableList *blockList = &cUnit->blockList;
1680 int blockIdx = cUnit->dfsOrder.elemList[idx];
1684 change |= (*func)(cUnit, bb);
1692 int numReachableBlocks = cUnit->numReachableBlocks;
1694 const GrowableList *blockList = &cUnit->blockList;
1697 int dfsIdx = cUnit->dfsOrder.elemList[idx];
1700 change |= (*func)(cUnit, bb);
1708 int numReachableBlocks = cUnit->numReachableBlocks;
1710 const GrowableList *blockList = &cUnit->blockList;
1713 int dfsIdx = cUnit->dfsOrder.elemList[idx];
1716 change |= (*func)(cUnit, bb);
1724 int numReachableBlocks = cUnit->numReachableBlocks;
1726 const GrowableList *blockList = &cUnit->blockList;
1729 int domIdx = cUnit->domPostOrderTraversal.elemList[idx];
1732 change |= (*func)(cUnit, bb);
1741 void dvmCompilerNonLoopAnalysis(CompilationUnit *cUnit)
1743 dvmCompilerDataFlowAnalysisDispatcher(cUnit, dvmCompilerDoSSAConversion,