[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:03 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:

How can this evaluate to `false`? Wouldn't you either require a `dyn_cast` or a `cast_or_null` for this to be possible? (Same below)

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


More information about the Mlir-commits mailing list