[llvm] [VPlan][UTC] Number VPlan passes' instances in printing/filtering (PR #211424)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 30 08:00:14 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>
----------------
fhahn wrote:
Should this be keyed by the vplan instead of the function, we could optimize multiple plans per function (not really relevant for the unit test, but may be for debugging)?
I think this static map may get accessed in parallel when doing ThinLTO, but if we guard this behind the printing flag, it should not cause issues in practice.
Otherwise, `LLVM_THREAD_LOCAL` may be needed like used in `PrettyStackTrace.cpp` etc
https://github.com/llvm/llvm-project/pull/211424
More information about the llvm-commits
mailing list