[Mlir-commits] [mlir] [mlir] Added new attributes to the llvm.call op in llvmir target (PR #99663)
Victor Perez
llvmlistbot at llvm.org
Mon Jul 22 02:55:59 PDT 2024
================
@@ -219,6 +219,28 @@ convertOperationImpl(Operation &opInst, llvm::IRBuilderBase &builder,
}
call->setCallingConv(convertCConvToLLVM(callOp.getCConv()));
call->setTailCallKind(convertTailCallKindToLLVM(callOp.getTailCallKind()));
+ if (callOp.getConvergentAttr())
+ call->addFnAttr(llvm::Attribute::Convergent);
+ if (callOp.getNoUnwindAttr())
+ call->addFnAttr(llvm::Attribute::NoUnwind);
+ if (callOp.getWillReturnAttr())
+ call->addFnAttr(llvm::Attribute::WillReturn);
+
+ // memory effects
+ if (callOp.getMemory()) {
+ MemoryEffectsAttr memAttr = callOp.getMemoryAttr();
----------------
victor-eds wrote:
```suggestion
if (MemoryEffectsAttr memAttr = callOp.getMemoryAttr()) {
```
This should work
https://github.com/llvm/llvm-project/pull/99663
More information about the Mlir-commits
mailing list