/** * Performs initial creation of output instructions based on the * original blocks. */ private void outputInstructions() { BasicBlockList blocks = method.getBlocks(); int[] order = this.order; int len = order.length; // Process the blocks in output order. for (int i = 0; i < len; i++) { int nextI = i + 1; int nextLabel = (nextI == order.length) ? -1 : order[nextI]; outputBlock(blocks.labelToBlock(order[i]), nextLabel); } }
/** * Performs initial creation of output instructions based on the * original blocks. */ private void outputInstructions() { BasicBlockList blocks = method.getBlocks(); int[] order = this.order; int len = order.length; // Process the blocks in output order. for (int i = 0; i < len; i++) { int nextI = i + 1; int nextLabel = (nextI == order.length) ? -1 : order[nextI]; outputBlock(blocks.labelToBlock(order[i]), nextLabel); } }
/** * Performs initial creation of output instructions based on the * original blocks. */ private void outputInstructions() { BasicBlockList blocks = method.getBlocks(); int[] order = this.order; int len = order.length; // Process the blocks in output order. for (int i = 0; i < len; i++) { int nextI = i + 1; int nextLabel = (nextI == order.length) ? -1 : order[nextI]; outputBlock(blocks.labelToBlock(order[i]), nextLabel); } }
/** * Performs initial creation of output instructions based on the * original blocks. */ private void outputInstructions() { BasicBlockList blocks = method.getBlocks(); int[] order = this.order; int len = order.length; // Process the blocks in output order. for (int i = 0; i < len; i++) { int nextI = i + 1; int nextLabel = (nextI == order.length) ? -1 : order[nextI]; outputBlock(blocks.labelToBlock(order[i]), nextLabel); } }
/** * Performs initial creation of output instructions based on the * original blocks. */ private void outputInstructions() { BasicBlockList blocks = method.getBlocks(); int[] order = this.order; int len = order.length; // Process the blocks in output order. for (int i = 0; i < len; i++) { int nextI = i + 1; int nextLabel = (nextI == order.length) ? -1 : order[nextI]; outputBlock(blocks.labelToBlock(order[i]), nextLabel); } }
/** * Performs initial creation of output instructions based on the * original blocks. */ private void outputInstructions() { BasicBlockList blocks = method.getBlocks(); int[] order = this.order; int len = order.length; // Process the blocks in output order. for (int i = 0; i < len; i++) { int nextI = i + 1; int nextLabel = (nextI == order.length) ? -1 : order[nextI]; outputBlock(blocks.labelToBlock(order[i]), nextLabel); } }
/** * Performs initial creation of output instructions based on the * original blocks. */ private void outputInstructions() { BasicBlockList blocks = method.getBlocks(); int[] order = this.order; int len = order.length; // Process the blocks in output order. for (int i = 0; i < len; i++) { int nextI = i + 1; int nextLabel = (nextI == order.length) ? -1 : order[nextI]; outputBlock(blocks.labelToBlock(order[i]), nextLabel); } }
/** * Performs initial creation of output instructions based on the * original blocks. */ private void outputInstructions() { BasicBlockList blocks = method.getBlocks(); int[] order = this.order; int len = order.length; // Process the blocks in output order. for (int i = 0; i < len; i++) { int nextI = i + 1; int nextLabel = (nextI == order.length) ? -1 : order[nextI]; outputBlock(blocks.labelToBlock(order[i]), nextLabel); } }
/** * Combines blocks proven identical into one alpha block, re-writing * all of the successor links that point to the beta blocks to point * to the alpha block instead. * * @param alphaLabel block that will replace all the beta block * @param betaLabels label list of blocks to combine */ private void combineBlocks(int alphaLabel, IntList betaLabels) { int szBetas = betaLabels.size(); for (int i = 0; i < szBetas; i++) { int betaLabel = betaLabels.get(i); BasicBlock bb = blocks.labelToBlock(betaLabel); IntList preds = ropMethod.labelToPredecessors(bb.getLabel()); int szPreds = preds.size(); for (int j = 0; j < szPreds; j++) { BasicBlock predBlock = newBlocks.labelToBlock(preds.get(j)); replaceSucc(predBlock, betaLabel, alphaLabel); } } }
/** * Combines blocks proven identical into one alpha block, re-writing * all of the successor links that point to the beta blocks to point * to the alpha block instead. * * @param alphaLabel block that will replace all the beta block * @param betaLabels label list of blocks to combine */ private void combineBlocks(int alphaLabel, IntList betaLabels) { int szBetas = betaLabels.size(); for (int i = 0; i < szBetas; i++) { int betaLabel = betaLabels.get(i); BasicBlock bb = blocks.labelToBlock(betaLabel); IntList preds = ropMethod.labelToPredecessors(bb.getLabel()); int szPreds = preds.size(); for (int j = 0; j < szPreds; j++) { BasicBlock predBlock = newBlocks.labelToBlock(preds.get(j)); replaceSucc(predBlock, betaLabel, alphaLabel); } } }
/** * Combines blocks proven identical into one alpha block, re-writing * all of the successor links that point to the beta blocks to point * to the alpha block instead. * * @param alphaLabel block that will replace all the beta block * @param betaLabels label list of blocks to combine */ private void combineBlocks(int alphaLabel, IntList betaLabels) { int szBetas = betaLabels.size(); for (int i = 0; i < szBetas; i++) { int betaLabel = betaLabels.get(i); BasicBlock bb = blocks.labelToBlock(betaLabel); IntList preds = ropMethod.labelToPredecessors(bb.getLabel()); int szPreds = preds.size(); for (int j = 0; j < szPreds; j++) { BasicBlock predBlock = newBlocks.labelToBlock(preds.get(j)); replaceSucc(predBlock, betaLabel, alphaLabel); } } }
/** * Combines blocks proven identical into one alpha block, re-writing * all of the successor links that point to the beta blocks to point * to the alpha block instead. * * @param alphaLabel block that will replace all the beta block * @param betaLabels label list of blocks to combine */ private void combineBlocks(int alphaLabel, IntList betaLabels) { int szBetas = betaLabels.size(); for (int i = 0; i < szBetas; i++) { int betaLabel = betaLabels.get(i); BasicBlock bb = blocks.labelToBlock(betaLabel); IntList preds = ropMethod.labelToPredecessors(bb.getLabel()); int szPreds = preds.size(); for (int j = 0; j < szPreds; j++) { BasicBlock predBlock = newBlocks.labelToBlock(preds.get(j)); replaceSucc(predBlock, betaLabel, alphaLabel); } } }
/** * Combines blocks proven identical into one alpha block, re-writing * all of the successor links that point to the beta blocks to point * to the alpha block instead. * * @param alphaLabel block that will replace all the beta block * @param betaLabels label list of blocks to combine */ private void combineBlocks(int alphaLabel, IntList betaLabels) { int szBetas = betaLabels.size(); for (int i = 0; i < szBetas; i++) { int betaLabel = betaLabels.get(i); BasicBlock bb = blocks.labelToBlock(betaLabel); IntList preds = ropMethod.labelToPredecessors(bb.getLabel()); int szPreds = preds.size(); for (int j = 0; j < szPreds; j++) { BasicBlock predBlock = newBlocks.labelToBlock(preds.get(j)); replaceSucc(predBlock, betaLabel, alphaLabel); } } }
/** * Combines blocks proven identical into one alpha block, re-writing * all of the successor links that point to the beta blocks to point * to the alpha block instead. * * @param alphaLabel block that will replace all the beta block * @param betaLabels label list of blocks to combine */ private void combineBlocks(int alphaLabel, IntList betaLabels) { int szBetas = betaLabels.size(); for (int i = 0; i < szBetas; i++) { int betaLabel = betaLabels.get(i); BasicBlock bb = blocks.labelToBlock(betaLabel); IntList preds = ropMethod.labelToPredecessors(bb.getLabel()); int szPreds = preds.size(); for (int j = 0; j < szPreds; j++) { BasicBlock predBlock = newBlocks.labelToBlock(preds.get(j)); replaceSucc(predBlock, betaLabel, alphaLabel); } } }
/** * Combines blocks proven identical into one alpha block, re-writing * all of the successor links that point to the beta blocks to point * to the alpha block instead. * * @param alphaLabel block that will replace all the beta block * @param betaLabels label list of blocks to combine */ private void combineBlocks(int alphaLabel, IntList betaLabels) { int szBetas = betaLabels.size(); for (int i = 0; i < szBetas; i++) { int betaLabel = betaLabels.get(i); BasicBlock bb = blocks.labelToBlock(betaLabel); IntList preds = ropMethod.labelToPredecessors(bb.getLabel()); int szPreds = preds.size(); for (int j = 0; j < szPreds; j++) { BasicBlock predBlock = newBlocks.labelToBlock(preds.get(j)); replaceSucc(predBlock, betaLabel, alphaLabel); } } }
/** * Looks forward to the current block's primary successor, returning * the RegisterSpec of the result of the move-result-pseudo at the * top of that block or null if none. * * @return {@code null-ok;} result of move-result-pseudo at the beginning of * primary successor */ private RegisterSpec getNextMoveResultPseudo() { int label = block.getPrimarySuccessor(); if (label < 0) { return null; } Insn insn = method.getBlocks().labelToBlock(label).getInsns().get(0); if (insn.getOpcode().getOpcode() != RegOps.MOVE_RESULT_PSEUDO) { return null; } else { return insn.getResult(); } }
/** * Looks forward to the current block's primary successor, returning * the RegisterSpec of the result of the move-result-pseudo at the * top of that block or null if none. * * @return {@code null-ok;} result of move-result-pseudo at the beginning of * primary successor */ private RegisterSpec getNextMoveResultPseudo() { int label = block.getPrimarySuccessor(); if (label < 0) { return null; } Insn insn = method.getBlocks().labelToBlock(label).getInsns().get(0); if (insn.getOpcode().getOpcode() != RegOps.MOVE_RESULT_PSEUDO) { return null; } else { return insn.getResult(); } }
/** * Looks forward to the current block's primary successor, returning * the RegisterSpec of the result of the move-result-pseudo at the * top of that block or null if none. * * @return {@code null-ok;} result of move-result-pseudo at the beginning of * primary successor */ private RegisterSpec getNextMoveResultPseudo() { int label = block.getPrimarySuccessor(); if (label < 0) { return null; } Insn insn = method.getBlocks().labelToBlock(label).getInsns().get(0); if (insn.getOpcode().getOpcode() != RegOps.MOVE_RESULT_PSEUDO) { return null; } else { return insn.getResult(); } }
/** * Looks forward to the current block's primary successor, returning * the RegisterSpec of the result of the move-result-pseudo at the * top of that block or null if none. * * @return {@code null-ok;} result of move-result-pseudo at the beginning of * primary successor */ private RegisterSpec getNextMoveResultPseudo() { int label = block.getPrimarySuccessor(); if (label < 0) { return null; } Insn insn = method.getBlocks().labelToBlock(label).getInsns().get(0); if (insn.getOpcode().getOpcode() != RegOps.MOVE_RESULT_PSEUDO) { return null; } else { return insn.getResult(); } }
/** * Looks forward to the current block's primary successor, returning * the RegisterSpec of the result of the move-result-pseudo at the * top of that block or null if none. * * @return {@code null-ok;} result of move-result-pseudo at the beginning of * primary successor */ private RegisterSpec getNextMoveResultPseudo() { int label = block.getPrimarySuccessor(); if (label < 0) { return null; } Insn insn = method.getBlocks().labelToBlock(label).getInsns().get(0); if (insn.getOpcode().getOpcode() != RegOps.MOVE_RESULT_PSEUDO) { return null; } else { return insn.getResult(); } }