[Mlir-commits] [mlir] [MLIR][LLVM] Attach kernel metadata representation to `llvm.func` (PR #101314)
Tobias Gysi
llvmlistbot at llvm.org
Thu Aug 1 02:40:34 PDT 2024
================
@@ -1448,6 +1483,42 @@ static void convertFunctionAttributes(LLVMFuncOp func,
convertFunctionMemoryAttributes(func, llvmFunc);
}
+/// Converts function attributes from `func` and attaches them to `llvmFunc`.
+template <typename TypeConverter>
+static void convertFunctionKernelAttributes(LLVMFuncOp func,
+ llvm::Function *llvmFunc,
+ TypeConverter convertType) {
----------------
gysit wrote:
```suggestion
function_ref<llvm::Type(Type)> convertType) {
```
I think we can avoid the template parameter using a function reference? Alternatively this could be a private member function of the ModuleTranslation. Then the converter can be accessed directly?
https://github.com/llvm/llvm-project/pull/101314
More information about the Mlir-commits
mailing list