| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
The TableGenBackend base class doesn't do much, and will be removed
completely soon.
Patch by Sean Silva!
llvm-svn: 158311
|
|
|
|
| |
llvm-svn: 157788
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like this:
foreach i = 0-127 in ...
Use braces for composite ranges:
foreach i = {0-3,9-7} in ...
llvm-svn: 157432
|
|
|
|
|
|
| |
Only fully expanded Records should go into RecordKeeper.
llvm-svn: 157431
|
|
|
|
|
|
| |
Use static type checking.
llvm-svn: 157430
|
|
|
|
|
|
|
|
|
| |
There should be no difference in the resulting binary, given a sufficiently
smart compiler. However we already had compiler timeouts on the generated
code in Intrinsics.gen, this hopefully makes the lives of slow buildbots a
little easier.
llvm-svn: 157161
|
|
|
|
|
|
| |
be used by clang-tblgen.
llvm-svn: 156000
|
|
|
|
| |
llvm-svn: 155016
|
|
|
|
| |
llvm-svn: 155012
|
|
|
|
|
|
| |
Patch by Michael Liao!
llvm-svn: 152232
|
|
|
|
|
|
|
|
| |
hashing infrastructure. I wonder why we don't just use StringMap here,
and I may revisit the issue if I have time, but for now I'm just trying
to consolidate.
llvm-svn: 152023
|
|
|
|
| |
llvm-svn: 151629
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add some data structures to represent for loops. These will be
referenced during object processing to do any needed iteration and
instantiation.
Add foreach keyword support to the lexer.
Add a mode to indicate that we're parsing a foreach loop. This allows
the value parser to early-out when processing the foreach value list.
Add a routine to parse foreach iteration declarations. This is
separate from ParseDeclaration because the type of the named value
(the iterator) doesn't match the type of the initializer value (the
value list). It also needs to add two values to the foreach record:
the iterator and the value list.
Add parsing support for foreach.
Add the code to process foreach loops and create defs based
on iterator values.
Allow foreach loops to be matched at the top level.
When parsing an IDValue check if it is a foreach loop iterator for one
of the active loops. If so, return a VarInit for it.
Add Emacs keyword support for foreach.
Add VIM keyword support for foreach.
Add tests to check foreach operation.
Add TableGen documentation for foreach.
Support foreach with multiple objects.
Support non-braced foreach body with one object.
Do not require types for the foreach declaration. Assume the iterator
type from the iteration list element type.
llvm-svn: 151164
|
|
|
|
| |
llvm-svn: 150917
|
|
|
|
| |
llvm-svn: 149967
|
|
|
|
|
|
| |
Allow casts from integer to string.
llvm-svn: 149273
|
|
|
|
|
|
| |
Get the record name though the init to avoid an assert.
llvm-svn: 149153
|
|
|
|
| |
llvm-svn: 148578
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Providing a template argment to a non-templatized class was crashing
tblgen. Add a diagnostic.
For example,
$ cat bug.td
class A;
def B : A<0> {
}
$ llvm-tblgen bug.td
bug.td:3:11: error: template argument provided to non-template class
def B : A<0> {
^
llvm-svn: 148565
|
|
|
|
|
|
|
|
| |
account for all enumeration values explicitly.
(This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them)
llvm-svn: 148262
|
|
|
|
|
|
|
| |
The code type was always identical to a string anyway. Now it is simply
a synonym. The code literal syntax [{...}] is still valid.
llvm-svn: 148092
|
|
|
|
|
|
|
| |
This avoids a gazillion StringMap and dynamic_cast calls, making
TableGen run 3x faster.
llvm-svn: 148091
|
|
|
|
| |
llvm-svn: 147199
|
|
|
|
| |
llvm-svn: 147198
|
|
|
|
| |
llvm-svn: 147197
|
|
|
|
|
|
| |
likely to stay either way that discussion ends up resolving itself.
llvm-svn: 146966
|
|
|
|
|
|
| |
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch
llvm-svn: 146960
|
|
|
|
| |
llvm-svn: 146409
|
|
|
|
| |
llvm-svn: 145689
|
|
|
|
| |
llvm-svn: 145420
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's ignored by the assembler when present, but is legal syntax. Other
instructions have something similar, but for some mnemonics it's
only sometimes not significant, so this quick check in the parser will
need refactored into something more robust soon-ish. This gets some
basics working in the meantime.
Partial for rdar://10435264
llvm-svn: 144422
|
|
|
|
| |
llvm-svn: 143634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a paste operator '#' to take two identifier-like strings and joint
them. Internally paste gets represented as a !strconcat() with any
necessary casts to string added.
This will be used to implement basic for loop functionality as in:
for i = [0, 1, 2, 3, 4, 5, 6, 7] {
def R#i : Register<...>
}
llvm-svn: 142525
|
|
|
|
|
|
|
| |
During multiclass def instantiation, replace NAME in any expressions
with the value of the def or defm ID.
llvm-svn: 142524
|
|
|
|
|
|
|
| |
Parse and process a defm prefix as an Init expression. This allows
paste operations to create defm prefixes.
llvm-svn: 142523
|
|
|
|
|
|
|
| |
Allow def and defm IDs to be general values. We need this for paste
functionality.
llvm-svn: 142522
|
|
|
|
|
|
|
|
| |
Stop parsing a value if we are in name parsing mode and we see a left
brace. A left brace indicates the start of an object body when we are
parsing a name.
llvm-svn: 142521
|
|
|
|
|
|
|
| |
Augment the value parser to respect the parse mode and not error if an
ID doesn't map to an object and we are in name parsing mode.
llvm-svn: 142520
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a mode control to value and ID parsers. The two modes are:
- Parse a value. Expect the parsed ID to map to an existing object.
- Parse a name. Expect the parsed ID to not map to any existing object.
The first is used when parsing an identifier to be looked up, for
example a record field or template argument. The second is used for
parsing declarations. Paste functionality implies that declarations
can contain arbitrary expressions so we need to be able to call into
the general value parser to parse declarations with paste operators.
So we need a way to parse a value-like thing without expecting that
the result will map to some existing object. This parse mode provides
that.
llvm-svn: 142519
|
|
|
|
|
|
|
|
| |
Add a Value named "NAME" to each Record. This will be set to the def or defm
name when instantiating multiclasses. This will replace the #NAME# processing
hack once paste functionality is in place.
llvm-svn: 142518
|
|
|
|
|
|
| |
Get the Record name as a string explicitly to avoid asserts.
llvm-svn: 142517
|
|
|
|
|
|
| |
Get the Record name as a string explicitly to avoid asserts.
llvm-svn: 142516
|
|
|
|
|
|
| |
Get the Record name as a string explicitly to avoid asserts.
llvm-svn: 142515
|
|
|
|
|
|
| |
Get the Record name by string explicitly to avoid potential asserts.
llvm-svn: 142514
|
|
|
|
|
|
|
|
| |
Use lookahead to determine whether a number is really a number or is
part of something forming an identifier. This won't come into play
until the paste operator is recognized as a unique token.
llvm-svn: 142513
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a peek function to let the Lexer look at a character arbitrarily
far ahead in the stream without consuming anything. We need this to
disambiguate numbers and operands of a paste operation. For example:
def foo#8i
Without lookahead the lexer will treat '8' as a number rather than as
part of a string to be pasted to form an identifier.
llvm-svn: 142512
|
|
|
|
|
|
|
| |
When resolving Record values, be sure to update the Record name as it
may contain references to the value.
llvm-svn: 142511
|
|
|
|
|
|
|
|
|
|
|
| |
Add Record names to be changed even on Records that aren't yet
registered. We need to be able to do this for paste functionality
because we do not want to register def names before they are unique
and that can only happen once all paste operations are done. This
change lets us update Record names formed by paste operations and
register the result later.
llvm-svn: 142510
|
|
|
|
|
|
| |
Ask for the Record name as a string explicitly to avoid a possible assert.
llvm-svn: 142506
|
|
|
|
|
|
|
| |
Ask for the Record name as a string explicitly to avoid a possible
assert.
llvm-svn: 142505
|