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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 10 08:52:41 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 {
----------------
fhahn wrote:

There must be at most one entry for each kind (to add multiple entries for the same kind would require kind-dependent merging).

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


More information about the llvm-commits mailing list