summaryrefslogtreecommitdiff
path: root/docs/TableGen
Commit message (Collapse)AuthorAge
* [tablegen] Add !listconcat operator with the similar semantics as !strconcatDaniel Sanders2014-05-07
| | | | | | | | | | | | | | | | | | | | Summary: It concatenates two or more lists. In addition to the !strconcat semantics the lists must have the same element type. My overall aim is to make it easy to append to Instruction.Predicates rather than override it. This can be done by concatenating lists passed as arguments, or by concatenating lists passed in additional fields. Reviewers: dsanders Reviewed By: dsanders Subscribers: hfinkel, llvm-commits Differential Revision: http://reviews.llvm.org/D3506 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208183 91177308-0d34-0410-b5e6-96231b3b80d8
* [tablegen] !strconcat accepts more than two arguments but this wasn't ↵Daniel Sanders2014-05-02
| | | | | | | | | | | | | | | | | | | | documented or tested. Summary: * Updated the documentation * Added a test for >2 arguments * Added a check for the lexical concatenation * Made the existing test a bit stricter. Reviewers: t.p.northover Reviewed By: t.p.northover Subscribers: t.p.northover, llvm-commits Differential Revision: http://reviews.llvm.org/D3485 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207865 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] VCS contains a record of authorshipSean Silva2014-04-08
| | | | | | No need to explicitly mention the author in the document. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205793 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Fix some linksSean Silva2014-04-07
| | | | | | | | The TableGen docs have changed structure Patch by Tay Ray Chuan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205744 91177308-0d34-0410-b5e6-96231b3b80d8
* Recover TableGen/LangRef, make it officialRenato Golin2014-04-01
| | | | | | | | | | | | | Making the new TableGen documentation official and marking the old file as "Moved". Also, reverting the original LangRef as the normative formal description of the language, while keeping the "new" LangRef as LangIntro for the less inlcined to reading language grammars. We should remove TableGenFundamentals.rst one day, but for now, just a warning that it moved will have to do, while we make sure there are no more links to it from elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205289 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding some very nascent information about the clang tablegen backends, with ↵Aaron Ballman2014-03-24
| | | | | | a promise to add more information later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204635 91177308-0d34-0410-b5e6-96231b3b80d8
* Add overall description, file comments, some structureRenato Golin2014-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204479 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few more grammatic errors in docs/TableGen/index.rstEli Bendersky2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204364 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a couple of typos and an inaccurate description in the new TableGen docEli Bendersky2014-03-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204363 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-factor TableGen docsRenato Golin2014-03-20
| | | | | | | | | | | | | This is mainly a movement of content around to give place to new content allowing different people to add bits to it in the right place. There is some new content, but mostly to fill the gaps left by text movement. I'm dropping the old syntax documentation as it has the problem of being quickly outdated by changes and largely unnecessary to people not involved in creating the language, but using it, which is the whole point of the documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204351 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] TableGen easter egg: Multiline string literalsSean Silva2014-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | They're called code fragments, but they are really multiline string literals. Just spotted this usage in a patch by Aaron using "code fragments" for holding documentation text. I remember someone bemoaning the lack of multiline string literals in TableGen, so I'm explicitly documenting that code fragments are multiline string literals. Let it be known that any use case needing multiline string literals in TableGen (such as descriptions of options, or whatnot) can use use code fragments (instead of C-style string concatenation or exceedingly long lines). E.g. class Bar<int n>; class Baz<int n>; class Doc<string desc> { string Desc = desc; } def Foo : Bar<1>, Baz<3>, Doc<[{ This Foo is a Bar, and also a Baz. It can take 3 values: * Qux * Quux * Quuux }]>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201033 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow TableGen DAG arguments to be just a name.Jakob Stoklund Olesen2013-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | DAG arguments can optionally be named: (dag node, node:$name) With this change, the node is also optional: (dag node, node:$name, $name) The missing node is treated as an UnsetInit, so the above is equivalent to: (dag node, node:$name, ?:$name) This syntax is useful in output patterns where we currently require the types of variables to be repeated: def : Pat<(subc i32:$b, i32:$c), (SUBCCrr i32:$b, i32:$c)>; This is preferable: def : Pat<(subc i32:$b, i32:$c), (SUBCCrr $b, $c)>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177843 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Fixup fallout from other grammar fixup.Sean Silva2013-02-01
| | | | | | | | | | | | My "excuse" for not refactoring the grammar here is to not diverge too far from the grammar in the comments of TGParser.cpp, since I'm not taking on the quest of majorly refactoring TGParser.cpp at the moment. One benefit of doing this is that Ideas for refactoring and clarifying the grammar in this document should translate almost immediately to beneficial refactorings that can be made to TGParser.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174144 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Add missing colon to TableGen grammar.Sean Silva2013-02-01
| | | | | | Spotted by Eli Bendersky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174143 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an addition operator to TableGenHal Finkel2013-01-25
| | | | | | | This adds an !add(a, b) operator to tablegen; this will be used to cleanup the PPC register definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173445 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen/LangRef: link bang operators into the productionlistSean Silva2013-01-09
| | | | | | | | Now BangOperator should be nicely hyperlinked. Pointed out by Joel Jones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171942 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen/LangRef: discuss specific C-like escapesSean Silva2013-01-09
| | | | | | Suggested by Joel Jones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171941 91177308-0d34-0410-b5e6-96231b3b80d8
* docs: Fix mention of DefmID to MultiClassID.Sean Silva2013-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171940 91177308-0d34-0410-b5e6-96231b3b80d8
* docs: Bring TableGen syntax a bit closer to reality.Sean Silva2013-01-09
| | | | | | | | | It's not just def's but actually a limited subset of Object's that are allowed inside a multiclass. Spotted by Joel Jones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171935 91177308-0d34-0410-b5e6-96231b3b80d8
* tblgen, docs: Add initial syntax reference.Sean Silva2013-01-07
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171685 91177308-0d34-0410-b5e6-96231b3b80d8