Dead code elimination pass.
Marks all instructions whose results are used. Removes unmarked instructions that have no side effects (stores, barriers, atomics are always considered live).