|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.util.SpaceEffGraph org.jikesrvm.compilers.opt.regalloc.CoalesceGraph
class CoalesceGraph
This class represents a graph, where
This graph is used to drive coalescing during register allocation.
Implementation: this is meant to be an undirected graph. By convention, we enforce that the register with the lower number is the source of an edge.
Nested Class Summary | |
---|---|
(package private) static class |
CoalesceGraph.Edge
|
(package private) static class |
CoalesceGraph.Node
|
Field Summary | |
---|---|
(package private) HashMap<Register,CoalesceGraph.Node> |
nodeMap
Mapping register -> Node |
Fields inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraph |
---|
_firstNode, _lastNode, backwardTopSorted, forwardTopSorted, numberOfNodes |
Constructor Summary | |
---|---|
CoalesceGraph()
|
Method Summary | |
---|---|
(package private) void |
addAffinity(int w,
Register r1,
Register r2)
Add an affinity of weight w between registers r1 and r2 |
(package private) CoalesceGraph.Node |
findNode(Register r)
Find the node corresponding to a regsiter. |
private CoalesceGraph.Edge |
findOrCreateEdge(CoalesceGraph.Node src,
CoalesceGraph.Node dest)
find or create an edge in the graph |
private CoalesceGraph.Node |
findOrCreateNode(Register r)
find or create a node in the graph corresponding to a register. |
Methods inherited from class org.jikesrvm.compilers.opt.util.SpaceEffGraph |
---|
addGraphEdge, addGraphEdge, addGraphNode, addRootNode, addTopSortNode, allocateNodeNumber, buildRevTopSort, buildTopSort, clearDFS, compactNodeNumbering, enumerateNodes, firstNode, initTopSort, isTopSorted, lastNode, numberOfNodes, printDepthFirst, removeGraphNode, resetTopSorted, rootNodes, setFirstNode, setLastNode, setNumberOfNodes, setTopSorted, startNode, topSort, topSortOrder, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
final HashMap<Register,CoalesceGraph.Node> nodeMap
Constructor Detail |
---|
CoalesceGraph()
Method Detail |
---|
private CoalesceGraph.Node findOrCreateNode(Register r)
CoalesceGraph.Node findNode(Register r)
private CoalesceGraph.Edge findOrCreateEdge(CoalesceGraph.Node src, CoalesceGraph.Node dest)
void addAffinity(int w, Register r1, Register r2)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |