Hi Chen,<br><br>Thanks for trying!<br><br>Your favorite llvm-tblgen 3.1 is too old. Here we need 3.2svn, should be also reproducible with TOT.<br><br>- D. <br><br><div class="gmail_quote">2013/2/7 陳韋任 (Wei-Ren Chen) <span dir="ltr"><<a href="mailto:chenwj@iis.sinica.edu.tw" target="_blank">chenwj@iis.sinica.edu.tw</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Feb 06, 2013 at 11:47:31PM +0100, Dmitry Mikushin wrote:<br>
> Dear all,<br>
><br>
> I need your help to understand weird llvm-tblgen behavior. Please take your<br>
> favourite version of llvm-tblgen and use it in the root directory of the<br>
> archive attached in both bug reports:<br>
><br>
> <a href="http://llvm.org/bugs/show_bug.cgi?id=15188" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=15188</a><br>
> <a href="http://llvm.org/bugs/show_bug.cgi?id=15189" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=15189</a><br>
<br>
</div>$ llvm-tblgen --version<br>
LLVM (<a href="http://llvm.org/" target="_blank">http://llvm.org/</a>):<br>
LLVM version 3.1<br>
Optimized build.<br>
Built Oct 17 2012 (19:26:30).<br>
Default target: amd64-portbld-freebsd8.3<br>
Host CPU: core2<br>
<div class="im"><br>
> ====<br>
> 1) First test case: crashing<br>
> ====<br>
><br>
> $ ./llvm-tblgen -gen-tgt-intrinsic NVPTX1.td<br>
><br>
> assert(iid <= Intrinsic::0 llvm-tblgen 0x00000000005c56b6<br>
> 1 llvm-tblgen 0x00000000005c54b2<br>
> 2 libpthread.so.0 0x00007fc734644a10<br>
> 3 libstdc++.so.6 0x00007fc7345bba5e std::string::_M_data() const + 12<br>
> 4 libstdc++.so.6 0x00007fc7345bba9c std::string::_M_rep() const + 24<br>
> 5 libstdc++.so.6 0x00007fc7345bba4c std::string::length() const + 24<br>
> 6 llvm-tblgen 0x000000000042507f<br>
> 7 llvm-tblgen 0x000000000051efd9<br>
> 8 llvm-tblgen 0x000000000051be22<br>
> 9 llvm-tblgen 0x000000000054f4f9<br>
> 10 llvm-tblgen 0x000000000055ce65<br>
> 11 llvm-tblgen 0x000000000054fb50<br>
> 12 libc.so.6 0x00007fc73426ca76 __libc_start_main + 370<br>
> 13 llvm-tblgen 0x00000000004071f9<br>
> Stack dump:<br>
> 0. Program arguments: ./llvm-tblgen -gen-tgt-intrinsic NVPTX1.td<br>
> Segmentation fault (core dumped)<br>
<br>
</div>$ llvm-tblgen -gen-tgt-intrinsic NVPTX1.td<br>
Included from NVPTX1.td:18:<br>
NVPTXRegisterInfo.td:32:14: error: Value list is not of list type<br>
foreach i = 0-395 in {<br>
^<br>
Included from NVPTX1.td:18:<br>
NVPTXRegisterInfo.td:32:14: error: expected declaration in for<br>
foreach i = 0-395 in {<br>
<div class="im"> ^<br>
<br>
> ====<br>
> 2) Second test case: double inclusion of file, that is definitely included<br>
> once:<br>
> ====<br>
><br>
> $ ./llvm-tblgen -gen-tgt-intrinsic NVPTX2.td<br>
> Included from NVPTX2.td:20:<br>
> NVPTXIntrinsics.td:10:1: error: def 'immFloat0' already defined<br>
> def immFloat0 : PatLeaf<(fpimm), [{<br>
> ^<br>
<br>
</div>$ llvm-tblgen -gen-tgt-intrinsic NVPTX2.td<br>
Included from NVPTX2.td:18:<br>
NVPTXRegisterInfo.td:32:14: error: Value list is not of list type<br>
foreach i = 0-395 in {<br>
^<br>
Included from NVPTX2.td:18:<br>
NVPTXRegisterInfo.td:32:14: error: expected declaration in for<br>
foreach i = 0-395 in {<br>
<div class="im"> ^<br>
<br>
> NVPTX1.td differs from NVPTX2.td just in one line:<br>
><br>
> include "NVPTXIntrinsics.td"<br>
<br>
</div>Regards,<br>
chenwj<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Wei-Ren Chen (陳韋任)<br>
Computer Systems Lab, Institute of Information Science,<br>
Academia Sinica, Taiwan (R.O.C.)<br>
Tel:886-2-2788-3799 #1667<br>
Homepage: <a href="http://people.cs.nctu.edu.tw/~chenwj" target="_blank">http://people.cs.nctu.edu.tw/~chenwj</a><br>
</font></span></blockquote></div><br>