/dalvik/dx/src/com/android/dx/ssa/ |
D | Optimizer.java | 93 SsaMethod ssaMeth = null; in optimize() local 98 ssaMeth = SsaConverter.convertToSsaMethod(rmeth, paramWidth, isStatic); in optimize() 99 runSsaFormSteps(ssaMeth, steps); in optimize() 101 RopMethod resultMeth = SsaToRop.convertToRopMethod(ssaMeth, false); in optimize() 130 SsaMethod ssaMeth; in optimizeMinimizeRegisters() local 133 ssaMeth = SsaConverter.convertToSsaMethod( in optimizeMinimizeRegisters() 144 runSsaFormSteps(ssaMeth, newSteps); in optimizeMinimizeRegisters() 146 resultMeth = SsaToRop.convertToRopMethod(ssaMeth, true); in optimizeMinimizeRegisters() 150 private static void runSsaFormSteps(SsaMethod ssaMeth, in runSsaFormSteps() argument 155 MoveParamCombiner.process(ssaMeth); in runSsaFormSteps() [all …]
|
D | MoveParamCombiner.java | 34 private final SsaMethod ssaMeth; field in MoveParamCombiner 45 private MoveParamCombiner(SsaMethod ssaMeth) { in MoveParamCombiner() argument 46 this.ssaMeth = ssaMeth; in MoveParamCombiner() 55 = new RegisterSpec[ssaMeth.getParamWidth()]; in run() 60 ssaMeth.forEachInsn(new SsaInsn.Visitor() { in run() 102 ssaMeth.getDefinitionForRegister(specA.getReg()) in run() 113 return ssaMeth.getRegCount(); in run() 128 = ssaMeth.getUseListForRegister(specB.getReg()); in run() 142 ssaMeth.deleteInsns(deletedInsns); in run()
|
D | PhiTypeResolver.java | 45 SsaMethod ssaMeth; field in PhiTypeResolver 53 public static void process (SsaMethod ssaMeth) { in process() argument 54 new PhiTypeResolver(ssaMeth).run(); in process() 57 private PhiTypeResolver(SsaMethod ssaMeth) { in PhiTypeResolver() argument 58 this.ssaMeth = ssaMeth; in PhiTypeResolver() 59 worklist = new BitSet(ssaMeth.getRegCount()); in PhiTypeResolver() 67 int regCount = ssaMeth.getRegCount(); in run() 70 SsaInsn definsn = ssaMeth.getDefinitionForRegister(reg); in run() 86 PhiInsn definsn = (PhiInsn)ssaMeth.getDefinitionForRegister(reg); in run() 94 List<SsaInsn> useList = ssaMeth.getUseListForRegister(reg); in run() [all …]
|
D | DeadCodeRemover.java | 33 private final SsaMethod ssaMeth; field in DeadCodeRemover 63 this.ssaMeth = ssaMethod; in DeadCodeRemover() 67 useList = ssaMeth.getUseListCopy(); in DeadCodeRemover() 78 ssaMeth.forEachInsn(new NoSideEffectVisitor(worklist)); in run() 88 SsaInsn insnS = ssaMeth.getDefinitionForRegister(regV); in run() 104 ssaMeth.getDefinitionForRegister( in run() 119 ssaMeth.deleteInsns(deletedInsns); in run() 128 BitSet reachable = ssaMeth.computeReachability(); in pruneDeadInstructions() 129 ArrayList<SsaBasicBlock> blocks = ssaMeth.getBlocks(); in pruneDeadInstructions() 165 ssaMeth.deleteInsns(deletedInsns); in pruneDeadInstructions()
|
D | ConstCollector.java | 66 private final SsaMethod ssaMeth; field in ConstCollector 84 this.ssaMeth = ssaMethod; in ConstCollector() 91 int regSz = ssaMeth.getRegCount(); in run() 98 SsaBasicBlock start = ssaMeth.getEntryBlock(); in run() 107 = RegisterSpec.make(ssaMeth.makeNewSsaReg(), cst); in run() 118 SsaBasicBlock entryBlock = ssaMeth.getEntryBlock(); in run() 158 int regSz = ssaMeth.getRegCount(); in getConstsSortedByCountUse() 172 SsaInsn insn = ssaMeth.getDefinitionForRegister(i); in getConstsSortedByCountUse() 187 predInsns = ssaMeth.getBlocks().get(pred).getInsns(); in getConstsSortedByCountUse() 212 if (ssaMeth.isRegALocal(result)) { in getConstsSortedByCountUse() [all …]
|
D | SsaRenamer.java | 66 private final SsaMethod ssaMeth; field in SsaRenamer 100 public SsaRenamer(SsaMethod ssaMeth) { in SsaRenamer() argument 101 ropRegCount = ssaMeth.getRegCount(); in SsaRenamer() 103 this.ssaMeth = ssaMeth; in SsaRenamer() 111 startsForBlocks = new RegisterSpec[ssaMeth.getBlocks().size()][]; in SsaRenamer() 142 startsForBlocks[ssaMeth.getEntryBlockIndex()] = initialRegMapping; in SsaRenamer() 152 public SsaRenamer(SsaMethod ssaMeth, int thresh) { in SsaRenamer() argument 153 this(ssaMeth); in SsaRenamer() 164 ssaMeth.forEachBlockDepthFirstDom(new SsaBasicBlock.Visitor() { in run() 172 ssaMeth.setNewRegCount(nextSsaReg); in run() [all …]
|
D | SsaConverter.java | 70 public static void updateSsaMethod(SsaMethod ssaMeth, int threshold) { in updateSsaMethod() argument 71 LocalVariableInfo localInfo = LocalVariableExtractor.extract(ssaMeth); in updateSsaMethod() 72 placePhiFunctions(ssaMeth, localInfo, threshold); in updateSsaMethod() 73 new SsaRenamer(ssaMeth, threshold).run(); in updateSsaMethod() 186 private static void edgeSplitMoveExceptionsAndResults(SsaMethod ssaMeth) { in edgeSplitMoveExceptionsAndResults() argument 187 ArrayList<SsaBasicBlock> blocks = ssaMeth.getBlocks(); in edgeSplitMoveExceptionsAndResults() 299 private static void placePhiFunctions (SsaMethod ssaMeth, in placePhiFunctions() argument 305 ssaBlocks = ssaMeth.getBlocks(); in placePhiFunctions() 307 regCount = ssaMeth.getRegCount() - threshold; in placePhiFunctions() 309 DomFront df = new DomFront(ssaMeth); in placePhiFunctions()
|
D | EscapeAnalysis.java | 100 private final SsaMethod ssaMeth; field in EscapeAnalysis 111 private EscapeAnalysis(SsaMethod ssaMeth) { in EscapeAnalysis() argument 112 this.ssaMeth = ssaMeth; in EscapeAnalysis() 113 this.regCount = ssaMeth.getRegCount(); in EscapeAnalysis() 144 ArrayList<SsaInsn> predInsns = ssaMeth.getBlocks().get(pred).getInsns(); in getInsnForMove() 157 ArrayList<SsaInsn> succInsns = ssaMeth.getBlocks().get(succ).getInsns(); in getMoveForInsn() 331 List<SsaInsn> useList = ssaMeth.getUseListForRegister(def.getReg()); in processRegister() 485 SsaInsn def = ssaMeth.getDefinitionForRegister(e); in scalarReplacement() 503 List<SsaInsn> useList = ssaMeth.getUseListForRegister(e); in scalarReplacement() 511 ssaMeth.deleteInsns(deletedInsns); in scalarReplacement() [all …]
|
D | LiteralOpUpgrader.java | 43 private final SsaMethod ssaMeth; field in LiteralOpUpgrader 59 this.ssaMeth = ssaMethod; in LiteralOpUpgrader() 84 ssaMeth.forEachInsn(new SsaInsn.Visitor() { in run() 153 if (result != null && !ssaMeth.isRegALocal(result) && in tryReplacingWithConstant() 165 ssaMeth.getBlocks().get(pred).getInsns(); in tryReplacingWithConstant() 205 ssaMeth.onInsnRemoved(insn); in replacePlainInsn() 207 ssaMeth.onInsnAdded(newInsn); in replacePlainInsn()
|
D | SCCP.java | 45 private final SsaMethod ssaMeth; field in SCCP 69 private SCCP(SsaMethod ssaMeth) { in SCCP() argument 70 this.ssaMeth = ssaMeth; in SCCP() 71 this.regCount = ssaMeth.getRegCount(); in SCCP() 76 this.executableBlocks = new BitSet(ssaMeth.getBlocks().size()); in SCCP() 115 for (SsaInsn insn : ssaMeth.getUseListForRegister(reg)) { in addUsersToWorklist() 119 for (SsaInsn insn : ssaMeth.getUseListForRegister(reg)) { in addUsersToWorklist() 254 if (!ssaMeth.isRegALocal(specA) && in simulateBranch() 262 if (!ssaMeth.isRegALocal(specB) && in simulateBranch() 348 addBlockToWorklist(ssaMeth.getBlocks().get(successorBlock)); in simulateBranch() [all …]
|
D | PhiInsn.java | 94 public void updateSourcesToDefinitions(SsaMethod ssaMeth) { in updateSourcesToDefinitions() argument 97 = ssaMeth.getDefinitionForRegister( in updateSourcesToDefinitions() 300 public List<SsaBasicBlock> predBlocksForReg(int reg, SsaMethod ssaMeth) { in predBlocksForReg() argument 305 ret.add(ssaMeth.getBlocks().get(o.blockIndex)); in predBlocksForReg()
|
/dalvik/dx/src/com/android/dx/ssa/back/ |
D | SsaToRop.java | 48 private final SsaMethod ssaMeth; field in SsaToRop 67 public static RopMethod convertToRopMethod(SsaMethod ssaMeth, in convertToRopMethod() argument 69 return new SsaToRop(ssaMeth, minimizeRegisters).convert(); in convertToRopMethod() 81 this.ssaMeth = ssaMethod; in SsaToRop() 101 new FirstFitLocalCombiningAllocator(ssaMeth, interference, in convert() 111 ssaMeth.setBackMode(); in convert() 113 ssaMeth.mapRegisters(mapper); in convert() 124 ssaMeth.blockIndexToRopLabel(ssaMeth.getEntryBlockIndex())); in convert() 139 final ArrayList<SsaBasicBlock> blocks = ssaMeth.getBlocks(); in removeEmptyGotos() 141 ssaMeth.forEachBlockDepthFirst(false, new SsaBasicBlock.Visitor() { in removeEmptyGotos() [all …]
|
D | LivenessAnalyzer.java | 57 private final SsaMethod ssaMeth; field in LivenessAnalyzer 89 SsaMethod ssaMeth) { in constructInterferenceGraph() argument 90 int szRegs = ssaMeth.getRegCount(); in constructInterferenceGraph() 94 new LivenessAnalyzer(ssaMeth, i, interference).run(); in constructInterferenceGraph() 97 coInterferePhis(ssaMeth, interference); in constructInterferenceGraph() 111 private LivenessAnalyzer(SsaMethod ssaMeth, int reg, in LivenessAnalyzer() argument 113 int blocksSz = ssaMeth.getBlocks().size(); in LivenessAnalyzer() 115 this.ssaMeth = ssaMeth; in LivenessAnalyzer() 154 List<SsaInsn> useList = ssaMeth.getUseListForRegister(regV); in run() 164 phi.predBlocksForReg(regV, ssaMeth)) { in run() [all …]
|
D | RegisterAllocator.java | 39 protected final SsaMethod ssaMeth; field in RegisterAllocator 50 public RegisterAllocator(SsaMethod ssaMeth, in RegisterAllocator() argument 52 this.ssaMeth = ssaMeth; in RegisterAllocator() 80 SsaInsn definition = ssaMeth.getDefinitionForRegister(reg); in getCategoryForSsaReg() 98 SsaInsn definition = ssaMeth.getDefinitionForRegister(reg); in getDefinitionSpecForSsaReg() 111 SsaInsn defInsn = ssaMeth.getDefinitionForRegister(reg); in isDefinitionMoveParam() 159 RegisterSpec newRegSpec = RegisterSpec.make(ssaMeth.makeNewSsaReg(), in insertMoveBefore() 191 ssaMeth.onInsnsChanged(); in insertMoveBefore()
|
D | FirstFitAllocator.java | 46 final SsaMethod ssaMeth, final InterferenceGraph interference) { in FirstFitAllocator() argument 47 super(ssaMeth, interference); in FirstFitAllocator() 49 mapped = new BitSet(ssaMeth.getRegCount()); in FirstFitAllocator() 61 int oldRegCount = ssaMeth.getRegCount(); in allocateRegisters() 75 nextNewRegister = ssaMeth.getParamWidth(); in allocateRegisters() 95 ssaMeth.getDefinitionForRegister(i); in allocateRegisters()
|
D | NullRegisterAllocator.java | 30 public NullRegisterAllocator(SsaMethod ssaMeth, in NullRegisterAllocator() argument 32 super(ssaMeth, interference); in NullRegisterAllocator() 45 int oldRegCount = ssaMeth.getRegCount(); in allocateRegisters()
|
D | FirstFitLocalCombiningAllocator.java | 133 SsaMethod ssaMeth, InterferenceGraph interference, in FirstFitLocalCombiningAllocator() argument 135 super(ssaMeth, interference); in FirstFitLocalCombiningAllocator() 137 ssaRegsMapped = new BitSet(ssaMeth.getRegCount()); in FirstFitLocalCombiningAllocator() 140 interference, ssaMeth.getRegCount()); in FirstFitLocalCombiningAllocator() 150 paramRangeEnd = ssaMeth.getParamWidth(); in FirstFitLocalCombiningAllocator() 265 SsaInsn defInsn = ssaMeth.getDefinitionForRegister(ssaReg); in getParameterIndexForReg() 409 return startReg == 0 && !ssaMeth.isStatic(); in isThisPointerReg() 504 int szSsaRegs = ssaMeth.getRegCount(); in handleUnassociatedParameters() 547 ssaMeth.getBlocks().get(predBlocks.nextSetBit(0)); in handleCheckCastResults() 622 int szSsaRegs = ssaMeth.getRegCount(); in handleNormalUnassociated() [all …]
|
/dalvik/dx/src/com/android/dx/command/dump/ |
D | SsaDumper.java | 94 SsaMethod ssaMeth = null; in endParsingMember() local 99 ssaMeth = Optimizer.debugNoRegisterAllocation(rmeth, in endParsingMember() 103 ssaMeth = Optimizer.debugEdgeSplit(rmeth, paramWidth, in endParsingMember() 106 ssaMeth = Optimizer.debugPhiPlacement( in endParsingMember() 109 ssaMeth = Optimizer.debugRenaming( in endParsingMember() 112 ssaMeth = Optimizer.debugDeadCodeRemover( in endParsingMember() 120 ssaMeth.blockIndexToRopLabel(ssaMeth.getEntryBlockIndex()))); in endParsingMember() 123 ArrayList<SsaBasicBlock> blocks = ssaMeth.getBlocks(); in endParsingMember() 137 sb.append(Hex.u2(ssaMeth.blockIndexToRopLabel(i))); in endParsingMember()
|