summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen
Commit message (Collapse)AuthorAgeFilesLines
...
* StringRef'ize EmitSourceFileHeader().Ahmed Charles2012-02-191-1/+1
| | | | llvm-svn: 150917
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-072-5/+5
| | | | llvm-svn: 149967
* Implement String Cast from IntegerDavid Greene2012-01-301-0/+5
| | | | | | Allow casts from integer to string. llvm-svn: 149273
* Fix Record Name ReferenceDavid Greene2012-01-281-1/+1
| | | | | | Get the record name though the init to avoid an assert. llvm-svn: 149153
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-5/+0
| | | | llvm-svn: 148578
* TblGen diagnostic for mismatched template instantiation.Jim Grosbach2012-01-201-0/+4
| | | | | | | | | | | | | | | | | | 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
* Removing unused default switch cases in switches over enums that already ↵David Blaikie2012-01-161-3/+0
| | | | | | | | 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
* Delete CodeInit and CodeRecTy from TableGen.Jakob Stoklund Olesen2012-01-132-33/+3
| | | | | | | 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
* Use uniqued StringInit pointers for lookups.Jakob Stoklund Olesen2012-01-132-21/+9
| | | | | | | This avoids a gazillion StringMap and dynamic_cast calls, making TableGen run 3x faster. llvm-svn: 148091
* TableGen: add a commentDylan Noblesmith2011-12-221-1/+1
| | | | llvm-svn: 147199
* try to fix MSVC buildDylan Noblesmith2011-12-221-0/+3
| | | | llvm-svn: 147198
* drop unneeded config.h includesDylan Noblesmith2011-12-221-1/+0
| | | | llvm-svn: 147197
* Fix up the CMake build for the new files added in r146960, they'reChandler Carruth2011-12-201-0/+1
| | | | | | likely to stay either way that discussion ends up resolving itself. llvm-svn: 146966
* Unweaken vtables as per ↵David Blaikie2011-12-203-0/+27
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* Check for error after InstantiateMultclassDef.Jim Grosbach2011-12-021-0/+2
| | | | llvm-svn: 145689
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-291-4/+0
| | | | llvm-svn: 145420
* ARM vldm and vstm VFP instructions can take a data type suffix.Jim Grosbach2011-11-111-1/+1
| | | | | | | | | | | | 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
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-031-0/+23
| | | | llvm-svn: 143634
* Implement PasteDavid Greene2011-10-193-28/+67
| | | | | | | | | | | | | | 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
* Process NAMEDavid Greene2011-10-191-8/+35
| | | | | | | During multiclass def instantiation, replace NAME in any expressions with the value of the def or defm ID. llvm-svn: 142524
* Process Defm Prefix as InitDavid Greene2011-10-192-20/+40
| | | | | | | Parse and process a defm prefix as an Init expression. This allows paste operations to create defm prefixes. llvm-svn: 142523
* Parse Def ID as ValueDavid Greene2011-10-192-14/+42
| | | | | | | Allow def and defm IDs to be general values. We need this for paste functionality. llvm-svn: 142522
* Don't Parse Object Body as a NameDavid Greene2011-10-191-0/+4
| | | | | | | | 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
* Use Parse ModeDavid Greene2011-10-191-2/+9
| | | | | | | 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
* Make ID Parsing More FlexibleDavid Greene2011-10-192-10/+26
| | | | | | | | | | | | | | | | | | | 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 NAME MemberDavid Greene2011-10-192-1/+6
| | | | | | | | 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
* Fix Name AccessDavid Greene2011-10-191-2/+3
| | | | | | Get the Record name as a string explicitly to avoid asserts. llvm-svn: 142517
* Fix Name AccessDavid Greene2011-10-191-1/+2
| | | | | | Get the Record name as a string explicitly to avoid asserts. llvm-svn: 142516
* Fix Name AccessDavid Greene2011-10-191-2/+3
| | | | | | Get the Record name as a string explicitly to avoid asserts. llvm-svn: 142515
* Fix Name AccessDavid Greene2011-10-191-1/+2
| | | | | | Get the Record name by string explicitly to avoid potential asserts. llvm-svn: 142514
* Disambiguate Numbers and IdentifiersDavid Greene2011-10-191-1/+37
| | | | | | | | 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 PeekDavid Greene2011-10-192-0/+5
| | | | | | | | | | | | | 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
* Resolve Record NamesDavid Greene2011-10-191-0/+6
| | | | | | | When resolving Record values, be sure to update the Record name as it may contain references to the value. llvm-svn: 142511
* Allow Names Changes on Unregistered RecordsDavid Greene2011-10-191-4/+3
| | | | | | | | | | | 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
* Fix Name AccessDavid Greene2011-10-191-1/+1
| | | | | | Ask for the Record name as a string explicitly to avoid a possible assert. llvm-svn: 142506
* Fix Name AccessDavid Greene2011-10-191-1/+1
| | | | | | | Ask for the Record name as a string explicitly to avoid a possible assert. llvm-svn: 142505
* Fix Name AccessDavid Greene2011-10-191-1/+1
| | | | | | | Ask for the record name as a string explicitly to avoid a potential assert. llvm-svn: 142504
* Add Record InitDavid Greene2011-10-191-0/+4
| | | | | | Add an init function to be shared among Record constructors. llvm-svn: 142501
* Make Template Arg Names InitsDavid Greene2011-10-193-34/+43
| | | | | | | | 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
* Let SetValue Take and Init NameDavid Greene2011-10-192-9/+17
| | | | | | | 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 Utility to Scope NamesDavid Greene2011-10-191-0/+36
| | | | | | | | 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 VarInit Name an InitDavid Greene2011-10-191-1/+13
| | | | | | | | 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 Value AccessorsDavid Greene2011-10-191-0/+12
| | | | | | | | 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
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-161-2/+2
| | | | | | | | note/warning/error as a string, pass it around as an enum. llvm-svn: 142107
* Revert r141079: tblgen: add preprocessor as a separate modeChe-Liang Chiou2011-10-084-680/+0
| | | | llvm-svn: 141492
* Remove MultidefsDavid Greene2011-10-074-178/+2
| | | | | | | | | | | | | | | | | | | 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 List-of-List ProcessingDavid Greene2011-10-061-1/+3
| | | | | | | | | 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
* Use StringSwitch.Benjamin Kramer2011-10-061-19/+21
| | | | llvm-svn: 141305
* Simplify code. No functionality change.Benjamin Kramer2011-10-061-26/+24
| | | | llvm-svn: 141299
OpenPOWER on IntegriCloud