Commit Graph

30 Commits

Author SHA1 Message Date
Craig Topper
568f7e8228 Remove neverHasSideEffects support from TableGen CodeGenInstruction. Everyone should use hasSideEffects now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222809 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-26 04:11:14 +00:00
Jonathan Roelofs
69ee7cb4c3 Fix typo in TableGen documentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219018 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-03 20:46:05 +00:00
Joerg Sonnenberger
b9f34663cb Document !and. Fix !shl and friends -- they provide binary operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217034 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-03 13:17:03 +00:00
Eric Christopher
d5dd8ce2a5 Reinstate "Nuke the old JIT."
Approved by Jim Grosbach, Lang Hames, Rafael Espindola.

This reinstates commits r215111, 215115, 215116, 215117, 215136.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216982 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-02 22:28:02 +00:00
Eric Christopher
aa5b9c0f6f Temporarily Revert "Nuke the old JIT." as it's not quite ready to
be deleted. This will be reapplied as soon as possible and before
the 3.6 branch date at any rate.

Approved by Jim Grosbach, Lang Hames, Rafael Espindola.

This reverts commits r215111, 215115, 215116, 215117, 215136.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215154 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-07 22:02:54 +00:00
Rafael Espindola
875710a2fd Nuke the old JIT.
I am sure we will be finding bits and pieces of dead code for years to
come, but this is a good start.

Thanks to Lang Hames for making MCJIT a good replacement!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215111 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-07 14:21:18 +00:00
Pete Cooper
e216468fef Update Tablegen documents given that binary literals are now sized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215088 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-07 05:47:13 +00:00
JF Bastien
5e48675853 Fix typos in comments and doc
Committing http://reviews.llvm.org/D4798 for Robin Morisset (morisset@google.com)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214934 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-05 23:27:34 +00:00
Dan Liew
cef5388ce8 Fix Sphinx warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213559 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-21 16:39:00 +00:00
Adam Nemet
30cced119b [TableGen] Allow shift operators to take bits<n>
Convert the operand to int if possible, i.e. if the value is properly
initialized.  (I suppose there is further room for improvement here to also
peform the shift if the uninitialized bits are shifted out.)

With this little change we can now compute the scaling factor for compressed
displacement with pure tablegen code in the X86 backend.  This is useful
because both the X86-disassembler-specific part of tablegen and the assembler
need this and TD is the natural sharing place.

The patch also adds the missing documentation for the shift and add operator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213277 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-17 17:04:27 +00:00
Daniel Sanders
d80222a48b [tablegen] Add !listconcat operator with the similar semantics as !strconcat
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
2014-05-07 10:13:19 +00:00
Daniel Sanders
1913eeb385 [tablegen] !strconcat accepts more than two arguments but this wasn't 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
2014-05-02 19:25:52 +00:00
Sean Silva
2300669d41 [docs] VCS contains a record of authorship
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
2014-04-08 21:12:56 +00:00
Sean Silva
b9a65fd002 [docs] Fix some links
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
2014-04-07 22:46:40 +00:00
Renato Golin
a5b283ab23 Recover TableGen/LangRef, make it official
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
2014-04-01 09:51:49 +00:00
Aaron Ballman
9f00cd9602 Adding some very nascent information about the clang tablegen backends, with a promise to add more information later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204635 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-24 18:18:31 +00:00
Renato Golin
ec15d70712 Add overall description, file comments, some structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204479 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-21 16:49:43 +00:00
Eli Bendersky
072228083f Fix a few more grammatic errors in docs/TableGen/index.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204364 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-20 17:59:37 +00:00
Eli Bendersky
f631e0b64e Fix a couple of typos and an inaccurate description in the new TableGen doc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204363 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-20 17:45:30 +00:00
Renato Golin
1625937ddb Re-factor TableGen docs
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
2014-03-20 16:08:34 +00:00
Sean Silva
f408f0f0d7 [docs] TableGen easter egg: Multiline string literals
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
2014-02-09 02:43:50 +00:00
Jakob Stoklund Olesen
4717fd4c0f Allow TableGen DAG arguments to be just a name.
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
2013-03-24 19:36:51 +00:00
Sean Silva
f1f57c5c1a [docs] Fixup fallout from other grammar fixup.
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
2013-02-01 03:50:20 +00:00
Sean Silva
de4b0a083a [docs] Add missing colon to TableGen grammar.
Spotted by Eli Bendersky.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174143 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-01 03:32:38 +00:00
Hal Finkel
d23a41c153 Add an addition operator to TableGen
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
2013-01-25 14:49:08 +00:00
Sean Silva
96a05b3074 TableGen/LangRef: link bang operators into the productionlist
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
2013-01-09 02:20:31 +00:00
Sean Silva
104f2b5e91 TableGen/LangRef: discuss specific C-like escapes
Suggested by Joel Jones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171941 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 02:20:30 +00:00
Sean Silva
d155ffc03f docs: Fix mention of DefmID to MultiClassID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-09 02:20:24 +00:00
Sean Silva
9302dcc914 docs: Bring TableGen syntax a bit closer to reality.
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
2013-01-09 02:11:55 +00:00
Sean Silva
26b8aab72e tblgen, docs: Add initial syntax reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171685 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-07 02:43:44 +00:00