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

public final Class SetFactory

extends Object
Class Inheritance
Imports
org.droidparts.dexmaker.dx.util.BitIntSet, .IntSet, .ListIntSet

Makes int sets for various parts of the optimizer.

Field Summary

Modifier and TypeField and Description
private static final int
DOMFRONT_SET_THRESHOLD_SIZE

BitIntSet/ListIntSet threshold for dominance frontier sets.

private static final int
INTERFERENCE_SET_THRESHOLD_SIZE

BitIntSet/ListIntSet threshold for interference graph sets.

private static final int
LIVENESS_SET_THRESHOLD_SIZE

BitIntSet/ListIntSet threshold for the live in/out sets kept by SsaBasicBlock.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static IntSet

Returns:

non-null; appropriate set
makeDomFrontSet
(int
>=0; count of basic blocks in method
szBlocks
)

Make IntSet for the dominance-frontier sets.

public static IntSet

Returns:

non-null; appropriate set
makeInterferenceSet
(int
>=0; count of SSA registers used in method
countRegs
)

Make IntSet for the interference graph sets.

pack-priv static IntSet

Returns:

non-null; appropriate set
makeLivenessSet
(int
>=0; count of SSA registers used in method
countRegs
)

Make IntSet for register live in/out sets.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DOMFRONT_SET_THRESHOLD_SIZEback to summary
private static final int DOMFRONT_SET_THRESHOLD_SIZE

BitIntSet/ListIntSet threshold for dominance frontier sets. These sets are kept per basic block until phi placement and tend to be, like the CFG itself, very sparse at large sizes. A value of 3072 here is somewhere around 1.125mb of total bitset size.

INTERFERENCE_SET_THRESHOLD_SIZEback to summary
private static final int INTERFERENCE_SET_THRESHOLD_SIZE

BitIntSet/ListIntSet threshold for interference graph sets. These sets are kept per register until register allocation is done. A value of 3072 here is somewhere around 1.125mb of total bitset size.

LIVENESS_SET_THRESHOLD_SIZEback to summary
private static final int LIVENESS_SET_THRESHOLD_SIZE

BitIntSet/ListIntSet threshold for the live in/out sets kept by SsaBasicBlock. These are sets of SSA registers kept per basic block during register allocation. The total size of a bitset for this would be the count of blocks times the size of registers. The threshold value here is merely the register count, which is typically on the order of the block count as well.

Constructor Detail

SetFactoryback to summary
public SetFactory()

Method Detail

makeDomFrontSetback to summary
pack-priv static IntSet makeDomFrontSet(int szBlocks)

Make IntSet for the dominance-frontier sets.

Parameters
szBlocks:int

>=0; count of basic blocks in method

Returns:IntSet

non-null; appropriate set

makeInterferenceSetback to summary
public static IntSet makeInterferenceSet(int countRegs)

Make IntSet for the interference graph sets. Public because InterferenceGraph is in another package.

Parameters
countRegs:int

>=0; count of SSA registers used in method

Returns:IntSet

non-null; appropriate set

makeLivenessSetback to summary
pack-priv static IntSet makeLivenessSet(int countRegs)

Make IntSet for register live in/out sets.

Parameters
countRegs:int

>=0; count of SSA registers used in method

Returns:IntSet

non-null; appropriate set