LLVM Pass Implementation

12-22-2025

Implementing LLVM Passes is a nuanced but well-documented process. Luckily, given the modularized structure of LLVM, creating a custom pass does not require starting from the ground up. Under the new pass manager, all custom passes inherit from PassInfoMixin<PassT>, which contains a run() function which returns PreservedAnalysis and takes in some unit of IR with an analysis manager.