|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Instr.RegAlloc
harpoon.Analysis.Instr.GraphColoringRegAlloc
public class GraphColoringRegAlloc
GraphColoringRegAlloc
uses graph coloring heuristics
to find a register assignment for a Code.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class harpoon.Analysis.Instr.RegAlloc |
---|
RegAlloc.Factory, RegAlloc.IntermediateCode, RegAlloc.IntermediateCodeFactory, RegAlloc.RestoreProxy, RegAlloc.SpillLoad, RegAlloc.SpillProxy, RegAlloc.SpillStore |
Field Summary | |
---|---|
static RegAlloc.Factory |
FACTORY
|
Fields inherited from class harpoon.Analysis.Instr.RegAlloc |
---|
bbFact, checked, code, DEBUG, frame, GLOBAL, LOCAL |
Constructor Summary | |
---|---|
GraphColoringRegAlloc(Code code,
GraphColorer gc)
Creates a GraphColoringRegAlloc , assigning `gc'
as its graph coloring strategy and using a overly conservative
move coalescing strategy. |
|
GraphColoringRegAlloc(Code code,
GraphColorer gc,
boolean aggressiveCoalesce)
Creates a GraphColoringRegAlloc , assigning `gc'
as its graph coloring strategy. |
Method Summary | |
---|---|
protected void |
generateRegAssignment()
Assigns registers in the code for this . |
protected Derivation |
getDerivation()
returns a Derivation for analyses to use on the
register-allocated code. |
static Map |
printGraph(ColorableGraph graph,
boolean PRINT)
returns nodeToNum. |
protected void |
replace(Instr orig,
Instr repl)
replaces 'orig' with 'repl', and modifies internal data structures to reflect that replacement as necessary. |
Methods inherited from class harpoon.Analysis.Instr.RegAlloc |
---|
abstractSpillFactory, abstractSpillFactory, allRegs, back, codeFactory, codeFactory, computeBasicBlocks, concreteSpillFactory, expand, fixupSpillCode, getBack, getGrapherFor, getUseDeferFor, hasRegister, isRegister, lastUse, reachableInstrs, resolveOutstandingTemps, rfi |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static RegAlloc.Factory FACTORY
Constructor Detail |
---|
public GraphColoringRegAlloc(Code code, GraphColorer gc)
GraphColoringRegAlloc
, assigning `gc'
as its graph coloring strategy and using a overly conservative
move coalescing strategy.
public GraphColoringRegAlloc(Code code, GraphColorer gc, boolean aggressiveCoalesce)
GraphColoringRegAlloc
, assigning `gc'
as its graph coloring strategy. If
aggressiveCoalesce
is true, will choose to
coalesce moves in the face of increased memory traffic.
Method Detail |
---|
protected void replace(Instr orig, Instr repl)
RegAlloc
replace
in class RegAlloc
protected Derivation getDerivation()
RegAlloc
Derivation
for analyses to use on the
register-allocated code. This allows for register allocation
routines to make transformations on the code and still allow
Derivation information to propagate to later analyses.
this.generateRegAssignment()
has been
called.
getDerivation
in class RegAlloc
protected void generateRegAssignment()
RegAlloc
this
.
this
. Values will be preserved in the code;
any live value will be stored before its assigned
register is overwritten.
SpillLoad
s and
SpillStore
s; the main RegAlloc
class will use resolveOutstandingTemps()
to replace these "fake" loads and stores with frame
specified Memory instructions.
generateRegAssignment
in class RegAlloc
RegAlloc.resolveOutstandingTemps()
public static Map printGraph(ColorableGraph graph, boolean PRINT)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |