[Mlir-commits] [mlir] [mlir] Added new attributes to the llvm.call op in llvmir target (PR #99663)
Christian Ulmann
llvmlistbot at llvm.org
Mon Jul 22 02:19:25 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(
----------------
Dinistro wrote:
Nit: Don't use `auto` here, as the type is not given on the RHS.
https://github.com/llvm/llvm-project/pull/99663
More information about the Mlir-commits
mailing list