[Mlir-commits] [mlir] [mlir] Add optimization attrs for gpu-to-llvmspv function declarations (PR #99301)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jul 17 07:49:05 PDT 2024


================
@@ -53,6 +52,17 @@ static LLVM::LLVMFuncOp lookupOrCreateSPIRVFn(Operation *symbolTable,
         symbolTable->getLoc(), name,
         LLVM::LLVMFunctionType::get(resultType, paramTypes));
     func.setCConv(LLVM::cconv::CConv::SPIR_FUNC);
+    func.setNoUnwind(true);
+    func.setWillReturn(true);
----------------
FMarno wrote:

I was thinking that that will only happen when you use the function incorrectly, which in undefined behaviour anyway, but I'm not that sure so that's fine.

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


More information about the Mlir-commits mailing list