summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/TGParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix a subtle multiclass bug: when using class inheritance onBruno Cardoso Lopes2010-06-221-4/+4
| | | | | | a toplevel 'defm', make sure to properly resolve references. llvm-svn: 106570
* Teach tablegen how to inherit from classes in 'defm' definitions.Bruno Cardoso Lopes2010-06-181-0/+50
| | | | | | | The rule is simple: only inherit from a class list if they come in the end, after the last multiclass. llvm-svn: 106305
* Teach tablegen to allow "let" expressions inside multiclasses,Bruno Cardoso Lopes2010-06-101-47/+38
| | | | | | providing more ways to factor out commonality from the records. llvm-svn: 105776
* Teach tablegen to support 'defm' inside multiclasses.Bruno Cardoso Lopes2010-06-051-9/+41
| | | | llvm-svn: 105519
* Add an !eq() operator to TableGen. It operates on strings only.David Greene2010-01-051-0/+7
| | | | | | Use !cast<string>() to compare other types of objects. llvm-svn: 92754
* Fix whitespace.Bob Wilson2009-11-221-195/+184
| | | | llvm-svn: 89582
* This void is implicit in C++.Dan Gohman2009-08-121-1/+1
| | | | llvm-svn: 78848
* Replace std::iostreams with raw_ostream in TableGen.Daniel Dunbar2009-07-031-6/+4
| | | | | | | | - Sorry, I can't help myself. - No intended functionality change. llvm-svn: 74742
* Improve TableGen error reporting.David Greene2009-06-291-1/+5
| | | | llvm-svn: 74443
* rename TGLoc -> SMLoc.Chris Lattner2009-06-211-20/+20
| | | | llvm-svn: 73843
* Revert 73074 and 73099 because Windows doesn't have POSIXDavid Greene2009-06-091-16/+0
| | | | | | | regular expressions. We will add an OpenBSD implementation and re-apply ASAP. llvm-svn: 73138
* Add a !patsubst operator. Use on string types.David Greene2009-06-081-0/+9
| | | | llvm-svn: 73099
* Make IntInits and ListInits typed. This helps deduce types of !if andDavid Greene2009-06-081-25/+140
| | | | | | | | other operators. For the rare cases where a list type cannot be deduced, provide a []<type> syntax, where <type> is the list element type. llvm-svn: 73078
* Add a !regmatch operator to do pattern matching in TableGen.David Greene2009-06-081-0/+7
| | | | llvm-svn: 73074
* Implement !if, analogous to $(if) in GNU make.David Greene2009-05-141-0/+24
| | | | llvm-svn: 71815
* Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.David Greene2009-05-141-1/+74
| | | | | | | | | | Ok, not really, but do support some common LISP functions: * car * cdr * null llvm-svn: 71805
* Implement a !foreach operator analogous to GNU make's $(foreach).David Greene2009-05-141-14/+14
| | | | | | | | | | | | | | Use it on dags and lists like this: class decls { string name; } def Decls : decls; class B<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Sr."))>; llvm-svn: 71803
* Implement a !subst operation simmilar to $(subst) in GNU make to doDavid Greene2009-05-141-72/+72
| | | | | | | | | | | | | | | | def/var/string substitution on generic pattern templates. For example: def Type; def v4f32 : Type; def TYPE : Type; class GenType<Type t> { let type = !(subst TYPE, v4f32, t); } def TheType : GenType<TYPE>; llvm-svn: 71801
* Implement !cast.David Greene2009-05-141-31/+31
| | | | llvm-svn: 71794
* Operation EnhancementsDavid Greene2009-05-141-126/+241
| | | | | | | | | | | Create an OpInit class to serve as a base for all operation Inits. Move parsing of operation constructs to separate functions and reference from multiple places. Add some commented out new operations. Coming soon. llvm-svn: 71789
* Allow multiclass def names to contain "#NAME"" where TableGen replacesDavid Greene2009-05-051-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #NAME# with the name of the defm instantiating the multiclass. This is useful for AVX instruction naming where a "V" prefix is standard throughout the ISA. For example: multiclass SSE_AVX_Inst<...> { def SS : Instr<...>; def SD : Instr<...>; def PS : Instr<...>; def PD : Instr<...>; def V#NAME#SS : Instr<...>; def V#NAME#SD : Instr<...>; def V#NAME#PS : Instr<...>; def V#NAME#PD : Instr<...>; } defm ADD : SSE_AVX_Inst<...>; Results in ADDSS ADDSD ADDPS ADDPD VADDSS VADDSD VADDPS VADDPD llvm-svn: 70979
* Rename the CurMultiClass formal parameter of TGParser::AddSubMultiClassBob Wilson2009-04-301-8/+8
| | | | | | | so that it doesn't shadow the instance variable of the same name. Make the parameter names in method declarations match the definitions. llvm-svn: 70502
* Remove unnecessary "class" keywords.Bob Wilson2009-04-301-1/+1
| | | | llvm-svn: 70499
* Fix trailing whitespace and 80-col. violations in recent TableGen changes.Bob Wilson2009-04-281-27/+34
| | | | llvm-svn: 70319
* Fix multiclass inheritance to limit value resolution to new defs addedDavid Greene2009-04-241-20/+59
| | | | | | | by base multiclasses. Do not attempt to alter defs from previous base multiclasses. This fixes multiple multiclass inheritance. llvm-svn: 69974
* Make BinOps typed and require a type specifier for !nameconcat. ThisDavid Greene2009-04-231-9/+72
| | | | | | | allows binops to be used in typed contexts such as when passing arguments to classes. llvm-svn: 69921
* Allow defm to inherit from multiple multiclasses.David Greene2009-04-221-68/+76
| | | | llvm-svn: 69832
* Implement !nameconcat to concatenate strings and look up the resultingDavid Greene2009-04-221-21/+47
| | | | | | name in the symbol table, returning an object. llvm-svn: 69822
* Implement multiclass inheritance.David Greene2009-04-221-2/+171
| | | | llvm-svn: 69810
* fix a few spelling errors and typosJim Grosbach2009-03-261-1/+1
| | | | llvm-svn: 67758
* Add support to tablegen for naming the nodes themselves, not just the operands, Nate Begeman2009-03-191-1/+13
| | | | | | | in selectiondag patterns. This is required for the upcoming shuffle_vector rewrite, and as it turns out, cleans up a hack in the Alpha instruction info. llvm-svn: 67286
* give each Record a location.Chris Lattner2009-03-131-6/+6
| | | | llvm-svn: 66897
* make "locations" a class instead of a typedef.Chris Lattner2009-03-131-20/+20
| | | | llvm-svn: 66895
* implement support for C-style string literal concatenation in td files.Chris Lattner2009-03-111-2/+14
| | | | llvm-svn: 66663
* Unbreak the build on win32.Cedric Venet2009-02-141-1/+1
| | | | | | | | | | Cleanup some warning. Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync. Only tested with VS2008. hope it does not break anything. feel free to revert. llvm-svn: 64554
* Fun x86 encoding tricks: when adding an immediate value of 128,Dan Gohman2008-10-171-3/+3
| | | | | | | | | | | | | use a SUB instruction instead of an ADD, because -128 can be encoded in an 8-bit signed immediate field, while +128 can't be. This avoids the need for a 32-bit immediate field in this case. A similar optimization applies to 64-bit adds with 0x80000000, with the 32-bit signed immediate field. To support this, teach tablegen how to handle 64-bit constants. llvm-svn: 57663
* produce an error on invalid input instead of asserting:Chris Lattner2008-04-101-0/+5
| | | | | | | def : Pat<((v2f64 (vector_shuffle immAllZerosV_bc, ^ llvm-svn: 49462
* Fix a crash on code like: let x = 1 {xChris Lattner2008-01-101-1/+4
| | | | llvm-svn: 45827
* remove attributions from utils.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45419
* Add TGParser files to VStudio project files. Removed generated files ↵Chuck Rose III2007-11-261-0/+2
| | | | | | section from TableGen project file as it is no longer needed. #Include <algorithm> directly from TGParser.cpp so it can see std::reverse. llvm-svn: 44340
* resolve the last fixme's in the new tblgen parser.Chris Lattner2007-11-221-6/+4
| | | | llvm-svn: 44277
* Rewrite the tblgen parser in a recursive descent style, eliminating the ↵Chris Lattner2007-11-221-0/+1372
bison parser. This makes the parser much easier to understand, eliminates a ton of global variables, and gives tblgen nice caret diagnostics. It is also faster, but tblgen probably doesn't care about performance. There are a couple of FIXMEs which I will take care of next. llvm-svn: 44274
OpenPOWER on IntegriCloud