LLVM-based stochastic error propagation analysis of manually developed software components
Published in Stein Haugen, Anne Barros, Coen van Gulijk, Trond Kongsvik, Jan Erik Vinnem, Safety and Reliability – Safe Societies in a Changing World, 2018
A. Morozov, K. Janschek, Y. Zhou
Figure 5 shows a typical LLVM-based workflow. An input source code, e.g. a C-code or any other of more than 20 LLVM supported languages, can be compiled with clang into the LLVM IR. Using the LLVM API, an optimizer can be built that produces an optimized version of the compiled LLVM IR, which, in turn, can be further compiled with llc for x86, ARM, PowerPC or other platforms. The optimizer can be built with so-called analysis or transformation passes. An analysis pass does not change the input IR, but provides analytical information, for instance, counts the number of instructions or builds a call graph. In contrast, a transformation pass changes and optimizes the original LLVM IR.