[TableGen] Introduce !listsplat 'binary' operator
authorRoman Lebedev <lebedev.ri@gmail.com>
Wed, 10 Apr 2019 18:26:36 +0000 (18:26 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Wed, 10 Apr 2019 18:26:36 +0000 (18:26 +0000)
commit5d9f656bb75ed4d0b9eb628115edd785fc61473b
tree93e4700dbe04370215abb1b899597bb1b7e97b83
parent163157378ee8ff2975cec933ab9ae31761b6ffff
[TableGen] Introduce !listsplat 'binary' operator

Summary:
```
``!listsplat(a, size)``
    A list value that contains the value ``a`` ``size`` times.
    Example: ``!listsplat(0, 2)`` results in ``[0, 0]``.
```

I plan to use this in X86ScheduleBdVer2.td for LoadRes handling.

This is a little bit controversial because unlike every other binary operator
the types aren't identical.

Reviewers: stoklund, javed.absar, nhaehnle, craig.topper

Reviewed By: javed.absar

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60367

llvm-svn: 358117
llvm/docs/TableGen/LangIntro.rst
llvm/docs/TableGen/LangRef.rst
llvm/include/llvm/TableGen/Record.h
llvm/lib/TableGen/Record.cpp
llvm/lib/TableGen/TGLexer.cpp
llvm/lib/TableGen/TGLexer.h
llvm/lib/TableGen/TGParser.cpp
llvm/test/TableGen/listsplat.td [new file with mode: 0644]
llvm/utils/kate/llvm-tablegen.xml