[llvm] [PassBuilder] Expose parametrized passes related functions (PR #85357)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 01:49:06 PDT 2024


================
@@ -626,6 +626,52 @@ class PassBuilder {
   void invokePipelineEarlySimplificationEPCallbacks(ModulePassManager &MPM,
                                                     OptimizationLevel Level);
 
+  static bool checkParametrizedPassName(StringRef Name, StringRef PassName) {
+    if (!Name.consume_front(PassName))
+      return false;
+    // normal pass name w/o parameters == default parameters
+    if (Name.empty())
+      return true;
----------------
arsenm wrote:

This check is redundant? starts_with would fail for the empty string anyway 

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


More information about the llvm-commits mailing list