[llvm] [VPlan] Implement printing VPIRMetadata. (PR #168385)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 25 04:03:45 PST 2025


================
@@ -1706,6 +1711,28 @@ void VPIRMetadata::intersect(const VPIRMetadata &Other) {
   Metadata = std::move(MetadataIntersection);
 }
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+void VPIRMetadata::print(raw_ostream &O, const VPlan *Plan) const {
+  if (Metadata.empty() || !Plan)
+    return;
+
+  const Module &M = Plan->getModule();
+  SmallVector<StringRef, 8> MDNames;
+  M.getContext().getMDKindNames(MDNames);
----------------
fhahn wrote:

Yes, I moved it to the VPSlotTracker to cache it there on demand, thanks

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


More information about the llvm-commits mailing list