<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 8, 2014, at 6:12 PM, 杨勇勇 <<a href="mailto:triple.yang@gmail.com">triple.yang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr">Sergei, Thank you for your attention.<div><br></div><div>My target is a custom VLIW DSP. I am not sure dependency dag is correct when it gets scheduled and packetized. Months ago, I submitted a bug at <a href="http://llvm.org/bugs/show_bug.cgi?id=17894">http://llvm.org/bugs/show_bug.cgi?id=17894</a><span class="Apple-converted-space"> </span>which explained more details.</div><div><br></div><div>I am not sure my understanding of this bug is proper, but modified my local codes this way and it works for my target when scheduling and packetizing.</div><div><br></div><div>Well why this problem does not occur for Hexagon target?</div></div></div></blockquote><div><br></div>FYI: if there is a bug in finalizeBundle() one possible fix is not calling it. Nothing in the MachineIR requires finalizeBundle to be called, bundles are perfectly valid without it. It is only there for legacy reasons because some targets want to see the extra BUNDLE marker with duplicate MachineOperands.</div><div><br></div><div>-Andy</div><div><br><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div><br></div><div>Regards.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/9 Sergei Larin<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:slarin@codeaurora.org" target="_blank">slarin@codeaurora.org</a>></span><br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Yang,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"> <span class="Apple-converted-space"> </span>There is not enough info here to understand what is going wrong – what is your target? Is dependency dag correct going into scheduling and packetization?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Sergei<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 10.5pt; font-family: Consolas; color: rgb(31, 73, 125);">---<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);">Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation</span><span style="font-size: 10.5pt; font-family: Consolas; color: rgb(31, 73, 125);"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125);"><u></u> <u></u></span></p><div style="border-style: none none none solid; border-left-color: blue; border-left-width: 1.5pt; padding: 0in 0in 0in 4pt;"><div><div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in;"><p class="MsoNormal"><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif;">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif;"><span class="Apple-converted-space"> </span><a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>[mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a>]<span class="Apple-converted-space"> </span><b>On Behalf Of<span class="Apple-converted-space"> </span></b>???<br><b>Sent:</b><span class="Apple-converted-space"> </span>Sunday, November 10, 2013 8:31 PM<br><b>To:</b><span class="Apple-converted-space"> </span>LLVM-Dev ‎[<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a>]‎<br><b>Subject:</b><span class="Apple-converted-space"> </span>[LLVMdev] basic block missing after MachineInstr packetizing<u></u><u></u></span></p></div></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hi, all,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">When I schedule machine instructions in a VLIW way and packetize them, a problem is encountered, and I will show it use a simplified case as follows.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">############ original instruction sequence<u></u><u></u></p></div><div><p class="MsoNormal">...<u></u><u></u></p></div><div><p class="MsoNormal">insn1<u></u><u></u></p></div><div><p class="MsoNormal">...<u></u><u></u></p></div><div><p class="MsoNormal">jump  LBB0_xx<u></u><u></u></p></div><div><p class="MsoNormal">...<u></u><u></u></p></div><div><p class="MsoNormal">LBB0_xx:<u></u><u></u></p></div><div><p class="MsoNormal">...<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">############ expected instruction sequence after scheduling and packetizing<u></u><u></u></p></div><div><p class="MsoNormal">insn1; jump LBB0_xx<br clear="all"><u></u><u></u></p><div><p class="MsoNormal">...<u></u><u></u></p></div><div><p class="MsoNormal">LBB0_xx:<u></u><u></u></p></div><div><p class="MsoNormal">...<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">############ generated instruction sequence<u></u><u></u></p></div><div><p class="MsoNormal">insn1; jump LBB0_xx<br clear="all"><u></u><u></u></p><div><p class="MsoNormal">...<u></u><u></u></p></div><div><p class="MsoNormal">#BB#xx:<u></u><u></u></p></div><div><p class="MsoNormal">...<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">BasicBlock BB#xx is commented out when insn1 and "jump LBB0_xx" is bundled.<u></u><u></u></p></div><div><p class="MsoNormal">I guess the reference to LBB0_xx is deconstructed when insn1 and LBB0_xx are packetized together thus BB#xx is commented out.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">What should we do if the reference to LBB0_xx has to be maintained?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks ahead!<u></u><u></u></p></div><div><p class="MsoNormal"><br>--<u></u><u></u></p></div></div><p class="MsoNormal"><span style="font-family: MingLiU;">杨勇勇</span><span class="Apple-converted-space"> </span>(Yang Yong-Yong)<u></u><u></u></p></div></div></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>--<span class="Apple-converted-space"> </span><br>杨勇勇 (Yang Yong-Yong)</div>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a><span class="Apple-converted-space"> </span>        <a href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></div></blockquote></div><br></body></html>