All instructions that define a certain variable, which is not subsequently used, is dead. Hence, such code can be eliminated. In general, programs written by compiler users will not have such code, but such occurances can happen due to other optimizations. The data flow solver is used to solve a backward data flow problem of liveness of variables. The solution is used to eliminate all code that is found to be dead.