com.android.dx.ssa.RegisterMapper Java Examples

The following examples show how to use com.android.dx.ssa.RegisterMapper. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NullRegisterAllocator.java    From buck with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {
    int oldRegCount = ssaMeth.getRegCount();

    BasicRegisterMapper mapper = new BasicRegisterMapper(oldRegCount);

    for (int i = 0; i < oldRegCount; i++) {
        mapper.addMapping(i, i*2, 2);
    }

    return mapper;
}
 
Example #2
Source File: FirstFitLocalCombiningAllocator.java    From Box with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {

    analyzeInstructions();

    if (DEBUG) {
        printLocalVars();
    }

    if (DEBUG) System.out.println("--->Mapping local-associated params");
    handleLocalAssociatedParams();

    if (DEBUG) System.out.println("--->Mapping other params");
    handleUnassociatedParameters();

    if (DEBUG) System.out.println("--->Mapping invoke-range");
    handleInvokeRangeInsns();

    if (DEBUG) {
        System.out.println("--->Mapping local-associated non-params");
    }
    handleLocalAssociatedOther();

    if (DEBUG) System.out.println("--->Mapping check-cast results");
    handleCheckCastResults();

    if (DEBUG) System.out.println("--->Mapping phis");
    handlePhiInsns();

    if (DEBUG) System.out.println("--->Mapping others");
    handleNormalUnassociated();

    return mapper;
}
 
Example #3
Source File: SsaToRop.java    From buck with Apache License 2.0 5 votes vote down vote up
/**
 * Performs the conversion.
 *
 * @return {@code non-null;} rop-form output
 */
private RopMethod convert() {
    if (DEBUG) {
        interference.dumpToStdout();
    }

    // These are other allocators for debugging or historical comparison:
    // allocator = new NullRegisterAllocator(ssaMeth, interference);
    // allocator = new FirstFitAllocator(ssaMeth, interference);

    RegisterAllocator allocator =
        new FirstFitLocalCombiningAllocator(ssaMeth, interference,
                minimizeRegisters);

    RegisterMapper mapper = allocator.allocateRegisters();

    if (DEBUG) {
        System.out.println("Printing reg map");
        System.out.println(((BasicRegisterMapper)mapper).toHuman());
    }

    ssaMeth.setBackMode();

    ssaMeth.mapRegisters(mapper);

    removePhiFunctions();

    if (allocator.wantsParamsMovedHigh()) {
        moveParametersToHighRegisters();
    }

    removeEmptyGotos();

    RopMethod ropMethod = new RopMethod(convertBasicBlocks(),
            ssaMeth.blockIndexToRopLabel(ssaMeth.getEntryBlockIndex()));
    ropMethod = new IdenticalBlockCombiner(ropMethod).process();

    return ropMethod;
}
 
Example #4
Source File: SsaToRop.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Performs the conversion.
 *
 * @return {@code non-null;} rop-form output
 */
private RopMethod convert() {
    if (DEBUG) {
        interference.dumpToStdout();
    }

    // These are other allocators for debugging or historical comparison:
    // allocator = new NullRegisterAllocator(ssaMeth, interference);
    // allocator = new FirstFitAllocator(ssaMeth, interference);

    RegisterAllocator allocator =
        new FirstFitLocalCombiningAllocator(ssaMeth, interference,
                minimizeRegisters);

    RegisterMapper mapper = allocator.allocateRegisters();

    if (DEBUG) {
        System.out.println("Printing reg map");
        System.out.println(((BasicRegisterMapper)mapper).toHuman());
    }

    ssaMeth.setBackMode();

    ssaMeth.mapRegisters(mapper);

    removePhiFunctions();

    if (allocator.wantsParamsMovedHigh()) {
        moveParametersToHighRegisters();
    }

    removeEmptyGotos();

    RopMethod ropMethod = new RopMethod(convertBasicBlocks(),
            ssaMeth.blockIndexToRopLabel(ssaMeth.getEntryBlockIndex()));
    ropMethod = new IdenticalBlockCombiner(ropMethod).process();

    return ropMethod;
}
 
Example #5
Source File: NullRegisterAllocator.java    From Box with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {
    int oldRegCount = ssaMeth.getRegCount();

    BasicRegisterMapper mapper = new BasicRegisterMapper(oldRegCount);

    for (int i = 0; i < oldRegCount; i++) {
        mapper.addMapping(i, i*2, 2);
    }

    return mapper;
}
 
Example #6
Source File: FirstFitLocalCombiningAllocator.java    From buck with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {

    analyzeInstructions();

    if (DEBUG) {
        printLocalVars();
    }

    if (DEBUG) System.out.println("--->Mapping local-associated params");
    handleLocalAssociatedParams();

    if (DEBUG) System.out.println("--->Mapping other params");
    handleUnassociatedParameters();

    if (DEBUG) System.out.println("--->Mapping invoke-range");
    handleInvokeRangeInsns();

    if (DEBUG) {
        System.out.println("--->Mapping local-associated non-params");
    }
    handleLocalAssociatedOther();

    if (DEBUG) System.out.println("--->Mapping check-cast results");
    handleCheckCastResults();

    if (DEBUG) System.out.println("--->Mapping phis");
    handlePhiInsns();

    if (DEBUG) System.out.println("--->Mapping others");
    handleNormalUnassociated();

    return mapper;
}
 
Example #7
Source File: FirstFitLocalCombiningAllocator.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {

    analyzeInstructions();

    if (DEBUG) {
        printLocalVars();
    }

    if (DEBUG) System.out.println("--->Mapping local-associated params");
    handleLocalAssociatedParams();

    if (DEBUG) System.out.println("--->Mapping other params");
    handleUnassociatedParameters();

    if (DEBUG) System.out.println("--->Mapping invoke-range");
    handleInvokeRangeInsns();

    if (DEBUG) {
        System.out.println("--->Mapping local-associated non-params");
    }
    handleLocalAssociatedOther();

    if (DEBUG) System.out.println("--->Mapping check-cast results");
    handleCheckCastResults();

    if (DEBUG) System.out.println("--->Mapping phis");
    handlePhiInsns();

    if (DEBUG) System.out.println("--->Mapping others");
    handleNormalUnassociated();

    return mapper;
}
 
Example #8
Source File: SsaToRop.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/**
 * Performs the conversion.
 *
 * @return {@code non-null;} rop-form output
 */
private RopMethod convert() {
    if (DEBUG) {
        interference.dumpToStdout();
    }

    // These are other allocators for debugging or historical comparison:
    // allocator = new NullRegisterAllocator(ssaMeth, interference);
    // allocator = new FirstFitAllocator(ssaMeth, interference);

    RegisterAllocator allocator =
        new FirstFitLocalCombiningAllocator(ssaMeth, interference,
                minimizeRegisters);

    RegisterMapper mapper = allocator.allocateRegisters();

    if (DEBUG) {
        System.out.println("Printing reg map");
        System.out.println(((BasicRegisterMapper)mapper).toHuman());
    }

    ssaMeth.setBackMode();

    ssaMeth.mapRegisters(mapper);

    removePhiFunctions();

    if (allocator.wantsParamsMovedHigh()) {
        moveParametersToHighRegisters();
    }

    removeEmptyGotos();

    RopMethod ropMethod = new RopMethod(convertBasicBlocks(),
            ssaMeth.blockIndexToRopLabel(ssaMeth.getEntryBlockIndex()));
    ropMethod = new IdenticalBlockCombiner(ropMethod).process();

    return ropMethod;
}
 
Example #9
Source File: NullRegisterAllocator.java    From Box with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {
    int oldRegCount = ssaMeth.getRegCount();

    BasicRegisterMapper mapper = new BasicRegisterMapper(oldRegCount);

    for (int i = 0; i < oldRegCount; i++) {
        mapper.addMapping(i, i*2, 2);
    }

    return mapper;
}
 
Example #10
Source File: FirstFitLocalCombiningAllocator.java    From Box with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {

    analyzeInstructions();

    if (DEBUG) {
        printLocalVars();
    }

    if (DEBUG) System.out.println("--->Mapping local-associated params");
    handleLocalAssociatedParams();

    if (DEBUG) System.out.println("--->Mapping other params");
    handleUnassociatedParameters();

    if (DEBUG) System.out.println("--->Mapping invoke-range");
    handleInvokeRangeInsns();

    if (DEBUG) {
        System.out.println("--->Mapping local-associated non-params");
    }
    handleLocalAssociatedOther();

    if (DEBUG) System.out.println("--->Mapping check-cast results");
    handleCheckCastResults();

    if (DEBUG) System.out.println("--->Mapping phis");
    handlePhiInsns();

    if (DEBUG) System.out.println("--->Mapping others");
    handleNormalUnassociated();

    return mapper;
}
 
Example #11
Source File: NullRegisterAllocator.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {
    int oldRegCount = ssaMeth.getRegCount();

    BasicRegisterMapper mapper = new BasicRegisterMapper(oldRegCount);

    for (int i = 0; i < oldRegCount; i++) {
        mapper.addMapping(i, i*2, 2);
    }

    return mapper;
}
 
Example #12
Source File: SsaToRop.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Performs the conversion.
 *
 * @return {@code non-null;} rop-form output
 */
private RopMethod convert() {
    if (DEBUG) {
        interference.dumpToStdout();
    }

    // These are other allocators for debugging or historical comparison:
    // allocator = new NullRegisterAllocator(ssaMeth, interference);
    // allocator = new FirstFitAllocator(ssaMeth, interference);

    RegisterAllocator allocator =
        new FirstFitLocalCombiningAllocator(ssaMeth, interference,
                minimizeRegisters);

    RegisterMapper mapper = allocator.allocateRegisters();

    if (DEBUG) {
        System.out.println("Printing reg map");
        System.out.println(((BasicRegisterMapper)mapper).toHuman());
    }

    ssaMeth.setBackMode();

    ssaMeth.mapRegisters(mapper);

    removePhiFunctions();

    if (allocator.wantsParamsMovedHigh()) {
        moveParametersToHighRegisters();
    }

    removeEmptyGotos();

    RopMethod ropMethod = new RopMethod(convertBasicBlocks(),
            ssaMeth.blockIndexToRopLabel(ssaMeth.getEntryBlockIndex()));
    ropMethod = new IdenticalBlockCombiner(ropMethod).process();

    return ropMethod;
}
 
Example #13
Source File: LocalSnapshot.java    From buck with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public DalvInsn withMapper(RegisterMapper mapper) {
  return new LocalSnapshot(getPosition(), mapper.map(locals));
}
 
Example #14
Source File: LocalStart.java    From J2ME-Loader with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public DalvInsn withMapper(RegisterMapper mapper) {
  return new LocalStart(getPosition(), mapper.map(local));
}
 
Example #15
Source File: FirstFitAllocator.java    From J2ME-Loader with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {
    int oldRegCount = ssaMeth.getRegCount();

    BasicRegisterMapper mapper
            = new BasicRegisterMapper(oldRegCount);

    int nextNewRegister = 0;

    if (PRESLOT_PARAMS) {
        /*
         * Reserve space for the params at the bottom of the register
         * space. Later, we'll flip the params to the end of the register
         * space.
         */

        nextNewRegister = ssaMeth.getParamWidth();
    }

    for (int i = 0; i < oldRegCount; i++) {
        if (mapped.get(i)) {
            // we already got this one
            continue;
        }

        int maxCategory = getCategoryForSsaReg(i);
        IntSet current = new BitIntSet(oldRegCount);

        interference.mergeInterferenceSet(i, current);

        boolean isPreslotted = false;
        int newReg = 0;

        if (PRESLOT_PARAMS && isDefinitionMoveParam(i)) {
            // Any move-param definition must be a NormalSsaInsn
            NormalSsaInsn defInsn = (NormalSsaInsn)
                   ssaMeth.getDefinitionForRegister(i);

            newReg = paramNumberFromMoveParam(defInsn);

            mapper.addMapping(i, newReg, maxCategory);
            isPreslotted = true;
        } else {
            mapper.addMapping(i, nextNewRegister, maxCategory);
            newReg = nextNewRegister;
        }

        for (int j = i + 1; j < oldRegCount; j++) {
            if (mapped.get(j) || isDefinitionMoveParam(j)) {
                continue;
            }

            /*
             * If reg j doesn't interfere with the current mapping.
             * Also, if this is a pre-slotted method parameter, we
             * can't use more than the original param width.
             */
            if (!current.has(j)
                    && !(isPreslotted
                        && (maxCategory < getCategoryForSsaReg(j)))) {

                interference.mergeInterferenceSet(j, current);

                maxCategory = Math.max(maxCategory,
                        getCategoryForSsaReg(j));

                mapper.addMapping(j, newReg, maxCategory);
                mapped.set(j);
            }
        }

        mapped.set(i);
        if (!isPreslotted) {
            nextNewRegister += maxCategory;
        }
    }

    return mapper;
}
 
Example #16
Source File: LocalSnapshot.java    From J2ME-Loader with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public DalvInsn withMapper(RegisterMapper mapper) {
  return new LocalSnapshot(getPosition(), mapper.map(locals));
}
 
Example #17
Source File: LocalStart.java    From buck with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public DalvInsn withMapper(RegisterMapper mapper) {
  return new LocalStart(getPosition(), mapper.map(local));
}
 
Example #18
Source File: FirstFitAllocator.java    From buck with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {
    int oldRegCount = ssaMeth.getRegCount();

    BasicRegisterMapper mapper
            = new BasicRegisterMapper(oldRegCount);

    int nextNewRegister = 0;

    if (PRESLOT_PARAMS) {
        /*
         * Reserve space for the params at the bottom of the register
         * space. Later, we'll flip the params to the end of the register
         * space.
         */

        nextNewRegister = ssaMeth.getParamWidth();
    }

    for (int i = 0; i < oldRegCount; i++) {
        if (mapped.get(i)) {
            // we already got this one
            continue;
        }

        int maxCategory = getCategoryForSsaReg(i);
        IntSet current = new BitIntSet(oldRegCount);

        interference.mergeInterferenceSet(i, current);

        boolean isPreslotted = false;
        int newReg = 0;

        if (PRESLOT_PARAMS && isDefinitionMoveParam(i)) {
            // Any move-param definition must be a NormalSsaInsn
            NormalSsaInsn defInsn = (NormalSsaInsn)
                   ssaMeth.getDefinitionForRegister(i);

            newReg = paramNumberFromMoveParam(defInsn);

            mapper.addMapping(i, newReg, maxCategory);
            isPreslotted = true;
        } else {
            mapper.addMapping(i, nextNewRegister, maxCategory);
            newReg = nextNewRegister;
        }

        for (int j = i + 1; j < oldRegCount; j++) {
            if (mapped.get(j) || isDefinitionMoveParam(j)) {
                continue;
            }

            /*
             * If reg j doesn't interfere with the current mapping.
             * Also, if this is a pre-slotted method parameter, we
             * can't use more than the original param width.
             */
            if (!current.has(j)
                    && !(isPreslotted
                        && (maxCategory < getCategoryForSsaReg(j)))) {

                interference.mergeInterferenceSet(j, current);

                maxCategory = Math.max(maxCategory,
                        getCategoryForSsaReg(j));

                mapper.addMapping(j, newReg, maxCategory);
                mapped.set(j);
            }
        }

        mapped.set(i);
        if (!isPreslotted) {
            nextNewRegister += maxCategory;
        }
    }

    return mapper;
}
 
Example #19
Source File: LocalSnapshot.java    From Box with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public DalvInsn withMapper(RegisterMapper mapper) {
  return new LocalSnapshot(getPosition(), mapper.map(locals));
}
 
Example #20
Source File: FirstFitAllocator.java    From Box with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {
    int oldRegCount = ssaMeth.getRegCount();

    BasicRegisterMapper mapper
            = new BasicRegisterMapper(oldRegCount);

    int nextNewRegister = 0;

    if (PRESLOT_PARAMS) {
        /*
         * Reserve space for the params at the bottom of the register
         * space. Later, we'll flip the params to the end of the register
         * space.
         */

        nextNewRegister = ssaMeth.getParamWidth();
    }

    for (int i = 0; i < oldRegCount; i++) {
        if (mapped.get(i)) {
            // we already got this one
            continue;
        }

        int maxCategory = getCategoryForSsaReg(i);
        IntSet current = new BitIntSet(oldRegCount);

        interference.mergeInterferenceSet(i, current);

        boolean isPreslotted = false;
        int newReg = 0;

        if (PRESLOT_PARAMS && isDefinitionMoveParam(i)) {
            // Any move-param definition must be a NormalSsaInsn
            NormalSsaInsn defInsn = (NormalSsaInsn)
                   ssaMeth.getDefinitionForRegister(i);

            newReg = paramNumberFromMoveParam(defInsn);

            mapper.addMapping(i, newReg, maxCategory);
            isPreslotted = true;
        } else {
            mapper.addMapping(i, nextNewRegister, maxCategory);
            newReg = nextNewRegister;
        }

        for (int j = i + 1; j < oldRegCount; j++) {
            if (mapped.get(j) || isDefinitionMoveParam(j)) {
                continue;
            }

            /*
             * If reg j doesn't interfere with the current mapping.
             * Also, if this is a pre-slotted method parameter, we
             * can't use more than the original param width.
             */
            if (!current.has(j)
                    && !(isPreslotted
                        && (maxCategory < getCategoryForSsaReg(j)))) {

                interference.mergeInterferenceSet(j, current);

                maxCategory = Math.max(maxCategory,
                        getCategoryForSsaReg(j));

                mapper.addMapping(j, newReg, maxCategory);
                mapped.set(j);
            }
        }

        mapped.set(i);
        if (!isPreslotted) {
            nextNewRegister += maxCategory;
        }
    }

    return mapper;
}
 
Example #21
Source File: LocalStart.java    From Box with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public DalvInsn withMapper(RegisterMapper mapper) {
  return new LocalStart(getPosition(), mapper.map(local));
}
 
Example #22
Source File: LocalSnapshot.java    From Box with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public DalvInsn withMapper(RegisterMapper mapper) {
  return new LocalSnapshot(getPosition(), mapper.map(locals));
}
 
Example #23
Source File: FirstFitAllocator.java    From Box with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public RegisterMapper allocateRegisters() {
    int oldRegCount = ssaMeth.getRegCount();

    BasicRegisterMapper mapper
            = new BasicRegisterMapper(oldRegCount);

    int nextNewRegister = 0;

    if (PRESLOT_PARAMS) {
        /*
         * Reserve space for the params at the bottom of the register
         * space. Later, we'll flip the params to the end of the register
         * space.
         */

        nextNewRegister = ssaMeth.getParamWidth();
    }

    for (int i = 0; i < oldRegCount; i++) {
        if (mapped.get(i)) {
            // we already got this one
            continue;
        }

        int maxCategory = getCategoryForSsaReg(i);
        IntSet current = new BitIntSet(oldRegCount);

        interference.mergeInterferenceSet(i, current);

        boolean isPreslotted = false;
        int newReg = 0;

        if (PRESLOT_PARAMS && isDefinitionMoveParam(i)) {
            // Any move-param definition must be a NormalSsaInsn
            NormalSsaInsn defInsn = (NormalSsaInsn)
                   ssaMeth.getDefinitionForRegister(i);

            newReg = paramNumberFromMoveParam(defInsn);

            mapper.addMapping(i, newReg, maxCategory);
            isPreslotted = true;
        } else {
            mapper.addMapping(i, nextNewRegister, maxCategory);
            newReg = nextNewRegister;
        }

        for (int j = i + 1; j < oldRegCount; j++) {
            if (mapped.get(j) || isDefinitionMoveParam(j)) {
                continue;
            }

            /*
             * If reg j doesn't interfere with the current mapping.
             * Also, if this is a pre-slotted method parameter, we
             * can't use more than the original param width.
             */
            if (!current.has(j)
                    && !(isPreslotted
                        && (maxCategory < getCategoryForSsaReg(j)))) {

                interference.mergeInterferenceSet(j, current);

                maxCategory = Math.max(maxCategory,
                        getCategoryForSsaReg(j));

                mapper.addMapping(j, newReg, maxCategory);
                mapped.set(j);
            }
        }

        mapped.set(i);
        if (!isPreslotted) {
            nextNewRegister += maxCategory;
        }
    }

    return mapper;
}
 
Example #24
Source File: LocalStart.java    From Box with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override
public DalvInsn withMapper(RegisterMapper mapper) {
  return new LocalStart(getPosition(), mapper.map(local));
}
 
Example #25
Source File: DalvInsn.java    From J2ME-Loader with Apache License 2.0 2 votes vote down vote up
/**
 * Returns an instance that is just like this one, except that the
 * register list is mapped by using {@code mapper}.
 *
 * @param mapper {@code non-null;} used to map registers
 * @return {@code non-null;} an appropriately-constructed instance
 */
public DalvInsn withMapper(RegisterMapper mapper) {
  return withRegisters(mapper.map(getRegisters()));
}
 
Example #26
Source File: RegisterAllocator.java    From J2ME-Loader with Apache License 2.0 2 votes vote down vote up
/**
 * Runs the algorithm.
 *
 * @return a register mapper to apply to the {@code SsaMethod}
 */
public abstract RegisterMapper allocateRegisters();
 
Example #27
Source File: RegisterAllocator.java    From Box with Apache License 2.0 2 votes vote down vote up
/**
 * Runs the algorithm.
 *
 * @return a register mapper to apply to the {@code SsaMethod}
 */
public abstract RegisterMapper allocateRegisters();
 
Example #28
Source File: DalvInsn.java    From Box with Apache License 2.0 2 votes vote down vote up
/**
 * Returns an instance that is just like this one, except that the
 * register list is mapped by using {@code mapper}.
 *
 * @param mapper {@code non-null;} used to map registers
 * @return {@code non-null;} an appropriately-constructed instance
 */
public DalvInsn withMapper(RegisterMapper mapper) {
  return withRegisters(mapper.map(getRegisters()));
}
 
Example #29
Source File: DalvInsn.java    From buck with Apache License 2.0 2 votes vote down vote up
/**
 * Returns an instance that is just like this one, except that the
 * register list is mapped by using {@code mapper}.
 *
 * @param mapper {@code non-null;} used to map registers
 * @return {@code non-null;} an appropriately-constructed instance
 */
public DalvInsn withMapper(RegisterMapper mapper) {
  return withRegisters(mapper.map(getRegisters()));
}
 
Example #30
Source File: RegisterAllocator.java    From buck with Apache License 2.0 2 votes vote down vote up
/**
 * Runs the algorithm.
 *
 * @return a register mapper to apply to the {@code SsaMethod}
 */
public abstract RegisterMapper allocateRegisters();