In cases where a susceptibility to transient error is a function of time in storage, such as in the case of an under margin defect transiently affecting cache or other storage, selection of instructions for duplication may be informed by liveness analysis performed by a compiler.