How to find the unknown
If we told you to look for a specific transformation, you would find it by looking for some keywords across the code base (using git grep
, for instance). However, if you do not know what exists in the middle end, how do you even begin to look for it?
In this section, you will discover two main ways to approach the LLVM code base to find what it has to offer. This information is important as it allows you to reuse what exists instead of reimplementing everything.
The first approach leverages opt
, an LLVM-provided developer tool, to present human-friendly information. We will show you how to dig into the code base using that information.
In the second approach, we flip the angle of attack by starting from the source files instead of the developer-facing tools. You will discover what to expect in each directory and how to extract the relevant information from the source files.
Leveraging opt
The developer tool named opt
acts as a driver for...