[Mlir-commits] [mlir] [OpenACC] Propagate variable names to ops after materializing recipes. (PR #205821)

Razvan Lupusoru llvmlistbot at llvm.org
Thu Jun 25 09:17:20 PDT 2026


================
@@ -111,6 +111,19 @@ static void saveVarName(Value src, Value dst) {
   saveVarName(acc::getVariableName(src), dst);
 }
 
+static void resolveVarNamePlaceholders(Block *block, Block::iterator ip,
+                                       StringRef name) {
+  if (name.empty())
+    return;
+  StringRef placeholder = acc::getVarNamePlaceholder();
+  for (auto it = block->begin(); it != std::next(ip); ++it) {
+    auto attr = it->getAttrOfType<acc::VarNameAttr>(acc::getVarNameAttrName());
+    if (attr && attr.getName() == placeholder)
+      it->setAttr(acc::getVarNameAttrName(),
----------------
razvanlupusoru wrote:

If the name is empty - should the attribute be removed instead so we don't report invalid names?

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


More information about the Mlir-commits mailing list