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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 06:01:35 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.
----------------
nikic wrote:

Doesn't hurt to mention this. I've added this sentence: "Before creating a new pass, consider whether the functionality can be integrated into an existing pass first. This is often both faster and more powerful."

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


More information about the llvm-commits mailing list