|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.DomTree<HCE>
public class DomTree<HCE extends HCodeElement>
DomTree
computes the dominator tree of a flowgraph-structured
IR. The HCode
must have a valid
CFGrapher
.
Constructor Summary | |
---|---|
DomTree(HCode<HCE> hcode,
boolean isPost)
Creates a new DomTree with the dominator
tree for the given HCode ; if isPost is
true, creates a postdominator tree instead. |
|
DomTree(HCode<HCE> hcode,
CFGrapher<HCE> grapher,
boolean isPost)
Creates a new DomTree with the dominator
tree for the given HCode ; if isPost is
true, creates a postdominator tree instead. |
Method Summary | |
---|---|
HCE[] |
children(HCE n)
Return the children of an HCodeElement in the immediate
(post)dominator tree. |
HCE |
idom(HCE n)
Return the immediate (post)dominator of an HCodeElement . |
HCE[] |
roots()
Return the roots of the (post-)dominator tree (forest). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DomTree(HCode<HCE> hcode, boolean isPost)
DomTree
with the dominator
tree for the given HCode
; if isPost
is
true, creates a postdominator tree instead. Uses the default
CFGrapher
, which means the elements of the
HCode
must implement CFGraphable
.
public DomTree(HCode<HCE> hcode, CFGrapher<HCE> grapher, boolean isPost)
DomTree
with the dominator
tree for the given HCode
; if isPost
is
true, creates a postdominator tree instead. Uses the specified
CFGrapher
to construct the control flow graph of
the HCode
.
Method Detail |
---|
public HCE[] roots()
public HCE idom(HCE n)
HCodeElement
.
n
, or
null
if n
is the root (a leaf)
of the flow graph.public HCE[] children(HCE n)
HCodeElement
in the immediate
(post)dominator tree.
n
in the
immediate dominator tree, or a zero-length array if
n
is a tree leaf.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |