Overview
There are several steps involved in transforming the LLVM IR into target assembly code. The IR is converted to a backend-friendly representation of instructions, functions, and globals. This representation changes as the program progresses through the backend phases and gets closer to the actual target instructions. The following diagram shows an overview of the necessary steps to go from LLVM IR to object code or assembly, while indicating, in white boxes, where extraneous optimization passes can act to further improve the translation quality.
This translation pipeline is composed of different phases of the backend, which are shown in the light gray, intermediary boxes. They are also called superpasses because, internally, they are implemented with several smaller passes. The difference between these and white boxes is that, in general, the former represent a set of passes that are critical to the success of the backend, while the latter are more important for increasing the generated...