FileDocCategorySizeDatePackage
SetFactory.javaAPI DocAndroid 1.5 API3285Wed May 06 22:41:02 BST 2009com.android.dx.ssa

SetFactory

public final class SetFactory extends Object
Makes int sets for various parts of the optimizer.

Fields 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.
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.
private static final int
LIVENESS_SET_THRESHOLD_SIZE
BitIntSet/ListIntSet threshold for the live in/out sets kept by {@link 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.
Constructors Summary
Methods Summary
static com.android.dx.util.IntSetmakeDomFrontSet(int szBlocks)
Make IntSet for the dominance-frontier sets.

param
szBlocks >=0; count of basic blocks in method
return
non-null; appropriate set



                            
    /*package*/     
        return szBlocks <= DOMFRONT_SET_THRESHOLD_SIZE
                ? new BitIntSet(szBlocks)
                : new ListIntSet();
    
public static com.android.dx.util.IntSetmakeInterferenceSet(int countRegs)
Make IntSet for the interference graph sets. Public because InterferenceGraph is in another package.

param
countRegs >=0; count of SSA registers used in method
return
non-null; appropriate set

        return countRegs <= INTERFERENCE_SET_THRESHOLD_SIZE
                ? new BitIntSet(countRegs)
                : new ListIntSet();
    
static com.android.dx.util.IntSetmakeLivenessSet(int countRegs)
Make IntSet for register live in/out sets.

param
countRegs >=0; count of SSA registers used in method
return
non-null; appropriate set

        return countRegs <= LIVENESS_SET_THRESHOLD_SIZE
                ? new BitIntSet(countRegs)
                : new ListIntSet();