summaryrefslogtreecommitdiff
path: root/test/TableGen
Commit message (Collapse)AuthorAge
* Reverted r138652, valgrind doesn't understand obj:*/tblgen.Andrew Trick2011-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138703 91177308-0d34-0410-b5e6-96231b3b80d8
* valgrind: Always suppress tblgen leaks.Andrew Trick2011-08-26
| | | | | | | I'll clean up the rest of the XFAIL: vg_leak lines if this works. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138652 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't care if TableGen leaks memory.Benjamin Kramer2011-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138634 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach TableGen to evaluate DAG expressions as set operations.Jakob Stoklund Olesen2011-06-04
| | | | | | | | | | | | | | | | | A TableGen backend can define how certain classes can be expanded into ordered sets of defs, typically by evaluating a specific field in the record. The SetTheory class can then evaluate DAG expressions that refer to these named sets. A number of standard set and list operations are predefined, and the backend can add more specialized operators if needed. The -print-sets backend is used by SetTheory.td to provide examples. This is intended to simplify how register classes are defined: def GR32_NOSP : RegisterClass<"X86", [i32], 32, (sub GR32, ESP)>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132621 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-15
| | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename lisp-like functions as suggested by Gabor Greif as loooong timeDavid Greene2011-01-07
| | | | | | | ago. This is both easier to learn and easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123001 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for using the `!if' operator when initializing variables:Bill Wendling2010-12-13
| | | | | | | | | | | | class A<bit a, bits<3> x, bits<3> y> { bits<3> z; let z = !if(a, x, y); } The variable z will get the value of x when 'a' is 1 and 'y' when a is '0'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121666 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize tblgen's dag parsing logic to handle arbitrary expressionsChris Lattner2010-10-06
| | | | | | | | | | | | | | | | as the operator of the dag. Specifically, this allows parsing things like (F.x 4) in addition to just (a 4). Unfortunately, this runs afoul of an idiom being used by llvmc. It is using dags like (foo [1,2,3]) to represent a list of stuff being passed into foo. With this change, this is parsed as a [1,2,3] subscript on foo instead of being the first argument to the dag. Cope with this in the short term by requiring a "-llvmc-temp-hack" argument to tblgen to get the old parsing behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115742 91177308-0d34-0410-b5e6-96231b3b80d8
* rename add some comments.Chris Lattner2010-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115741 91177308-0d34-0410-b5e6-96231b3b80d8
* filecheckizeChris Lattner2010-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115740 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the !nameconcat tblgen feature. It "shorthand" and only used in 4 placesChris Lattner2010-10-06
| | | | | | | where !cast is just as short. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115722 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance tblgen to support anonymous defm's, use this toChris Lattner2010-10-05
| | | | | | | simplify the X86 CMOVmr's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115702 91177308-0d34-0410-b5e6-96231b3b80d8
* tests: XFAIL a handful of tests on the vg_leak builder, so we can get back toDaniel Dunbar2010-09-09
| | | | | | green. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113491 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize getFieldType to work on all TypedInits. Add a couple of ↵David Greene2010-09-03
| | | | | | | | | testcases from Amaury Pouly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113010 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove TargetInstrInfo::copyRegToReg entirely.Jakob Stoklund Olesen2010-07-11
| | | | | | | Targets must now implement TargetInstrInfo::copyPhysReg instead. There is no longer a default implementation forwarding to copyRegToReg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108095 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a tblgen bug.Bruno Cardoso Lopes2010-06-23
| | | | | | | | | | | | | | | | | | | Given the pattern below as an example: list<dag> Pattern = [(set RC:$dst, (v4f32 (shufp:src3 RC:$src1, (mem_frag addr:$src2))))]; The right reference resolving should lead to: list<dag> Pattern = [(set VR128:$dst, (v4f32 (shufp:src3 VR128:$src1, (mem_frag addr:$src2))))]; But was yielding: list<dag> Pattern = [(set VR128:$dst, (v4f32 (shufp VR128:$src1, (mem_frag addr:$src2))))]; Fix this by passing the right name when creating a new DagInit node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106670 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a subtle multiclass bug: when using class inheritance onBruno Cardoso Lopes2010-06-22
| | | | | | | | a toplevel 'defm', make sure to properly resolve references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106570 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach tablegen how to inherit from classes in 'defm' definitions.Bruno Cardoso Lopes2010-06-18
| | | | | | | | | The rule is simple: only inherit from a class list if they come in the end, after the last multiclass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106305 91177308-0d34-0410-b5e6-96231b3b80d8
* For a tablegen expression such as !if(a,b,c), let 'a'Bruno Cardoso Lopes2010-06-17
| | | | | | | be evaluated for 'bit' operators git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106185 91177308-0d34-0410-b5e6-96231b3b80d8
* let the '!eq' expression support 'int' and 'bit' typesBruno Cardoso Lopes2010-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106171 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach tablegen to allow "let" expressions inside multiclasses,Bruno Cardoso Lopes2010-06-10
| | | | | | | providing more ways to factor out commonality from the records. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105776 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach tablegen to support 'defm' inside multiclasses.Bruno Cardoso Lopes2010-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105519 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL a new tblgen test for memory leak checking.Jeffrey Yasskin2010-03-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99707 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix evil TableGen bug in template parameters with defaults.Jakob Stoklund Olesen2010-03-25
| | | | | | | | | | If a TableGen class has an initializer expression containing an X.Y subexpression, AND X depends on template parameters, AND those template parameters have defaults, AND some parameters with defaults are beyond position 1, THEN parts of the initializer expression are evaluated prematurely with the default values when the first explicit template parameter is substituted, before the remaining explicit template parameters have been substituted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99492 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for XFAILing valgrind runs with memory leak checking independentlyJeffrey Yasskin2010-03-20
| | | | | | | | | | of runs without leak checking. We add -vg to the triple for non-checked runs, or -vg_leak for checked runs. Also use this to XFAIL the TableGen tests, since tablegen leaks like a sieve. This includes some valgrindArgs refactoring. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99103 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an !eq() operator to TableGen. It operates on strings only.David Greene2010-01-05
| | | | | | | Use !cast<string>() to compare other types of objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92754 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in !subst where TableGen would go and resubstitute text it hadDavid Greene2009-12-21
| | | | | | | | just substituted. This could cause infinite looping in certain pathological cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91843 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr5470. Tablegen handles template arguments by temporarily setting theirBob Wilson2009-11-22
| | | | | | | | | | | | values, resolving references to them, and then removing the definitions. If a template argument is set to an undefined value, we need to resolve references to that argument to an explicit undefined value. The current code leaves the reference to the template argument as it is, which causes an assertion failure later when the definition of the template argument is removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89581 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some tests of advanced TableGen list functionality.David Greene2009-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74445 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove empty test (my DejaGNU doesn't like this)Daniel Dunbar2009-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73148 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove empty file.Bill Wendling2009-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73140 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 73074 and 73099 because Windows doesn't have POSIXDavid Greene2009-06-09
| | | | | | | | regular expressions. We will add an OpenBSD implementation and re-apply ASAP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73138 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a !patsubst operator. Use on string types.David Greene2009-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73099 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a more robust !if test.David Greene2009-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73091 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix DejaGNU run line to escape special characters.David Greene2009-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73090 91177308-0d34-0410-b5e6-96231b3b80d8
* Make IntInits and ListInits typed. This helps deduce types of !if andDavid Greene2009-06-08
| | | | | | | | | other operators. For the rare cases where a list type cannot be deduced, provide a []<type> syntax, where <type> is the list element type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73078 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a !regmatch operator to do pattern matching in TableGen.David Greene2009-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73074 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement !if, analogous to $(if) in GNU make.David Greene2009-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71815 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix tests to not upset DejaGNU.David Greene2009-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71811 91177308-0d34-0410-b5e6-96231b3b80d8
* Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.David Greene2009-05-14
| | | | | | | | | | | Ok, not really, but do support some common LISP functions: * car * cdr * null git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71805 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a !foreach operator analogous to GNU make's $(foreach).David Greene2009-05-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."))>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71803 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a !subst operation simmilar to $(subst) in GNU make to doDavid Greene2009-05-14
| | | | | | | | | | | | | | | | | 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>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71801 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement !cast.David Greene2009-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71794 91177308-0d34-0410-b5e6-96231b3b80d8
* Use .td for tablegen files, not .ll.Dan Gohman2009-05-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71277 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow multiclass def names to contain "#NAME"" where TableGen replacesDavid Greene2009-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70979 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix multiclass inheritance to limit value resolution to new defs addedDavid Greene2009-04-24
| | | | | | | | by base multiclasses. Do not attempt to alter defs from previous base multiclasses. This fixes multiple multiclass inheritance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69974 91177308-0d34-0410-b5e6-96231b3b80d8
* Make BinOps typed and require a type specifier for !nameconcat. ThisDavid Greene2009-04-23
| | | | | | | | allows binops to be used in typed contexts such as when passing arguments to classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69921 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow defm to inherit from multiple multiclasses.David Greene2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69832 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement !nameconcat to concatenate strings and look up the resultingDavid Greene2009-04-22
| | | | | | | name in the symbol table, returning an object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69822 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement multiclass inheritance.David Greene2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69810 91177308-0d34-0410-b5e6-96231b3b80d8