[llvm] [LLVM-Tablegen] Pretty Printing Arguments in LLVM Intrinsics (PR #162629)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 3 10:33:36 PST 2025
================
@@ -142,6 +142,25 @@ class Range<AttrIndex idx, int lower, int upper> : IntrinsicProperty {
int Upper = upper;
}
+// ArgProperty - Base class for argument properties that can be specified in ArgInfo.
+class ArgProperty;
+
+// ArgName - Specifies the name of an argument for pretty-printing.
+class ArgName<string name> : ArgProperty {
+ string Name = name;
+}
+
+// ImmArgPrinter - Specifies a custom printer function for immediate arguments.
+class ImmArgPrinter<string funcname> : ArgProperty {
+ string FuncName = funcname;
+}
+
+// ArgInfo - The specified argument has properties defined by a list of ArgProperty objects.
+class ArgInfo<AttrIndex idx, list<ArgProperty> arg_properties> : IntrinsicProperty {
----------------
jurahul wrote:
nit: This should be ArgIndex as opposed to AttrIndex, since we expect it to be used only for arguments and not return values.
https://github.com/llvm/llvm-project/pull/162629
More information about the llvm-commits
mailing list