[Mlir-commits] [mlir] [mlir][nvvm]Add support for grid_constant attribute on LLVM function arguments (PR #78228)
Mehdi Amini
llvmlistbot at llvm.org
Thu Jan 18 08:30:41 PST 2024
================
@@ -59,6 +59,19 @@ getAttrKindToNameMapping() {
return kindNamePairs;
}
+static llvm::DenseMap<llvm::StringRef, llvm::Attribute::AttrKind>
+getAttrNameToKindMapping() {
+ static auto attrNameToKindMapping = []() {
+ static llvm::DenseMap<llvm::StringRef, llvm::Attribute::AttrKind>
+ nameKindMap;
+ for (auto kindNamePair : getAttrKindToNameMapping()) {
+ nameKindMap.insert({kindNamePair.second, kindNamePair.first});
+ }
+ return nameKindMap;
+ }();
----------------
joker-eph wrote:
Here is an example: https://github.com/llvm/llvm-project/blob/main/mlir/lib/CAPI/ExecutionEngine/ExecutionEngine.cpp#L26-L32
https://github.com/llvm/llvm-project/pull/78228
More information about the Mlir-commits
mailing list