[llvm] [VPlan] Implement printing VPIRMetadata. (PR #168385)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 08:59:51 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);
----------------
david-arm wrote:
Isn't this quite an expensive operation? Would be great if there was a way to only do this once, although I realise that might be tricky.
https://github.com/llvm/llvm-project/pull/168385
More information about the llvm-commits
mailing list