  Soft errors are a type of transient digital signal corruption that occurs in
digital hardware components such as the internal flip-flops of CPU pipelines,
the register file, memory cells, and even internal communication buses. Soft
errors are caused by environmental radioactivity, magnetic interference,
lasers, and temperature fluctuations, either unintentionally, or as part of a
deliberate attempt to compromise a system and expose confidential data.
  We propose a bit-level error coalescing (BEC) static program analysis and its
two use cases to understand and improve program reliability against soft
errors. The BEC analysis tracks each bit corruption in the register file and
classifies the effect of the corruption by its semantics at compile time. The
usefulness of the proposed analysis is demonstrated in two scenarios, fault
injection campaign pruning, and reliability-aware program transformation.
Experimental results show that bit-level analysis pruned up to 30.04 % of
exhaustive fault injection campaigns (13.71 % on average), without loss of
accuracy. Program vulnerability was reduced by up to 13.11 % (4.94 % on
average) through bit-level vulnerability-aware instruction scheduling. The
analysis has been implemented within LLVM and evaluated on the RISC-V
architecture.
  To the best of our knowledge, the proposed BEC analysis is the first
bit-level compiler analysis for program reliability against soft errors. The
proposed method is generic and not limited to a specific computer architecture.
