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

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 3 05:25:07 PST 2025


================
@@ -4282,6 +4288,11 @@ class VPlan {
   /// Return the VPIRBasicBlock wrapping the header of the scalar loop.
   VPIRBasicBlock *getScalarHeader() const { return ScalarHeader; }
 
+  /// Return the Module from the scalar header.
+  const Module &getModule() const {
+    return *ScalarHeader->getIRBasicBlock()->getModule();
+  }
+
----------------
ayalz wrote:

Have VPlan return Module only for VPIRMetadata to print itself (under DEBUG)?
Could (the Module of) VPSlotTracker's MST be used instead?

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


More information about the llvm-commits mailing list