[llvm] [VPlan] Hoist loads with invariant addresses using noalias metadata. (PR #166247)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 10 06:16:42 PST 2025


================
@@ -965,6 +966,13 @@ class VPIRMetadata {
   /// Intersect this VPIRMetada object with \p MD, keeping only metadata
   /// nodes that are common to both.
   void intersect(const VPIRMetadata &MD);
+
+  /// Get metadata of kind \p Kind. Returns nullptr if not found.
+  MDNode *getMetadata(unsigned Kind) const {
----------------
david-arm wrote:

Does it matter if there is more than one entry of kind `Kind` in the list? Is it worth updating the comments above the function to say something like "this returns the first instance of kind \p Kind ..."?

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


More information about the llvm-commits mailing list