[llvm] [DeveloperPolicy] Add guidelines for adding/enabling passes (PR #158591)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 15 10:34:19 PDT 2025


================
@@ -1185,6 +1185,50 @@ Suggested disclaimer for the project README and the main project web page:
    necessarily a reflection of the completeness or stability of the code, it
    does indicate that the project is not yet endorsed as a component of LLVM.
 
+Adding or enabling a new LLVM pass
+----------------------------------
+
+The guidelines here are primarily targeted at the enablement of new major
+passes in the target-independent optimization pipeline. Small additions, or
+backend-specific passes, require a lesser degree of care.
----------------
aengelke wrote:

Before adding a new pass it might make sense to consider whether this actually needs to be a separate pass. Often, small transformations can be integrated into other passes, reducing maintenance and compile-time cost. Particularly in the back-end, there are many small passes that could be combined.

This is likely not worth mentioning here, given that this targets larger middle-end optimizations; so feel free to disregard this.

https://github.com/llvm/llvm-project/pull/158591


More information about the llvm-commits mailing list