[LLVMdev] Where can I find an explanation of $src1, $src2, $in, $ptr, etc.?

David A. Greene greened at obbligato.org
Tue Aug 17 15:15:04 PDT 2010

Mark Lacey <641 at rudkx.com> writes:

> I think I might have answered my own question with a little more browsing and your mention of "arbitrary operand names". It appears
> that the syntax here is recordkind:$name where 'recordkind' has been previously defined, and 'name' is just a descriptive name attached
> to a particular dag node input, which may (or may not) be referred to later in the definition of the current record.
> Is that correct?

Yep.  They are defined in the (ins) and (outs) "dags" so that TableGen
knows how to treat them.

There's a lot of black magic in TableGen in that some innocuous-looking
empty defs ("ins," "outs," "set," etc.) are actually hard-coded to be
recognized as special values in the TableGen tool's C++ code.


More information about the llvm-dev mailing list