[llvm] [mlir] [mlir][nvvm]Add support for grid_constant attribute on LLVM function arguments (PR #78228)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 00:43:04 PST 2024


================
@@ -90,6 +102,20 @@ class LLVMTranslationInterface
     }
     return success();
   }
+
+  /// Acts on the given function operation using the interface implemented by
+  /// the dialect of one of the function parameter attributes.
+  virtual LogicalResult
+  convertParameterAttr(LLVM::LLVMFuncOp function, int argIdx,
+                       NamedAttribute attribute,
+                       LLVM::ModuleTranslation &moduleTranslation) const {
+    if (const LLVMTranslationDialectInterface *iface =
+            getInterfaceFor(attribute.getNameDialect())) {
+      return iface->convertParameterAttr(function, argIdx, attribute,
+                                         moduleTranslation);
+    }
+    return success();
----------------
joker-eph wrote:

(unresolving, @ftynse should take another look here and acknowledge the solution explicitly)

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


More information about the llvm-commits mailing list