diff options
author | David Greene <greened@obbligato.org> | 2011-01-07 17:05:37 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-01-07 17:05:37 +0000 |
commit | 1434f66b2e132a707e2c8ccb3350ea13fb5aa051 (patch) | |
tree | 4802d84c0730654fc43566fdb31ce9ac1fbe528c /test/TableGen | |
parent | 50dd09bd8592822214ff5fd66cffc3421b92d079 (diff) |
Rename lisp-like functions as suggested by Gabor Greif as loooong time
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
Diffstat (limited to 'test/TableGen')
-rw-r--r-- | test/TableGen/ListManip.td | 2 | ||||
-rw-r--r-- | test/TableGen/Slice.td | 8 | ||||
-rw-r--r-- | test/TableGen/if.td | 4 | ||||
-rw-r--r-- | test/TableGen/lisp.td | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/test/TableGen/ListManip.td b/test/TableGen/ListManip.td index 55fb5ea85a..6b1e491cd2 100644 --- a/test/TableGen/ListManip.td +++ b/test/TableGen/ListManip.td @@ -7,6 +7,6 @@ class Bli<string _t> } class Bla<list<Bli> _bli> -: Bli<!car(_bli).t> +: Bli<!head(_bli).t> { } diff --git a/test/TableGen/Slice.td b/test/TableGen/Slice.td index 22bf7fbfe8..13d9da2b9f 100644 --- a/test/TableGen/Slice.td +++ b/test/TableGen/Slice.td @@ -66,19 +66,19 @@ def not : SDNode; multiclass scalar<bits<8> opcode, string asmstr = "", list<list<dag>> patterns = []> { def SSrr : Inst<opcode, (outs FR32:$dst), (ins FR32:$src), !strconcat(asmstr, "\t$dst, $src"), - !if(!null(patterns),[]<dag>,patterns[0])>; + !if(!empty(patterns),[]<dag>,patterns[0])>; def SSrm : Inst<opcode, (outs FR32:$dst), (ins FR32:$src), !strconcat(asmstr, "\t$dst, $src"), - !if(!null(patterns),[]<dag>,!if(!null(!cdr(patterns)),patterns[0],patterns[1]))>; + !if(!empty(patterns),[]<dag>,!if(!empty(!tail(patterns)),patterns[0],patterns[1]))>; } multiclass vscalar<bits<8> opcode, string asmstr = "", list<list<dag>> patterns = []> { def V#NAME#SSrr : Inst<opcode, (outs FR32:$dst), (ins FR32:$src), !strconcat(asmstr, "\t$dst, $src"), - !if(!null(patterns),[]<dag>,patterns[0])>; + !if(!empty(patterns),[]<dag>,patterns[0])>; def V#NAME#SSrm : Inst<opcode, (outs FR32:$dst), (ins FR32:$src), !strconcat(asmstr, "\t$dst, $src"), - !if(!null(patterns),[]<dag>,!if(!null(!cdr(patterns)),patterns[0],patterns[1]))>; + !if(!empty(patterns),[]<dag>,!if(!empty(!tail(patterns)),patterns[0],patterns[1]))>; } multiclass myscalar<bits<8> opcode, string asmstr = "", list<list<dag>> patterns = []> : diff --git a/test/TableGen/if.td b/test/TableGen/if.td index bff927802b..c4d953ea22 100644 --- a/test/TableGen/if.td +++ b/test/TableGen/if.td @@ -28,7 +28,7 @@ class C<bits<3> x, bits<4> y, bit z> { class A<list<list<int>> vals> { list<int> first = vals[0]; - list<int> rest = !if(!null(!cdr(vals)), vals[0], vals[1]); + list<int> rest = !if(!empty(!tail(vals)), vals[0], vals[1]); } def One : A<[[1,2,3]]>; @@ -38,7 +38,7 @@ class B<list<int> v> { list<int> vals = v; } -class BB<list<list<int>> vals> : B<!if(!null(!cdr(vals)), vals[0], vals[1])>; +class BB<list<list<int>> vals> : B<!if(!empty(!tail(vals)), vals[0], vals[1])>; class BBB<list<list<int>> vals> : BB<vals>; def OneB : BBB<[[1,2,3]]>; diff --git a/test/TableGen/lisp.td b/test/TableGen/lisp.td index b521e04c89..bbed8690dd 100644 --- a/test/TableGen/lisp.td +++ b/test/TableGen/lisp.td @@ -15,7 +15,7 @@ class CDR<list<string> r, int n> { } class NameList<list<string> Names> : - List<Names>, CAR<!car(Names)>, CDR<!cdr(Names), !null(!cdr(Names))>; + List<Names>, CAR<!head(Names)>, CDR<!tail(Names), !empty(!tail(Names))>; def Three : NameList<["Tom", "Dick", "Harry"]>; |