[Mlir-commits] [mlir] [mlir] Added new attributes to the llvm.call op in llvmir target (PR #99663)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jul 22 07:57:05 PDT 2024


================
@@ -1471,6 +1471,30 @@ LogicalResult ModuleImport::convertInstruction(llvm::Instruction *inst) {
     callOp.setTailCallKind(
         convertTailCallKindFromLLVM(callInst->getTailCallKind()));
     setFastmathFlagsAttr(inst, callOp);
+
+    // handle function attrs
+    if (callInst->hasFnAttr(llvm::Attribute::Convergent))
+      callOp.setConvergent(true);
+    if (callInst->hasFnAttr(llvm::Attribute::NoUnwind))
+      callOp.setNoUnwind(true);
+    if (callInst->hasFnAttr(llvm::Attribute::WillReturn))
+      callOp.setWillReturn(true);
+
+    // memory effects
+    llvm::MemoryEffects memEffects = callInst->getMemoryEffects();
+    // Only set the attr when it does not match the default value.
+    auto othermem = convertModRefInfoFromLLVM(
----------------
FMarno wrote:

Sure, done

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


More information about the Mlir-commits mailing list