<div dir="ltr">As Tim said, call_print is one of the root causes.<div><br></div><div>Another problem is that for a pass, you'd better use llvm::Module::getOrInsertFunction API.</div><div><br></div><div>Best Regards,</div>
<div>Hongxu Chen <br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 16, 2013 at 11:22 PM, Tim Northover-2 [via LLVM] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=64418&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

        Hi Jin,
<br><br>It's difficult to say just from looking at a pass, but one thing looked odd:
<br><div class="im"><br>> CallInst *call_print = CallInst::Create(call_print,paramArrayRef,"",ins_temp);
<br><br></div>This looks very dodgy. The "call_print" being used as an argument is
<br>the (uninitialised) one that's just been declared. This could be the
<br>source of the assertion failure (though a segfault is just as likely).
<br><br>Other than that I'd suggest hooking up a debugger and going up the
<br>call frames when that assertion hits. That should tell you exactly
<br>which line of your pass is causing trouble.
<br><br>Cheers.
<br><br>Tim.
<br><div class="im">_______________________________________________
<br>LLVM Developers mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=64417&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>         <a href="http://llvm.cs.uiuc.edu" rel="nofollow" link="external" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="nofollow" link="external" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        </div><div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif"><div class="im">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </div><a href="http://llvm.1065342.n5.nabble.com/Add-call-printf-instructions-problems-tp64415p64417.html" target="_blank" rel="nofollow" link="external">http://llvm.1065342.n5.nabble.com/Add-call-printf-instructions-problems-tp64415p64417.html</a>
        </div><div class="HOEnZb"><div class="h5">
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                To start a new topic under LLVM - Dev, email <a href="/user/SendEmail.jtp?type=node&node=64418&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>
                To unsubscribe from LLVM, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>

                <a href="http://llvm.1065342.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></div></div></blockquote></div><br></div></div></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://llvm.1065342.n5.nabble.com/Add-call-printf-instructions-problems-tp64415p64418.html">Re: Add call printf instructions problems</a><br/>
Sent from the <a href="http://llvm.1065342.n5.nabble.com/LLVM-Dev-f3.html">LLVM - Dev mailing list archive</a> at Nabble.com.<br/>