[llvm] [mlir] [mlir][EmitC] Add MathToEmitC pass for math function lowering to EmitC (PR #113799)

Marius Brehler via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 06:38:37 PST 2025


================
@@ -780,6 +780,28 @@ def ConvertMathToSPIRV : Pass<"convert-math-to-spirv"> {
   let dependentDialects = ["spirv::SPIRVDialect"];
 }
 
+//===----------------------------------------------------------------------===//
+// MathToEmitC
+//===----------------------------------------------------------------------===//
+
+def ConvertMathToEmitC  : Pass<"convert-math-to-emitc"> {
+  let summary = "Convert some Math operations to EmitC Call_opaque";
+  let description = [{
+    This pass converts supported Math ops to `opaque_call` ops targeting libc/libm
----------------
marbre wrote:

```suggestion
    This pass converts supported Math ops to `call_opaque` ops targeting libc/libm
```

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


More information about the llvm-commits mailing list