Using standalone tools

We can also exercise the compilation workflow described previously through the usage of LLVM standalone tools, linking the output of one tool into the output of another. Although this slows downs the compilation due to the use of the disk to write intermediary files, it is an interesting didactic exercise to observe the compilation pipeline. This also allows you to fine-tune the parameters given to intermediary tools. Some of these tools are as follows:

  • opt: This is a tool that is aimed at optimizing a program at the IR level. The input must be an LLVM bitcode file (encoded LLVM IR) and the generated output file must have the same type.
  • llc: This is a tool that converts the LLVM bitcode to a target-machine assembly language ...

Get Getting Started with LLVM Core Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.