[llvm] [VPlan] Add `-vplan-print-after=` option (PR #178700)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 9 08:39:43 PST 2026


================
@@ -52,7 +54,11 @@ struct VPlanTransforms {
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
       // Make sure to print before verification, so that output is more useful
       // in case of failures:
-      if (PrintAfterEachVPlanPass) {
+      if (PrintAfterEachVPlanPass ||
+          (PrintAfterVPlanPasses.getNumOccurrences() > 0 &&
+           any_of(PrintAfterVPlanPasses, [PassName](StringRef Entry) {
+             return Regex(Entry).match(PassName);
----------------
eas wrote:

The reason I went with regex is two-step:

1) Avoid writing `VPlanTransforms::`. That version was just a substring match.
2) Once I have substring match from 1), `VPlanTransforms::optimize` was matching much more than I wanted, so I had to switch to a regex.


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


More information about the llvm-commits mailing list