Initially, tt was not a problem with the verifier, we were just inserting a wrong instruction in our pass. Also we were able to figure out the error you pointed out and our pass is running as intended!!! Thanks a lot.<br><br>
<div class="gmail_quote">On Fri, May 7, 2010 at 12:02 AM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca">nicholas@mxc.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Adarsh Yoga wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I was able to solve that<br>
</blockquote>
<br></div>
What was wrong? I wasn't able to reproduce it and would still like to teach the verifier whatever it missed.<div class="im"><br>
<br>
but still crashing with the same error saying<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
"Unreachable executed". I have attached the output with this mail.<br>
</blockquote>
<br></div>
This time you've got:<br>
<br>
%1 = load i32** getelementptr inbounds ({ i32* }* @structobj, i64 0, i32 0)<br>
<br>
in @temp0 but @structobj is nowhere in the file, which implies that you created the GlobalValue but never inserted it.<br>
<br>
You can figure this out for yourself by taking the module dump (be sure to remove "The Module: " from the beginning) and running llvm-as on it. It finds these errors.<br>
<br>
Nick<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<br>
Thanks in advance.<br>
<br>
On Thu, May 6, 2010 at 2:38 AM, Nick Lewycky <<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a><br></div><div class="im">
<mailto:<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a>>> wrote:<br>
<br>
Adarsh Yoga wrote:<br>
<br>
Yes. Intially the pass was crashing when the module when the module<br>
verifier was running. I was able to solve that and now it is<br>
crashing<br>
when the bit writer pass is running.<br>
<br>
<br>
The output is wrong in @thread_pool_init:<br>
<br>
<stdin>:44:27: error: '%4' defined with type 'i1'<br>
%5 = getelementptr i32* %4, i64 %indvar ; <i32*> [#uses=1]<br>
^<br>
where<br>
<br>
%4 = icmp slt i32 %threadnumber, 1 ; <i1> [#uses=2]<br>
<br>
meaning that %4 is an i1 not an i32*. I'm not sure how you managed<br>
to do this, and how the verifier didn't catch it. Maybe the %4<br>
operand is actually an instruction in another function?<br>
<br>
I'll try to reproduce this and fix the verifier to catch it.<br>
<br>
Nick<br>
<br>
On Wed, May 5, 2010 at 8:39 PM, Nick Lewycky<br>
<<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a> <mailto:<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>><br></div><div class="im">
<mailto:<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a> <mailto:<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>>>> wrote:<br>
<br>
On 5 May 2010 17:12, Adarsh Yoga <<a href="mailto:ayoga@umail.iu.edu" target="_blank">ayoga@umail.iu.edu</a><br>
<mailto:<a href="mailto:ayoga@umail.iu.edu" target="_blank">ayoga@umail.iu.edu</a>><br></div><div class="im">
<mailto:<a href="mailto:ayoga@umail.iu.edu" target="_blank">ayoga@umail.iu.edu</a> <mailto:<a href="mailto:ayoga@umail.iu.edu" target="_blank">ayoga@umail.iu.edu</a>>>> wrote:<br>
<br>
Hi,<br>
<br>
I've written a pass that basically does some code<br>
transformations to enable parallel execution of loops.<br>
After the<br>
transformation llvm runs BitCode Writer pass , which is<br>
aborting<br>
with Unreachable Executed error.<br>
I have attached the input llvm code and the output llvm<br>
code for<br>
reference. I am stuck at this problem for a few days<br>
now. Please<br>
let me know if you are able to find anything unusual.<br>
<br>
<br>
Have you tried running the module verifier after your transform,<br>
before writing out to bitcode?<br>
<br>
Nick<br>
<br>
Regards,<br>
Adarsh<br>
<br>
--<br>
Adarsh Yoga<br>
Graduate Student, Computer Science<br>
Indiana University, Bloomington<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>><br></div>
<mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>>><div class="im"><br>
<br>
<a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
Adarsh Yoga<br>
Graduate Student, Computer Science<br>
Indiana University, Bloomington<br>
<br>
<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>><br>
<a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
Adarsh Yoga<br>
Graduate Student, Computer Science<br>
Indiana University, Bloomington<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Adarsh Yoga<br>Graduate Student, Computer Science<br>Indiana University, Bloomington<br>