summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/Record.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert 73074 and 73099 because Windows doesn't have POSIXDavid Greene2009-06-091-2/+2
| | | | | | | 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-1/+1
| | | | llvm-svn: 73099
* Make IntInits and ListInits typed. This helps deduce types of !if andDavid Greene2009-06-081-7/+46
| | | | | | | | 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-1/+1
| | | | llvm-svn: 73074
* Add extra parenthesis around || statements to pacify compiler.Nick Lewycky2009-05-151-7/+13
| | | | | | Also fix up some 80col violations while I'm there. llvm-svn: 71833
* Implement !if, analogous to $(if) in GNU make.David Greene2009-05-141-1/+1
| | | | llvm-svn: 71815
* Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.David Greene2009-05-141-4/+6
| | | | | | | | | | 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-34/+84
| | | | | | | | | | | | | | 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-53/+53
| | | | | | | | | | | | | | | | 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-40/+40
| | | | llvm-svn: 71794
* Operation EnhancementsDavid Greene2009-05-141-11/+154
| | | | | | | | | | | 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
* Change forward declaration of MultiClass to use the "struct" keyword insteadBob Wilson2009-04-301-1/+1
| | | | | | of "class", so that it matches the subsequent definition. llvm-svn: 70498
* Fix multiclass inheritance to limit value resolution to new defs addedDavid Greene2009-04-241-1/+3
| | | | | | | 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-37/+46
| | | | | | | allows binops to be used in typed contexts such as when passing arguments to classes. llvm-svn: 69921
* Implement !nameconcat to concatenate strings and look up the resultingDavid Greene2009-04-221-2/+11
| | | | | | name in the symbol table, returning an object. llvm-svn: 69822
* Add support to tablegen for naming the nodes themselves, not just the operands, Nate Begeman2009-03-191-4/+8
| | | | | | | 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
* Further constify Record::isSubClassOf.Ted Kremenek2009-03-131-1/+1
| | | | llvm-svn: 66970
* add a new TGError class and use it to propagate location info withChris Lattner2009-03-131-0/+11
| | | | | | | | | | | | | | | | | | | | | errors when thrown. This gets us nice errors like this from tblgen: CMOVL32rr: (set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2)) /Users/sabre/llvm/Debug/bin/tblgen: error: Included from X86.td:116: Parsing X86InstrInfo.td:922: In CMOVL32rr: X86cmov node requires exactly 4 operands! def CMOVL32rr : I<0x4C, MRMSrcReg, // if <s, GR32 = GR32 ^ instead of just: CMOVL32rr: (set GR32:i32:$dst, (X86cmov GR32:$src1, GR32:$src2)) /Users/sabre/llvm/Debug/bin/tblgen: In CMOVL32rr: X86cmov node requires exactly 4 operands! This is all I plan to do with this, but it should be easy enough to improve if anyone cares (e.g. keeping more loc info in "dag" expr records in tblgen. llvm-svn: 66898
* give each Record a location.Chris Lattner2009-03-131-6/+11
| | | | llvm-svn: 66897
* Unbreak LLVM on the MSVC compiler:Argyrios Kyrtzidis2008-10-221-0/+1
| | | | | | | -Bring in int64_t for TableGen/Record.h and TableGen/TGLexer.h -Define strtoull llvm-svn: 57970
* Fun x86 encoding tricks: when adding an immediate value of 128,Dan Gohman2008-10-171-7/+7
| | | | | | | | | | | | | 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
* lib/Target/SubtargetFeature.cpp asserts that the FeatureKV[] table be sorted Jim Grosbach2008-09-111-1/+2
| | | | | | | | | | | by its first field, but TableGen doesn't actually enforce creating it that way. TableGen sorts the records that will be used to create it by the names of the records, not the Name field of those records. This patch corrects the sort to use the "Name" field of the record as the sort key. llvm-svn: 56106
* Stabilize 'getDwarfRegNumFull' output to not depend on random memory Chris Lattner2008-08-261-0/+17
| | | | | | orders, part of PR2590 llvm-svn: 55359
* Add explicit keywords.Dan Gohman2008-07-071-4/+4
| | | | llvm-svn: 53179
* Add explicit keywords.Dan Gohman2008-03-251-9/+10
| | | | llvm-svn: 48801
* Add interator interface to DAGInit alsoAnton Korobeynikov2008-01-221-0/+22
| | | | llvm-svn: 46250
* Provide iterator access to ListInit contentsAnton Korobeynikov2008-01-211-0/+11
| | | | llvm-svn: 46223
* remove attributions from utils.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45419
* change the Init print methods to return strings, and implement Chris Lattner2007-11-221-20/+19
| | | | | | print in terms of that. llvm-svn: 44276
* eliminate a bunch of print methods that are duplicate with the getAsString() ↵Chris Lattner2007-11-221-9/+1
| | | | | | method. llvm-svn: 44275
* Add the ability to convert a tblgen type to a string.Chris Lattner2007-11-201-3/+9
| | | | llvm-svn: 44257
* Add convenient helper to obtain list of intsAnton Korobeynikov2007-11-111-1/+7
| | | | llvm-svn: 43993
* Added \!con(a,b) syntax to concatnate two dag fragments.Evan Cheng2007-05-151-2/+2
| | | | llvm-svn: 37063
* reapplyChris Lattner2007-02-271-0/+2
| | | | llvm-svn: 34697
* Backing outEvan Cheng2007-02-271-2/+0
| | | | | | | | | | CodeGenTarget.cpp updated: 1.82 -> 1.83 Record.cpp updated: 1.55 -> 1.56 Record.h updated: 1.59 -> 1.60 TableGen.cpp updated: 1.47 -> 1.48 It's missing CallingConvEmitter.h llvm-svn: 34693
* initial support for calling convention generation, still unfinished.Chris Lattner2007-02-271-0/+2
| | | | llvm-svn: 34682
* What should be the last unnecessary <iostream>s in the library.Bill Wendling2006-12-071-1/+1
| | | | llvm-svn: 32333
* Add virtual methods to all subclasses so they are not overloaded.Reid Spencer2006-08-281-0/+7
| | | | llvm-svn: 29930
* Generalize the previous binary operator support and add a string concatenationChris Lattner2006-03-311-7/+33
| | | | | | operation. This implements Regression/TableGen/strconcat.td. llvm-svn: 27312
* Implement Regression/TableGen/DagDefSubst.llChris Lattner2006-03-301-9/+9
| | | | llvm-svn: 27263
* implement test/Regression/TableGen/DagIntSubst.llChris Lattner2006-01-311-1/+7
| | | | llvm-svn: 25836
* Rename Record::getValueAsListDef to getValueAsListOfDefs, to more accuratelyChris Lattner2005-10-281-4/+4
| | | | | | | reflect what it is. Convert some more code over to use it. llvm-svn: 24072
* Added method to return a vector of records for a ListInit of Def field. ThisJim Laskey2005-10-281-0/+6
| | | | | | simplifies using list of records. llvm-svn: 24069
* Add a new Record::getValueAsCode method to mirror the other getValueAs*Chris Lattner2005-09-131-0/+6
| | | | | | methods. Use it to simplify some code. llvm-svn: 23336
* add a setName method to recordChris Lattner2005-08-191-1/+1
| | | | llvm-svn: 22912
* Add a setName method to Record.Chris Lattner2005-08-191-0/+14
| | | | llvm-svn: 22911
* Eliminate tabs and trailing spacesJeff Cohen2005-04-221-3/+3
| | | | llvm-svn: 21441
* Remove trailing whitespaceMisha Brukman2005-04-221-15/+15
| | | | llvm-svn: 21428
* Major change to tblgen: instead of resolving values every time a class isChris Lattner2005-04-191-22/+38
| | | | | | | | | | | finished up, only resolve fully when the def is defined. This allows things to be changed and all uses to be propagated through. This implements TableGen/LazyChange.td and fixes TemplateArgRename.td in the process. None of the .td files used in LLVM backends are changed at all by this patch. llvm-svn: 21344
* implementing shifting of literal integersChris Lattner2005-04-191-0/+2
| | | | llvm-svn: 21336
OpenPOWER on IntegriCloud