[Mlir-commits] [mlir] [mlir][LLVMIR] Fix loop follow-up metadata import and export (PR #223376)

Tobias Gysi llvmlistbot at llvm.org
Fri Sep 18 04:52:27 PDT 2026


================
@@ -110,11 +110,15 @@ void LoopAnnotationConversion::convertFollowupNode(StringRef name,
   if (!attr)
     return;
 
-  llvm::MDNode *node =
+  llvm::MDNode *loopID =
       loopAnnotationTranslation.translateLoopAnnotation(attr, op);
 
-  metadataNodes.push_back(
-      llvm::MDNode::get(ctx, {llvm::MDString::get(ctx, name), node}));
+  // Follow-ups contain properties directly, without the LoopID self-reference.
+  SmallVector<llvm::Metadata *, 4> operands;
----------------
gysit wrote:

```suggestion
  SmallVector<llvm::Metadata *> operands;
```
nit: we usually don't specify a size except the required space is known for sure. 

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


More information about the Mlir-commits mailing list