com.android.dx.ssa.back
Class FirstFitAllocator
java.lang.Object
com.android.dx.ssa.back.RegisterAllocator
com.android.dx.ssa.back.FirstFitAllocator
public class FirstFitAllocator
- extends RegisterAllocator
Allocates registers via a naive n^2 register allocator.
This allocator does not try to co-locate local variables or deal
intelligently with different size register uses.
|
Method Summary |
RegisterMapper |
allocateRegisters()
Runs the algorithm. |
boolean |
wantsParamsMovedHigh()
Indicates whether the method params were allocated at the bottom
of the namespace, and thus should be moved up to the top of the
namespace after phi removal. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FirstFitAllocator
public FirstFitAllocator(SsaMethod ssaMeth,
InterferenceGraph interference)
-
wantsParamsMovedHigh
public boolean wantsParamsMovedHigh()
- Indicates whether the method params were allocated at the bottom
of the namespace, and thus should be moved up to the top of the
namespace after phi removal.
- Specified by:
wantsParamsMovedHigh in class RegisterAllocator
- Returns:
true if params should be moved from low to high
allocateRegisters
public RegisterMapper allocateRegisters()
- Runs the algorithm.
- Specified by:
allocateRegisters in class RegisterAllocator
- Returns:
- a register mapper to apply to the
SsaMethod
Copyright © 2013. All Rights Reserved.