I was able to solve that but still crashing with the same error saying "Unreachable executed". I have attached the output with this mail.<br><br>Thanks in advance.<br><br><div class="gmail_quote">On Thu, May 6, 2010 at 2:38 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;">
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 crashing<br>
when the bit writer pass is running.<br>
</blockquote>
<br></div>
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 to do this, and how the verifier didn't catch it. Maybe the %4 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>
<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">
On Wed, May 5, 2010 at 8:39 PM, Nick Lewycky <<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>>> 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></div><div class="im">
    <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. After the<br>
        transformation llvm runs BitCode Writer pass , which is aborting<br>
        with Unreachable Executed error.<br>
        I have attached the input llvm code and the output llvm code for<br>
        reference. I am stuck at this problem for a few days 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></div>
        <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>
        <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>         <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>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Adarsh Yoga<br>Graduate Student, Computer Science<br>Indiana University, Bloomington<br>