| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Ask for the record name as a string explicitly to avoid a potential
assert.
llvm-svn: 142504
|
|
|
|
|
|
| |
Add an init function to be shared among Record constructors.
llvm-svn: 142501
|
|
|
|
|
|
|
|
| |
Allow template arg names to be Inits. This is further work to
implement paste as it allows template names to participate in paste
operations.
llvm-svn: 142500
|
|
|
|
|
|
|
| |
Convert SetValue to take the value name as an Init. This allows us to
set values for variables whose names are not yet fully resolved.
llvm-svn: 142499
|
|
|
|
|
|
|
|
| |
Add a couple of utility functions to take a variable name and qualify
it with the namespace of the enclosing class and/or multiclass. This
is inpreparation for making template arg names first-class Inits.
llvm-svn: 142498
|
|
|
|
|
|
|
|
| |
Make the VarInit name an Init itself. We need this to implement paste
functionality so we can reference variables whose names are not yet
completely resolved.
llvm-svn: 142497
|
|
|
|
|
|
|
|
| |
Add accessors to get Record values by Init name. This lets us look up
Record values whose names are not yet fully resolved. More work
toward paste.
llvm-svn: 142496
|
|
|
|
|
|
|
|
| |
note/warning/error as a
string, pass it around as an enum.
llvm-svn: 142107
|
|
|
|
| |
llvm-svn: 141492
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Multidefs are a bit unwieldy and incomplete. Remove them in favor of
another mechanism, probably for loops.
Revert "Make Test More Thorough"
Revert "Fix a typo."
Revert "Vim Support for Multidefs"
Revert "Emacs Support for Multidefs"
Revert "Document Multidefs"
Revert "Add a Multidef Test"
Revert "Update Test for Multidefs"
Revert "Process Multidefs"
Revert "Parser Multidef Support"
Revert "Lexer Support for Multidefs"
Revert "Add Multidef Data Structures"
llvm-svn: 141378
|
|
|
|
|
|
|
|
|
| |
Fix VarListElementInit::resolveListElementReference to return a
partially resolved VarListElementInint in the case where full
resolution is not possible. This allows TableGen to make forward
progress resolving certain complex list expressions.
llvm-svn: 141315
|
|
|
|
| |
llvm-svn: 141305
|
|
|
|
| |
llvm-svn: 141299
|