[PATCH] TableGen: Generate an enum for all named Operand types

Ahmed Bougacha ahmed.bougacha at gmail.com
Mon Nov 11 13:42:54 PST 2013


Hi Quentin, all,

Here's the next patch I had waiting for review.
In some situations it's very useful to have access to an enum of all
operand types (that is, instances of Operand in the target's tablegen
files).
My use for this is associating MI/SD-pattern level operands with the
underlying list of MC operand, and keeping track of that association.
I also sent a nice-to-have feature implemented in another email
(complete machine operand printing) that was very helpful for
debugging and testing.

Thanks!
- Ahmed

---
 docs/WritingAnLLVMBackend.rst       |  3 +++
 utils/TableGen/InstrInfoEmitter.cpp | 31 +++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-TableGen-Generate-an-enum-for-all-named-Operand-type.patch
Type: application/octet-stream
Size: 3041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131111/6d8fbc9a/attachment.obj>


More information about the llvm-commits mailing list