-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
LLVM Code Generation
By :
Like the LLVM IR, the Machine IR can be represented in a textual format. In this section, we’ll describe how this format is structured and how to understand it.
The textual format of the Machine IR is called MIR and the related files are suffixed with the .mir file extension.
On .mir files
The .mir format is intended for developers only. It’s used extensively to test specific parts of the backend within the LLVM project but isn’t expected to be used beyond that. For instance, it isn’t guaranteed to be stable from one LLVM release to another and doesn’t offer any compatibility guarantees. The bottom line is this: don’t use this format beyond unit testing and debugging!
Let’s start by learning how a .mir file is structured.
The .mir file format uses YAML Ain’t Markup Language (YAML), a human-readable text format where you can represent...