[Mlir-commits] [llvm] [mlir] [mlir][EmitC] Add MathToEmitC pass for math function lowering to EmitC (PR #113799)
Tomer Solomon
llvmlistbot at llvm.org
Wed Nov 20 06:53:22 PST 2024
================
@@ -62,4 +62,13 @@ def EmitC_OpaqueAttr : EmitC_Attr<"Opaque", "opaque"> {
def EmitC_OpaqueOrTypedAttr : AnyAttrOf<[EmitC_OpaqueAttr, TypedAttrInterface]>;
+def MathToEmitCLanguageTarget : I32EnumAttr<"MathToEmitCLanguageTarget",
+ "Specifies the language target for generating callees.", [
+ I32EnumAttrCase<"C", 0, "Use C-style function names">,
+ I32EnumAttrCase<"CPP", 1, "Use C++-style function names">
+ ]> {
+ let cppNamespace = "::mlir::emitc";
+}
----------------
recursion-man wrote:
Sounds about right to me. I've moved the LanguageTarget enum to Dialect/EmitC/Transforms/Passes.h as you suggested and removed the Math prefix to generalize the enum for broader use.
https://github.com/llvm/llvm-project/pull/113799
More information about the Mlir-commits
mailing list