Top Description Inners Fields Constructors Methods
org.droidparts.dexmaker.dx.ssa

public Class DomFront

extends Object
Class Inheritance
Imports
org.droidparts.dexmaker.dx.util.IntSet, java.util.ArrayList, .BitSet

Calculates the dominance-frontiers of a methot's basic blocks. Algorithm from "A Simple, Fast Dominance Algorithm" by Cooper, Harvey, and Kennedy; transliterated to Java.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
DomFront.DomInfo

Dominance-frontier information for a single basic block.

Field Summary

Modifier and TypeField and Description
private static boolean
DEBUG

local debug flag

private final DomFront.DomInfo[]
private final SsaMethod
meth

non-null; method being processed

private final ArrayList<SsaBasicBlock>

Constructor Summary

AccessConstructor and Description
public
DomFront(SsaMethod
non-null; method to process
meth
)

Constructs instance.

Method Summary

Modifier and TypeMethod and Description
private void
buildDomTree()

The dominators algorithm leaves us knowing who the immediate dominator is for each node.

private void
calcDomFronts()

Calculates the dominance-frontier set.

private void
public DomFront.DomInfo[]

Returns:

non-null; an array of DomInfo structures
run
()

Calculates the dominance frontier information for the method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
private static boolean DEBUG

local debug flag

domInfosback to summary
private final DomFront.DomInfo[] domInfos
methback to summary
private final SsaMethod meth

non-null; method being processed

nodesback to summary
private final ArrayList<SsaBasicBlock> nodes

Constructor Detail

DomFrontback to summary
public DomFront(SsaMethod meth)

Constructs instance. Call DomFront#run to process.

Parameters
meth:SsaMethod

non-null; method to process

Method Detail

buildDomTreeback to summary
private void buildDomTree()

The dominators algorithm leaves us knowing who the immediate dominator is for each node. This sweeps the node list and builds the proper dominance tree.

calcDomFrontsback to summary
private void calcDomFronts()

Calculates the dominance-frontier set. from "A Simple, Fast Dominance Algorithm" by Cooper, Harvey, and Kennedy; transliterated to Java.

debugPrintDomChildrenback to summary
private void debugPrintDomChildren()
runback to summary
public DomFront.DomInfo[] run()

Calculates the dominance frontier information for the method.

Returns:DomFront.DomInfo[]

non-null; an array of DomInfo structures

org.droidparts.dexmaker.dx.ssa back to summary

public Class DomFront.DomInfo

extends Object
Class Inheritance

Dominance-frontier information for a single basic block.

Field Summary

Modifier and TypeField and Description
public IntSet
dominanceFrontiers

null-ok; the dominance frontier set indexed by block index

public int
idom

>= 0 after run(); the index of the immediate dominator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dominanceFrontiersback to summary
public IntSet dominanceFrontiers

null-ok; the dominance frontier set indexed by block index

idomback to summary
public int idom

>= 0 after run(); the index of the immediate dominator

Constructor Detail

DomInfoback to summary
public DomInfo()