On Sun, 28 Mar 2004, Reid Spencer wrote:> The XPL compiler produced the attached OneOfEach.bc file without error > or warning from either LLVM or XPLC. However when I llvm-dis the file, I > get: > > llvm-dis: Failed value look-up for name 'entry'I'm guessing that 'entry' is a basic block?> The Bytecode Reader prints this out when it can't find the associated > value for the name. Obviously I botched something in the XPL compiler > but I would have thought the verified would catch my mistake before > writing the byte code.It should! It probably is missing a check somewhere... once you find the problem, it would be helpful to make sure that the verifier catches that problem in the future...> The patch to the Reader.cpp file that I sent you earlier added the "for > name 'entry'" part to the output. Unfortunately, this doesn't help > because my source input doesn't have a symbol named "entry". > Any hints?My completely speculative *guess* is that you are using a basic block as an operand to an instruction that does not expect it. You can't add two basic blocks together, and I would guess the verifier doesn't check for this. The only place where basic blocks can appear is in PHI nodes and terminators. I just checked this patch into the Verifier. Maybe it will help? --- Verifier.cpp 14 Mar 2004 03:23:54 -0000 1.88 +++ Verifier.cpp 29 Mar 2004 00:27:29 -0000 @@ -493,6 +493,11 @@ Assert1(I.getType() != Type::VoidTy || !I.hasName(), "Instruction has a name, but provides a void value!", &I); + // Check that the return value of the instruction is either void or a legal + // value type. + Assert1(I.getType() == Type::VoidTy || I.getType()->isFirstClassType(), + "Instruction returns a non-scalar type!", &I); + // Check that all uses of the instruction, if they are instructions // themselves, actually have parent basic blocks. If the use is not an // instruction, it is an error! -Chris -- http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/
I just found "entry". Its the name I gave a basic block at the start of the function (name was hard coded in the compiler, not the source). The issue here is probably that the block doesn't have a terminating instruction. However, that fact used to be caught well by the validator. Furthermore, the output from the byte code reader is a little confusing given the source of the problem. Has something broken recently? This has been happening with the 1.2 release. I cvs updated today and rebuild LLVM but it still happens. Reid. On Sun, 2004-03-28 at 16:23, Reid Spencer wrote:> The XPL compiler produced the attached OneOfEach.bc file without error > or warning from either LLVM or XPLC. However when I llvm-dis the file, > I get: > > llvm-dis: Failed value look-up for name 'entry' > > The Bytecode Reader prints this out when it can't find the associated > value for the name. Obviously I botched something in the XPL compiler > but I would have thought the verified would catch my mistake before > writing the byte code. > > The patch to the Reader.cpp file that I sent you earlier added the > "for name 'entry'" part to the output. Unfortunately, this doesn't > help because my source input doesn't have a symbol named "entry". > > Any hints? > > On Sun, 2004-03-28 at 15:58, Chris Lattner wrote: > > > On Sun, 28 Mar 2004, Reid Spencer wrote: > > > > > Would you like me to send the patches to sabre at nondot.org or have you > > > seen them already? > > > > I haven't seen them. Feel free to send them my way :) > > > > -Chris > > > > > > > > _______________________ > > Reid Spencer > > President & CTO > > eXtensible Systems, Inc. > > rspencer at x10sys.com_______________________ Reid Spencer President & CTO eXtensible Systems, Inc. rspencer at x10sys.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040328/1d3653bd/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040328/1d3653bd/attachment.sig>
The XPL compiler produced the attached OneOfEach.bc file without error or warning from either LLVM or XPLC. However when I llvm-dis the file, I get: llvm-dis: Failed value look-up for name 'entry' The Bytecode Reader prints this out when it can't find the associated value for the name. Obviously I botched something in the XPL compiler but I would have thought the verified would catch my mistake before writing the byte code. The patch to the Reader.cpp file that I sent you earlier added the "for name 'entry'" part to the output. Unfortunately, this doesn't help because my source input doesn't have a symbol named "entry". Any hints? On Sun, 2004-03-28 at 15:58, Chris Lattner wrote:> On Sun, 28 Mar 2004, Reid Spencer wrote: > > > Would you like me to send the patches to sabre at nondot.org or have you > > seen them already? > > I haven't seen them. Feel free to send them my way :) > > -Chris_______________________ Reid Spencer President & CTO eXtensible Systems, Inc. rspencer at x10sys.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040328/234503f4/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: OneOfEach.bc Type: application/octet-stream Size: 1324 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040328/234503f4/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040328/234503f4/attachment.sig>