[Mlir-commits] [llvm] [mlir] [mlir][LLVM] handle argument and result attributes in llvm.call and llvm.invoke (PR #123177)
Christian Ulmann
llvmlistbot at llvm.org
Sun Feb 9 23:22:02 PST 2025
================
@@ -224,6 +224,34 @@ static void convertLinkerOptionsOp(ArrayAttr options,
linkerMDNode->addOperand(listMDNode);
}
+static LogicalResult
+convertParameterAndResultAttrs(CallOpInterface callOp, llvm::CallBase *call,
+ LLVM::ModuleTranslation &moduleTranslation) {
+ if (ArrayAttr argAttrsArray = callOp.getArgAttrsAttr()) {
+ for (auto [argIdx, argAttrsAttr] : llvm::enumerate(argAttrsArray)) {
+ if (auto argAttrs = llvm::cast<DictionaryAttr>(argAttrsAttr)) {
----------------
Dinistro wrote:
```suggestion
if (auto argAttrs = cast<DictionaryAttr>(argAttrsAttr)) {
```
Same below. MLIR re-exports the casts in their own namespace.
https://github.com/llvm/llvm-project/pull/123177
More information about the Mlir-commits
mailing list