summaryrefslogtreecommitdiffstats
path: root/llvm/docs/TableGen
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2019-04-10 18:26:36 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2019-04-10 18:26:36 +0000
commit5d9f656bb75ed4d0b9eb628115edd785fc61473b (patch)
tree93e4700dbe04370215abb1b899597bb1b7e97b83 /llvm/docs/TableGen
parent163157378ee8ff2975cec933ab9ae31761b6ffff (diff)
downloadbcm5719-llvm-5d9f656bb75ed4d0b9eb628115edd785fc61473b.tar.gz
bcm5719-llvm-5d9f656bb75ed4d0b9eb628115edd785fc61473b.zip
[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
Diffstat (limited to 'llvm/docs/TableGen')
-rw-r--r--llvm/docs/TableGen/LangIntro.rst4
-rw-r--r--llvm/docs/TableGen/LangRef.rst2
2 files changed, 5 insertions, 1 deletions
diff --git a/llvm/docs/TableGen/LangIntro.rst b/llvm/docs/TableGen/LangIntro.rst
index 1a5f8b9ab30..45104ac78b8 100644
--- a/llvm/docs/TableGen/LangIntro.rst
+++ b/llvm/docs/TableGen/LangIntro.rst
@@ -189,6 +189,10 @@ supported include:
More than two arguments are accepted with the result being the concatenation
of all the lists given.
+``!listsplat(a, size)``
+ A list value that contains the value ``a`` ``size`` times.
+ Example: ``!listsplat(0, 2)`` results in ``[0, 0]``.
+
``!strconcat(a, b, ...)``
A string value that is the result of concatenating the 'a' and 'b' strings.
More than two arguments are accepted with the result being the concatenation
diff --git a/llvm/docs/TableGen/LangRef.rst b/llvm/docs/TableGen/LangRef.rst
index 59be6af3504..195106ac6d1 100644
--- a/llvm/docs/TableGen/LangRef.rst
+++ b/llvm/docs/TableGen/LangRef.rst
@@ -100,7 +100,7 @@ wide variety of meanings:
:!or !empty !subst !foreach !strconcat
:!cast !listconcat !size !foldl
:!isa !dag !le !lt !ge
- :!gt !ne !mul
+ :!gt !ne !mul !listsplat
TableGen also has !cond operator that needs a slightly different
syntax compared to other "bang operators":
OpenPOWER on IntegriCloud