The legacy and new pass manager
The LLVM infrastructure is in the middle of a several-years-long transition from the previous pass manager to the new one. While the goal is ultimately to use only the new pass manager, the reality is for the time being that you still must deal with both implementations. This is especially true for all the passes used for code generation (that is, MachineFunction
-scoped) because the new pass manager does not provide any support for them.
In this section, you have the following:
- A comparison of pass managers’ capabilities
- An overview of how they work internally
- A primer on the application programming interface (API) required by both pass managers
Let us start with the first bullet point: a comparison of their capabilities.
Pass managers’ capabilities
As already hinted, the new pass manager supports fewer scopes than the legacy one. This limitation is a calculated one. Aside from the MachineFunction...