Migrating to the LLVM New Pass Manager: Modularizing Your IR Pipeline
Learn how to transition from the LLVM Legacy Pass Manager to the New Pass Manager (NPM) to improve IR pipeline efficiency and modularity.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to transition from the LLVM Legacy Pass Manager to the New Pass Manager (NPM) to improve IR pipeline efficiency and modularity.
PassManagerAdapter and Analysis Result Persistence The transition to the New Pass Manager (NPM) in LLVM introduces a functional approach to pass orchestration, utilizing a nested pipeline structure to optimize IR. To maintain compatibility during migration, the PassManagerAdapter allows legacy passes to execute within the NPM framework. A critical design con
Analysis Result Persistence in the New Pass Manager The LLVM New Pass Manager (NPM) utilizes a caching mechanism for analysis results to optimize the pipeline. To maintain correctness, passes must explicitly specify which analyses remain valid after an IR transformation by returning a PreservedAnalyses object. When a pass modifies the IR but fails to correct