|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.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 PPBlock
public Chord lastChord()
lastChord
in class PPBlock
public PPEdge[] incoming()
incoming
in class PPBlock
public PPEdge[] outgoing()
outgoing
in class PPBlock
public PPEdge getInEdge(int i)
getInEdge
in class PPBlock
public PPEdge getOutEdge(int i)
getOutEdge
in class PPBlock
public boolean addInEdge(PPEdge edge)
addInEdge
in class PPBlock
public boolean addOutEdge(PPEdge edge)
addOutEdge
in class PPBlock
public void addAllInEdges(java.util.AbstractCollection<PPEdge> list)
addAllInEdges
in class PPBlock
public void addAllOutEdges(java.util.AbstractCollection<PPEdge> list)
addAllOutEdges
in class PPBlock
public boolean removeInEdge(PPEdge edge)
removeInEdge
in class PPBlock
public boolean removeOutEdge(PPEdge edge)
removeOutEdge
in class PPBlock
public int numInEdges()
numInEdges
in class PPBlock
public int numOutEdges()
numOutEdges
in class PPBlock
public boolean hasInEdges()
hasInEdges
in class PPBlock
public boolean hasOutEdges()
hasOutEdges
in class PPBlock
public long getInEdgeFrequency()
getInEdgeFrequency
in class PPBlock
public long getOutEdgeFrequency()
getOutEdgeFrequency
in class PPBlock
public long getBranchEdgeFrequency()
getBranchEdgeFrequency
in class PPBlock
public PPEdge getHighestOutEdge(long pathNum)
getHighestOutEdge
in class PPBlock
public void incrementInEdges(long inc)
incrementInEdges
in class PPBlock
public double getAvgTripCount()
getAvgTripCount
in class PPBlock
public long getNumPaths()
getNumPaths
in class PPBlock
public void setNumPaths(long numPaths)
setNumPaths
in class PPBlock
numPaths
- The number of paths for this block.public boolean isNumPathsSet()
isNumPathsSet
in class PPBlock
public boolean isBeginBlock()
isBeginBlock
in class PPBlock
public boolean isEndBlock()
isEndBlock
in class PPBlock
public PPCfg getCfg()
getCfg
in class PPBlock
public boolean equals(java.lang.Object o)
equals
in class PPBlock
public int hashCode()
hashCode
in class PPBlock
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |