[llvm] [VPlan][UTC] Number VPlan passes' instances in printing/filtering (PR #211424)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 30 08:09:17 PDT 2026


================
@@ -57,11 +57,18 @@ struct VPlanTransforms {
   static decltype(auto) runPass(StringRef PassName, PassTy &&Pass, VPlan &Plan,
                                 ArgsTy &&...Args) {
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+    static DenseMap<std::pair<Function *, StringRef /* Pass */>, unsigned>
----------------
eas wrote:

Keying by VPlan is dangerous because different VPlan might get allocated at the same pointer randomly. Keying by function would mostly work (at least in single-thread mode) because we don't delete functions from inside the vectorizer and that is just enough for testing/debugging.

Another issue with keying by VPlan is that it would partially defeat the purpose. For scalable-vector targets we build multiple VPlans (fixed/scalable) and we do want to be able to differentiate their dumps as otherwise UTC script would see multiple dumps and refuse to generate CHECKs.

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


More information about the llvm-commits mailing list