[llvm] [mlir] [mlir][EmitC] Add MathToEmitC pass for math function lowering to EmitC (PR #113799)
Tomer Solomon via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 05:55:52 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:
Thanks for the feedback!
@marbre, I’m waiting to hear your opinion on @aniragil's suggestion to use a module-level attribute.
As for C23, since decimal types aren’t yet in the builtin types, lowering into them could be challenging. If C23 doesn’t add immediate benefits, maybe we can start with c99 and cpp11. Thoughts?"
https://github.com/llvm/llvm-project/pull/113799
More information about the llvm-commits
mailing list