Varun Patil via llvm-dev
2016-Nov-10 12:04 UTC
[llvm-dev] emitter tableGen stack dumped error
Hi Developers, I have started developing LLVM backend for my Target. Unfortunately, I hit quite a few times very cryptic error messages when compiling with TableGen. The most cryptic error message was when compiling with TableGen, with the option -gen-emitter . Here I got the following error message: llvm-tblgen: /home/varun/workspace-llvm/llvm/utils/TableGen/CodeGenInstruction.h:186: std::pair<unsigned int, unsigned int> llvm::CGIOperandList::getSubOperandNumber(unsigned int) const: Assertion `i < OperandList.size() && "Invalid flat operand #"' failed. 0 llvm-tblgen 0x0000000000641025 1 llvm-tblgen 0x0000000000641380 2 llvm-tblgen 0x000000000063f656 3 llvm-tblgen 0x000000000064099d 4 libpthread.so.0 0x00002abdd763b330 5 libc.so.6 0x00002abdd84ccc37 gsignal + 55 6 libc.so.6 0x00002abdd84d0028 abort + 328 7 libc.so.6 0x00002abdd84c5bf6 8 libc.so.6 0x00002abdd84c5ca2 9 llvm-tblgen 0x000000000042aa36 10 llvm-tblgen 0x000000000045f8f1 11 llvm-tblgen 0x0000000000460215 12 llvm-tblgen 0x0000000000460996 13 llvm-tblgen 0x0000000000460d27 14 llvm-tblgen 0x00000000005ce3df 15 llvm-tblgen 0x0000000000660bf9 16 llvm-tblgen 0x00000000005cea27 17 libc.so.6 0x00002abdd84b7f45 __libc_start_main + 245 18 llvm-tblgen 0x00000000004059e9 Stack dump: 0. Program arguments: ../../../bin/llvm-tblgen -gen-emitter -I /home/varun/workspace-llvm/llvm/lib/Target/LEG -I /home/varun/workspace-llvm/llvm/lib/Target -I /home/varun/workspace-llvm/llvm/include /home/varun/workspace-llvm/llvm/lib/Target/LEG/LEG.td -o /home/varun/workspace-llvm/llvm-build/lib/Target/LEG/LEGGenMCCodeEmitter.inc.tmp Aborted (core dumped) Please help me to solve this error. Thank you in advance Thanks and Regards Varun -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161110/5731eb5a/attachment.html>
Krzysztof Parzyszek via llvm-dev
2016-Nov-10 15:04 UTC
[llvm-dev] emitter tableGen stack dumped error
It may be difficult to tell what the problem is by looking at the call stack (especially if the function names are missing). It's likely that there is some mismatch between operand lists for some instruction. If you actually have the core dump, you could load it into a debugger and see where the failing getSubOperandNumber was called from, and insert some debugging code in there (to print the data structures for which the call fails). A lot of the TableGen's data can be printed by calling a member function "dump()". This could lead you closer to the actual location in the .td file that may contain the bug. -Krzysztof On 11/10/2016 6:04 AM, Varun Patil via llvm-dev wrote:> Hi Developers, > > I have started developing LLVM backend for my Target. > Unfortunately, I hit quite a few times very cryptic error messages when > compiling > with TableGen. > The most cryptic error message was when compiling with TableGen, with > the option > -gen-emitter . Here I got the following error message: > llvm-tblgen: > /home/varun/workspace-llvm/llvm/utils/TableGen/CodeGenInstruction.h:186: > std::pair<unsigned int, unsigned int> > llvm::CGIOperandList::getSubOperandNumber(unsigned int) const: Assertion > `i < OperandList.size() && "Invalid flat operand #"' failed. > 0 llvm-tblgen 0x0000000000641025 > 1 llvm-tblgen 0x0000000000641380 > 2 llvm-tblgen 0x000000000063f656 > 3 llvm-tblgen 0x000000000064099d > 4 libpthread.so.0 0x00002abdd763b330 > 5 libc.so.6 0x00002abdd84ccc37 gsignal + 55 > 6 libc.so.6 0x00002abdd84d0028 abort + 328 > 7 libc.so.6 0x00002abdd84c5bf6 > 8 libc.so.6 0x00002abdd84c5ca2 > 9 llvm-tblgen 0x000000000042aa36 > 10 llvm-tblgen 0x000000000045f8f1 > 11 llvm-tblgen 0x0000000000460215 > 12 llvm-tblgen 0x0000000000460996 > 13 llvm-tblgen 0x0000000000460d27 > 14 llvm-tblgen 0x00000000005ce3df > 15 llvm-tblgen 0x0000000000660bf9 > 16 llvm-tblgen 0x00000000005cea27 > 17 libc.so.6 0x00002abdd84b7f45 __libc_start_main + 245 > 18 llvm-tblgen 0x00000000004059e9 > Stack dump: > 0. Program arguments: ../../../bin/llvm-tblgen -gen-emitter -I > /home/varun/workspace-llvm/llvm/lib/Target/LEG -I > /home/varun/workspace-llvm/llvm/lib/Target -I > /home/varun/workspace-llvm/llvm/include > /home/varun/workspace-llvm/llvm/lib/Target/LEG/LEG.td -o > /home/varun/workspace-llvm/llvm-build/lib/Target/LEG/LEGGenMCCodeEmitter.inc.tmp > > Aborted (core dumped) > > Please help me to solve this error. > Thank you in advance > > > > Thanks and Regards > Varun > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Varun Patil via llvm-dev
2016-Nov-11 08:40 UTC
[llvm-dev] emitter tableGen stack dumped error
please any one help me Thanks and Regards Varun On Thu, Nov 10, 2016 at 5:34 PM, Varun Patil <varun.patil40 at gmail.com> wrote:> Hi Developers, > > I have started developing LLVM backend for my Target. > Unfortunately, I hit quite a few times very cryptic error messages when > compiling > with TableGen. > The most cryptic error message was when compiling with TableGen, with the > option > -gen-emitter . Here I got the following error message: > llvm-tblgen: /home/varun/workspace-llvm/llvm/utils/TableGen/CodeGenInstruction.h:186: > std::pair<unsigned int, unsigned int> llvm::CGIOperandList::getSubOperandNumber(unsigned > int) const: Assertion `i < OperandList.size() && "Invalid flat operand #"' > failed. > 0 llvm-tblgen 0x0000000000641025 > 1 llvm-tblgen 0x0000000000641380 > 2 llvm-tblgen 0x000000000063f656 > 3 llvm-tblgen 0x000000000064099d > 4 libpthread.so.0 0x00002abdd763b330 > 5 libc.so.6 0x00002abdd84ccc37 gsignal + 55 > 6 libc.so.6 0x00002abdd84d0028 abort + 328 > 7 libc.so.6 0x00002abdd84c5bf6 > 8 libc.so.6 0x00002abdd84c5ca2 > 9 llvm-tblgen 0x000000000042aa36 > 10 llvm-tblgen 0x000000000045f8f1 > 11 llvm-tblgen 0x0000000000460215 > 12 llvm-tblgen 0x0000000000460996 > 13 llvm-tblgen 0x0000000000460d27 > 14 llvm-tblgen 0x00000000005ce3df > 15 llvm-tblgen 0x0000000000660bf9 > 16 llvm-tblgen 0x00000000005cea27 > 17 libc.so.6 0x00002abdd84b7f45 __libc_start_main + 245 > 18 llvm-tblgen 0x00000000004059e9 > Stack dump: > 0. Program arguments: ../../../bin/llvm-tblgen -gen-emitter -I > /home/varun/workspace-llvm/llvm/lib/Target/LEG -I > /home/varun/workspace-llvm/llvm/lib/Target -I /home/varun/workspace-llvm/llvm/include > /home/varun/workspace-llvm/llvm/lib/Target/LEG/LEG.td -o > /home/varun/workspace-llvm/llvm-build/lib/Target/LEG/LEGGenMCCodeEmitter.inc.tmp > > Aborted (core dumped) > > Please help me to solve this error. > Thank you in advance > > > > Thanks and Regards > Varun >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161111/b7e82f4d/attachment.html>