The dump from the function I'm running: define %object_structure @0() { entry: ret %object_structure { i8 0, %object_union [double 5.000000e+00, double false] } } the only output I get after the runFunction() call is: UNREACHABLE executed! Stack dump: 0. Running pass 'X86 DAG->DAG Instruction Selection' on function '@0' I just noticed that my union seems to look like an array....is that actually a union or do I have a problem somewhere? The code I use to generate the union is: llvm::Constant* tempUnion llvm::ConstantUnion::get(object_union_type,llvm::Constant::getNullValue(types[t])); llvm::Value* goodUnion builder.CreateInsertValue(tempUnion,data,t,"createuniontmp"); object_union_type is union { double, i1 }, and (in this case) t is 0, and types[t] is double On Sun, Aug 15, 2010 at 4:13 PM, Eric Christopher <echristo at apple.com>wrote:> > On Aug 15, 2010, at 1:06 PM, Alec Benzer wrote: > > > What does this error mean? I'm getting it from an > ExecutionEngine::runFunction() call. The function I'm passing it was run > through verifyFunction() right before the runFunction() call. I can't seem > to find anything that tells me what causes this, only specific (but > seemingly unrelated to my problem) cases of it happening. > > Which unreachable was it? The basic idea is that whichever section of code > gives that assertion shouldn't be executing. > > Also, what was the .ll code that gave the assertion? > > -eric-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100815/ee253e65/attachment.html>
On Aug 15, 2010, at 1:30 PM, Alec Benzer wrote:> The dump from the function I'm running: > > define %object_structure @0() { > entry: > ret %object_structure { i8 0, %object_union [double 5.000000e+00, double false] } > } > > the only output I get after the runFunction() call is: > > UNREACHABLE executed! > Stack dump: > 0. Running pass 'X86 DAG->DAG Instruction Selection' on function '@0' > > I just noticed that my union seems to look like an array....is that actually a union or do I have a problem somewhere? The code I use to generate the union is: > > llvm::Constant* tempUnion = llvm::ConstantUnion::get(object_union_type,llvm::Constant::getNullValue(types[t])); > llvm::Value* goodUnion = builder.CreateInsertValue(tempUnion,data,t,"createuniontmp"); > > object_union_type is union { double, i1 }, and (in this case) t is 0, and types[t] is double >I'm not quite sure on the IR union syntax. It's been somewhat fluid. That said if you attach gdb to lli and run your code through it'll let you know which particular unreachable you're running into. -eric
Alec Benzer wrote:> The dump from the function I'm running: > > define %object_structure @0() { > entry: > ret %object_structure { i8 0, %object_union [double 5.000000e+00, > double false] } > }Unions are almost entirely unimplemented. Sorry.> the only output I get after the runFunction() call is: > > UNREACHABLE executed! > Stack dump: > 0. Running pass 'X86 DAG->DAG Instruction Selection' on function '@0' > > I just noticed that my union seems to look like an array....is that > actually a union or do I have a problem somewhere? The code I use to > generate the union is: > > llvm::Constant* tempUnion > llvm::ConstantUnion::get(object_union_type,llvm::Constant::getNullValue(types[t])); > > llvm::Value* goodUnion > builder.CreateInsertValue(tempUnion,data,t,"createuniontmp"); > > object_union_type is union { double, i1 }, and (in this case) t is 0, > and types[t] is double > > > On Sun, Aug 15, 2010 at 4:13 PM, Eric Christopher <echristo at apple.com > <mailto:echristo at apple.com>> wrote: > > > On Aug 15, 2010, at 1:06 PM, Alec Benzer wrote: > > > What does this error mean? I'm getting it from an > ExecutionEngine::runFunction() call. The function I'm passing it was > run through verifyFunction() right before the runFunction() call. I > can't seem to find anything that tells me what causes this, only > specific (but seemingly unrelated to my problem) cases of it happening. > > Which unreachable was it? The basic idea is that whichever section > of code gives that assertion shouldn't be executing. > > Also, what was the .ll code that gave the assertion? > > -eric > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Tthe IRBuilder APIs for unions or unions in general? Either way, I was using unions as a temporary solution for a problem I was too lazy to fully figure out anyway. On Sun, Aug 15, 2010 at 4:54 PM, Nick Lewycky <nicholas at mxc.ca> wrote:> Alec Benzer wrote: > >> The dump from the function I'm running: >> >> define %object_structure @0() { >> entry: >> ret %object_structure { i8 0, %object_union [double 5.000000e+00, >> double false] } >> } >> > > Unions are almost entirely unimplemented. Sorry. > > the only output I get after the runFunction() call is: >> >> UNREACHABLE executed! >> Stack dump: >> 0. Running pass 'X86 DAG->DAG Instruction Selection' on function '@0' >> >> I just noticed that my union seems to look like an array....is that >> actually a union or do I have a problem somewhere? The code I use to >> generate the union is: >> >> llvm::Constant* tempUnion >> >> llvm::ConstantUnion::get(object_union_type,llvm::Constant::getNullValue(types[t])); >> >> llvm::Value* goodUnion >> builder.CreateInsertValue(tempUnion,data,t,"createuniontmp"); >> >> object_union_type is union { double, i1 }, and (in this case) t is 0, >> and types[t] is double >> >> >> On Sun, Aug 15, 2010 at 4:13 PM, Eric Christopher <echristo at apple.com >> <mailto:echristo at apple.com>> wrote: >> >> >> On Aug 15, 2010, at 1:06 PM, Alec Benzer wrote: >> >> > What does this error mean? I'm getting it from an >> ExecutionEngine::runFunction() call. The function I'm passing it was >> run through verifyFunction() right before the runFunction() call. I >> can't seem to find anything that tells me what causes this, only >> specific (but seemingly unrelated to my problem) cases of it happening. >> >> Which unreachable was it? The basic idea is that whichever section >> of code gives that assertion shouldn't be executing. >> >> Also, what was the .ll code that gave the assertion? >> >> -eric >> >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100815/0e1c6e8b/attachment.html>
Hello> I just noticed that my union seems to look like an array....is that actually > a union or do I have a problem somewhere?Yes. Unions are pretty much broken and unimplemented. They can be removed pretty soon (say, after 2.8) -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Anton Korobeynikov wrote:> Hello > >> I just noticed that my union seems to look like an array....is that actually >> a union or do I have a problem somewhere? > Yes. Unions are pretty much broken and unimplemented. They can be > removed pretty soon (say, after 2.8)We've never released with unions. Could we remove them for the 2.8 release instead of afterwards when they're part of our forever forwards compatible bitcode format? Similar to what we did to the vfcmp and ficmp instructions maybe?
Yeah, sounds good to me. I strongly support ripping them out of mainline completely. -Chris On Aug 15, 2010, at 2:39 PM, Anton Korobeynikov wrote:> Hi, Chris > > What do you think about this? > > > ---------- Forwarded message ---------- > From: Nick Lewycky <nicholas at mxc.ca> > Date: Mon, Aug 16, 2010 at 01:34 > Subject: Re: [LLVMdev] "UNREACHABLE executed!" error? > To: Anton Korobeynikov <anton at korobeynikov.info> > Cc: Alec Benzer <alecbenzer at gmail.com>, llvmdev at cs.uiuc.edu > > > Anton Korobeynikov wrote: >> >> Hello >> >>> I just noticed that my union seems to look like an array....is that actually >>> a union or do I have a problem somewhere? >> >> Yes. Unions are pretty much broken and unimplemented. They can be >> removed pretty soon (say, after 2.8) > > We've never released with unions. Could we remove them for the 2.8 > release instead of afterwards when they're part of our forever > forwards compatible bitcode format? > > Similar to what we did to the vfcmp and ficmp instructions maybe? > > > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University
Are there any conceptual objections to the union type or is this just due to incomplete implementation? Eugene On Mon, Aug 16, 2010 at 1:32 AM, Chris Lattner <sabre at nondot.org> wrote:> Yeah, sounds good to me. I strongly support ripping them out of mainline completely. > > -Chris > > On Aug 15, 2010, at 2:39 PM, Anton Korobeynikov wrote: > >> Hi, Chris >> >> What do you think about this? >> >> >> ---------- Forwarded message ---------- >> From: Nick Lewycky <nicholas at mxc.ca> >> Date: Mon, Aug 16, 2010 at 01:34 >> Subject: Re: [LLVMdev] "UNREACHABLE executed!" error? >> To: Anton Korobeynikov <anton at korobeynikov.info> >> Cc: Alec Benzer <alecbenzer at gmail.com>, llvmdev at cs.uiuc.edu >> >> >> Anton Korobeynikov wrote: >>> >>> Hello >>> >>>> I just noticed that my union seems to look like an array....is that actually >>>> a union or do I have a problem somewhere? >>> >>> Yes. Unions are pretty much broken and unimplemented. They can be >>> removed pretty soon (say, after 2.8) >> >> We've never released with unions. Could we remove them for the 2.8 >> release instead of afterwards when they're part of our forever >> forwards compatible bitcode format? >> >> Similar to what we did to the vfcmp and ficmp instructions maybe? >> >> >> >> -- >> With best regards, Anton Korobeynikov >> Faculty of Mathematics and Mechanics, Saint Petersburg State University > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >