| |
|
| java.lang.Object EDU.purdue.cs.bloat.codegen.RegisterAllocator
RegisterAllocator | public class RegisterAllocator (Code) | | RegisterAllocator performs analysis on a control flow graph and determines
the minimum amount of local variables needed in a method.
See Also: LocalVariable |
Method Summary | |
public int | maxLocals() Returns the maximum number of local variables used by the cfg after its
"registers" (local variables) have been allocated. | public LocalVariable | newLocal(Type type) Creates a new local variable in this method (as modeled by the cfg). |
LOOP_FACTOR | final static float LOOP_FACTOR(Code) | | |
MAX_DEPTH | final static int MAX_DEPTH(Code) | | |
MAX_WEIGHT | final static float MAX_WEIGHT(Code) | | |
colorsUsed | int colorsUsed(Code) | | |
RegisterAllocator | public RegisterAllocator(FlowGraph cfg, Liveness liveness)(Code) | | Constructor. Builds an interference graph based on the expression nodes
found in liveness. Traverses the graph and determines which nodes needs
to be precolored and which nodes can be coalesced (move statements).
Nodes are coalesced and local variables are assigned to expressions.
See Also: FlowGraph See Also: LocalVariable |
maxLocals | public int maxLocals()(Code) | | Returns the maximum number of local variables used by the cfg after its
"registers" (local variables) have been allocated.
|
newLocal | public LocalVariable newLocal(Type type)(Code) | | Creates a new local variable in this method (as modeled by the cfg).
Updates the number of local variables appropriately.
|
|
|
|