Lines Matching refs:Insn
20 import com.android.dx.rop.code.Insn;
72 * indexed by register: the insn where said register is defined or null
218 * Gets a new {@code GOTO} insn.
393 for (SsaInsn insn : block.getInsns()) {
394 insn.mapRegisters(mapper);
403 * Returns the insn that defines the given register
405 * @return insn (actual instance from code) that defined this reg or null
420 public void visitMoveInsn (NormalSsaInsn insn) {
421 definitionList[insn.getResult().getReg()] = insn;
426 public void visitNonMoveInsn (NormalSsaInsn insn) {
427 RegisterSpec result = insn.getResult();
429 definitionList[insn.getResult().getReg()] = insn;
453 public void visitMoveInsn (NormalSsaInsn insn) {
454 addToUses(insn);
461 public void visitNonMoveInsn (NormalSsaInsn insn) {
462 addToUses(insn);
465 * Adds specified insn to the uses list for all of its sources.
466 * @param insn {@code non-null;} insn to process
468 private void addToUses(SsaInsn insn) {
469 RegisterSpecList rl = insn.getSources();
473 useList[rl.get(i).getReg()].add(insn);
488 * @param insn {@code non-null;} insn being changed
493 /*package*/ void onSourceChanged(SsaInsn insn,
499 useList[reg].remove(insn);
507 useList[reg].add(insn);
513 * @param insn {@code insn non-null;} insn being changed.
514 * {@code insn.getSources()} must return the new source list.
518 /*package*/ void onSourcesChanged(SsaInsn insn,
523 removeFromUseList(insn, oldSources);
526 RegisterSpecList sources = insn.getSources();
531 useList[reg].add(insn);
536 * Removes a given {@code insn} from the use lists for the given
538 * returned by insn.getSources()).
540 * @param insninsn in question
542 * {@code insn} should be removed form
544 private void removeFromUseList(SsaInsn insn, RegisterSpecList oldSources) {
551 if (!useList[oldSources.get(i).getReg()].remove(insn)) {
558 * Adds an insn to both the use and def lists. For use when adding
559 * a new insn to the method.
561 * @param insn {@code non-null;} insn to add
563 /*package*/ void onInsnAdded(SsaInsn insn) {
564 onSourcesChanged(insn, null);
565 updateOneDefinition(insn, null);
572 * @param insn {@code non-null;} insn to remove
574 /*package*/ void onInsnRemoved(SsaInsn insn) {
576 removeFromUseList(insn, insn.getSources());
579 RegisterSpec resultReg = insn.getResult();
604 * @param insn {@code non-null;} insn who's result should be recorded as
607 * be no longer considered a definition by this insn
609 /*package*/ void updateOneDefinition(SsaInsn insn,
618 RegisterSpec resultReg = insn.getResult();
624 throw new RuntimeException("Duplicate add of insn");
626 definitionList[resultReg.getReg()] = insn;
685 // If not, is there a mark-local insn?
687 Insn insn = use.getOriginalRopInsn();
689 if (insn != null
690 && insn.getOpcode().getOpcode() == RegOps.MARK_LOCAL) {
733 * Visits each phi insn in this method
827 SsaInsn insn = insns.get(i);
829 if (deletedInsns.contains(insn)) {
830 onInsnRemoved(insn);
844 // We managed to eat a throwable insn
846 Insn gotoInsn = new PlainInsn(Rops.GOTO,