[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)
----------------
fhahn wrote:

The print functions can be quite handy to use in a debugger, when it could be nullptr. Although the latest version passes VPSlotTracker instead, and that already accounts for the plan being nullptr, which allows printing of recipes currently not connected to a Plan.

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


More information about the llvm-commits mailing list