what local variables have been accessed at least once?
Stores that clobber previous stores to array or ref locals.
Stores that clobber previous stores to array or ref locals. See SI-5313
collect reaching definitions and initial useful instructions for this method.
Use-def chain: give the reaching definitions at the beginning of given instruction.
Map instructions who have a drop on some control path, to that DROP instruction.
Finds and marks all clobbers of the given local starting in the given basic block at the given index
Finds and marks all clobbers of the given local starting in the given basic block at the given index
Storing to local variables of reference or array type may be indirectly observable because it may remove a reference to an object which may allow the object to be gc'd. See SI-5313. In this code I call the LOCAL_STORE(s) that immediately follow a LOCAL_STORE and that store to the same local "clobbers." If a LOCAL_STORE is marked useful then its clobbers must go into the set of clobbers, which will be compensated for later
Map from a local and a basic block to the instructions that store to that local in that basic block
Mark useful instructions.
Mark useful instructions. Instructions in the worklist are each inspected and their dependencies are marked useful too, and added to the worklist.
the current method.
what instructions have been marked as useful?
Useful instructions which have not been scanned yet.
Remove dead code.