[llvm-dev] meaning of $ in tablegen

Dylan McKay via llvm-dev llvm-dev at lists.llvm.org
Sun Jan 24 16:20:41 PST 2016


Whenever you use a variable in TableGen, you write it

<type>:$<name>

The name is always prefixed with a $, similar to how in IR, identifiers are
always prefixed with % or @.
​

On Sat, Jan 23, 2016 at 11:59 AM, Rail Shafigulin via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> What is the meaning of a $ sign in tablgen? Here is an example
>
>
> // Pattern fragments
> def vextract_sext_i8 : PatFrag<(ops node:$vec, node:$idx),
>                                               (MipsVExtractSExt node:$vec,
> node:$idx, i8)>;
>
> Taken from
>
>
> https://github.com/llvm-mirror/llvm/blob/fd031a51c35d1781c066a42e221a7ae28610be3f/lib/Target/Mips/MipsMSAInstrInfo.td#L118
>
> --
> Rail Shafigulin
> Software Engineer
> Esencia Technologies
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160125/d9f2824c/attachment.html>


More information about the llvm-dev mailing list