class CoalesceGraph extends SpaceEffGraph
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.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
CoalesceGraph.Edge |
(package private) static class |
CoalesceGraph.Node |
Modifier and Type | Field and Description |
---|---|
(package private) HashMap<Register,CoalesceGraph.Node> |
nodeMap
Mapping register -> Node
|
_firstNode, _lastNode, backwardTopSorted, forwardTopSorted, numberOfNodes
Constructor and Description |
---|
CoalesceGraph() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addAffinity(int w,
Register r1,
Register r2) |
(package private) CoalesceGraph.Node |
findNode(Register r) |
private CoalesceGraph.Edge |
findOrCreateEdge(CoalesceGraph.Node src,
CoalesceGraph.Node dest) |
private CoalesceGraph.Node |
findOrCreateNode(Register r) |
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
final HashMap<Register,CoalesceGraph.Node> nodeMap
CoalesceGraph()
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)