summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Fix TypoDavid Greene2011-10-061-1/+1
| | | | | | Compare the entire keyword string. llvm-svn: 141295
* Prefix Template Arg Names with Multiclass NameDavid Greene2011-10-051-0/+3
| | | | | | | | For consistency, prefix multiclass template arg names with the multiclass name followed by "::" to avoid name clashes among multiclass arguments and other entities in the multiclass. llvm-svn: 141239
* Process MultidefsDavid Greene2011-10-051-0/+86
| | | | | | | | | | Process each multidef declared in a multiclass. Iterate through the list and instantiate a def in the multiclass for each item, resolving the list item to the temporary iterator (possibly) used in the multidef ObjectBody. We then process each generated def in the normal way. llvm-svn: 141233
* Parser Multidef SupportDavid Greene2011-10-052-1/+89
| | | | | | | | | | | | | | | Add parser support to recognize multidefs. No processing on the multidef is done at this point. The grammar is: MultiDef = MULTIDEF ObjectName < Value, Declaration, Value > ObjectBody The first Value must be resolveable to a list and the second Value must be resolveable to an integer. The Declaration is a temporary value used as an iterator to refer to list items during processing. It may be passed into the ObjectBody where it will be substituted with the list value used to instantiate each def. llvm-svn: 141232
* Lexer Support for MultidefsDavid Greene2011-10-052-1/+2
| | | | | | Add keyword support for multidefs. llvm-svn: 141231
* Refactor Multiclass Def ProcessingDavid Greene2011-10-052-87/+131
| | | | | | | | Move the code to instantiate a multiclass def, bind its arguments and resolve its members into three helper functions. These will be reused to support a new kind of multiclass def: a multidef. llvm-svn: 141229
* Fix compilation when using gcc-4.6. Patch by wanders.Duncan Sands2011-10-051-1/+1
| | | | llvm-svn: 141178
* Replace snprintf with raw_string_ostream.Francois Pichet2011-10-041-7/+4
| | | | llvm-svn: 141116
* Allow Operator ArgumentsDavid Greene2011-10-041-5/+13
| | | | | | | | | | | | | | | When resolving an operator list element reference, resolve all operator operands and try to fold the operator first. This allows the operator to collapse to a list which may then be indexed. Before, it was not possible to do this: class D<int a, int b> { ... } class C<list<int> A> : D<A[0], A[1]>; class B<list<int> b> : C<!foreach(...,b)>; Now it is. llvm-svn: 141101
* Unbreak MSVC build.Francois Pichet2011-10-041-0/+4
| | | | llvm-svn: 141093
* tblgen: add preprocessor as a separate modeChe-Liang Chiou2011-10-044-0/+679
| | | | | | | | | | | | | | This patch adds a preprocessor that can expand nested for-loops for saving some copy-n-paste in *.td files. The preprocessor is not yet integrated with TGParser, and so it has no direct effect on *.td inputs. However, you may preprocess an td input (and only preprocess it). To test the proprecessor, type: tblgen -E -o $@ $< llvm-svn: 141079
* Move TableGen's parser and entry point into a libraryPeter Collingbourne2011-10-0110-0/+5076
This is the first step towards splitting LLVM and Clang's tblgen executables. llvm-svn: 140951
OpenPOWER on IntegriCloud