private void countLocalStoresLoadsAndIncrements ( int [ ] localStoreCount , int [ ] localLoadCount , int [ ] localIncrementCount , CFG cfg ) { for ( Iterator < Location > i = cfg . locationIterator ( ) ; i . hasNext ( ) ; ) { Location location = i . next ( ) ; if ( location . getBasicBlock ( ) . isExceptionHandler ( ) ) { continue ; } boolean isStore = isStore ( location ) ; boolean isLoad = isLoad ( location ) ; if ( ! isStore && ! isLoad ) { continue ; } IndexedInstruction ins = ( IndexedInstruction ) location . getHandle ( ) . getInstruction ( ) ; int local = ins . getIndex ( ) ; if ( ins instanceof IINC ) { localStoreCount [ local ] ++ ; localLoadCount [ local ] ++ ; localIncrementCount [ local ] ++ ; } else if ( isStore ) { localStoreCount [ local ] ++ ; } else { localLoadCount [ local ] ++ ; } } }
Count stores loads and increments of local variables in method whose CFG is given .