[llvm] [Tablegen] Add keyword `dump`. (PR #68793)

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 23:14:04 PDT 2023


================
@@ -1275,6 +1275,37 @@ be nested.
 This loop defines records named ``R0``, ``R1``, ``R2``, and ``R3``, along
 with ``F0``, ``F1``, ``F2``, and ``F3``.
 
+``dump`` --- print messages to stderr
+-------------------------------------
+
+A ``dump`` statement prints the input string to standard error
+output. It is intended for debugging purpose.
+
+* At top level, the message is printed immediately.
+
+* In a record definition, the message is saved and all messages are
+  printed after the record is completely built.
+
+* In a class definition, the messages are saved and inherited by all
+  the subclasses and records that inherit from the class. The messages
+  are then printed when the records are completely built.
+
+* In a multiclass definition, the messages are saved with the other
+  components of the multiclass and then printed each time the
+  multiclass is instantiated with ``defm``.
----------------
fpetrogalli wrote:

Done, thank you!

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


More information about the llvm-commits mailing list