|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.common.Root
scale.score.pp.PPBlock
scale.score.pp.PPSupergraphBlock
public class PPSupergraphBlock
Represents the fake supergraph basic blocks SUPERBEGIN and SUPEREND, which are connected to the BEGIN and END, respectively, of each CFG. This class should not be needed for developing path-guided optimizations.
$Id: PPSupergraphBlock.java,v 1.5 2007-10-04 19:53:37 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
| Field Summary | |
|---|---|
static int |
SUPERBEGIN
Represents that this supergraph block is SUPERBEGIN. |
static int |
SUPEREND
Represents that this supergraph block is SUPEREND. |
| Constructor Summary | |
|---|---|
PPSupergraphBlock(int type,
java.util.List<PPCfg> cfgs)
|
|
| Method Summary | |
|---|---|
void |
addAllInEdges(java.util.AbstractCollection<PPEdge> list)
Add all incoming edges to the specified collection. |
void |
addAllOutEdges(java.util.AbstractCollection<PPEdge> list)
Add all outgoing edges to the specified collection. |
boolean |
addInEdge(PPEdge edge)
Add the edge to the incoming edges. |
boolean |
addOutEdge(PPEdge edge)
Add the edge to the outgoing edges. |
boolean |
equals(java.lang.Object o)
Two supergraph blocks are the same if they have the same type. |
Chord |
firstChord()
Get the first Chord of this block. |
double |
getAvgTripCount()
Get the average trip count for a loop. |
long |
getBranchEdgeFrequency()
Return the outgoing branch edge frequency. |
PPCfg |
getCfg()
Return the path profiling CFG representation that this block is part of. |
PPEdge |
getHighestOutEdge(long pathNum)
Return the outgoing edge with the highest increment. |
PPEdge |
getInEdge(int i)
Return the specified incoming edge. |
long |
getInEdgeFrequency()
Return the incoming edge frequency. |
long |
getNumPaths()
Return the number of paths for this block. |
PPEdge |
getOutEdge(int i)
Return the specified outgoing edge. |
long |
getOutEdgeFrequency()
Return the outgoing edge frequency. |
int |
hashCode()
The hash code for a supergraph block is based on its type. |
boolean |
hasInEdges()
Return true if there are any incoming edges. |
boolean |
hasOutEdges()
Return true if there are any outgoing edges. |
PPEdge[] |
incoming()
Return a list of the incoming edges of this block. |
void |
incrementInEdges(long inc)
Add the specified increment to all of the incoming edges. |
boolean |
isBeginBlock()
Returns true if and only if this basic block is BEGIN. |
boolean |
isEndBlock()
Returns true if and only if this basic block is END. |
boolean |
isNumPathsSet()
Return True if and only the number of paths for this block has been set. |
Chord |
lastChord()
Get the last Chord of this block. |
int |
numInEdges()
Return the number of incoming edges. |
int |
numOutEdges()
Return the number of incoming edges. |
PPEdge[] |
outgoing()
Return a list of the incoming edges of this block. |
boolean |
removeInEdge(PPEdge edge)
Remove the specified incoming edge. |
boolean |
removeOutEdge(PPEdge edge)
Remove the specified outgoing edge. |
void |
setNumPaths(long numPaths)
Set the number of paths for this block. |
| Methods inherited from class scale.score.pp.PPBlock |
|---|
dumpEdges, getDisplayName, getHighRange, getLowRange, getNumChords, getRangeText, getRank, getWeight, hasEdges, incRank, isLoopHeader, resetNumPaths, setHighRange, setLowRange, setRank, toString, unionRange, validate |
| Methods inherited from class scale.common.Root |
|---|
addAnnotation, allAnnotations, allMatchingAnnotations, getAnnotation, getDisplayColorHint, getDisplayLabel, getDisplayShapeHint, getDisplayString, getNodeCount, getNodeID, hasAnnotation, hasEqualAnnotation, removeAnnotation, removeAnnotations, toStringAnnotations, toStringClass, toStringSpecial, trace, trace, trace |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SUPERBEGIN
public static final int SUPEREND
| Constructor Detail |
|---|
public PPSupergraphBlock(int type,
java.util.List<PPCfg> cfgs)
| Method Detail |
|---|
public Chord firstChord()
firstChord in class PPBlockpublic Chord lastChord()
lastChord in class PPBlockpublic PPEdge[] incoming()
incoming in class PPBlockpublic PPEdge[] outgoing()
outgoing in class PPBlockpublic PPEdge getInEdge(int i)
getInEdge in class PPBlockpublic PPEdge getOutEdge(int i)
getOutEdge in class PPBlockpublic boolean addInEdge(PPEdge edge)
addInEdge in class PPBlockpublic boolean addOutEdge(PPEdge edge)
addOutEdge in class PPBlockpublic void addAllInEdges(java.util.AbstractCollection<PPEdge> list)
addAllInEdges in class PPBlockpublic void addAllOutEdges(java.util.AbstractCollection<PPEdge> list)
addAllOutEdges in class PPBlockpublic boolean removeInEdge(PPEdge edge)
removeInEdge in class PPBlockpublic boolean removeOutEdge(PPEdge edge)
removeOutEdge in class PPBlockpublic int numInEdges()
numInEdges in class PPBlockpublic int numOutEdges()
numOutEdges in class PPBlockpublic boolean hasInEdges()
hasInEdges in class PPBlockpublic boolean hasOutEdges()
hasOutEdges in class PPBlockpublic long getInEdgeFrequency()
getInEdgeFrequency in class PPBlockpublic long getOutEdgeFrequency()
getOutEdgeFrequency in class PPBlockpublic long getBranchEdgeFrequency()
getBranchEdgeFrequency in class PPBlockpublic PPEdge getHighestOutEdge(long pathNum)
getHighestOutEdge in class PPBlockpublic void incrementInEdges(long inc)
incrementInEdges in class PPBlockpublic double getAvgTripCount()
getAvgTripCount in class PPBlockpublic long getNumPaths()
getNumPaths in class PPBlockpublic void setNumPaths(long numPaths)
setNumPaths in class PPBlocknumPaths - The number of paths for this block.public boolean isNumPathsSet()
isNumPathsSet in class PPBlockpublic boolean isBeginBlock()
isBeginBlock in class PPBlockpublic boolean isEndBlock()
isEndBlock in class PPBlockpublic PPCfg getCfg()
getCfg in class PPBlockpublic boolean equals(java.lang.Object o)
equals in class PPBlockpublic int hashCode()
hashCode in class PPBlock
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||