private BitSet findPreviouslyDeadBlocks ( ) throws DataflowAnalysisException , CFGBuilderException { BitSet deadBlocks = new BitSet ( ) ; ValueNumberDataflow vnaDataflow = classContext . getValueNumberDataflow ( method ) ; for ( Iterator < BasicBlock > i = vnaDataflow . getCFG ( ) . blockIterator ( ) ; i . hasNext ( ) ; ) { BasicBlock block = i . next ( ) ; ValueNumberFrame vnaFrame = vnaDataflow . getStartFact ( block ) ; if ( vnaFrame . isTop ( ) ) { deadBlocks . set ( block . getLabel ( ) ) ; } } return deadBlocks ; }
Find set of blocks which were known to be dead before doing the null pointer analysis .