<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Apr 30, 2013, at 10:04 AM, Sergei Larin <<a href="mailto:slarin@codeaurora.org">slarin@codeaurora.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: 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;">Stefan,<br><br>This looks good to me, but please wait for OK from Andy.<br></div></blockquote><div><br></div>LGTM. Thanks.</div><div>-Andy</div><div><br><blockquote type="cite"><div style="letter-spacing: 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;">---<br>Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by<br>The Linux Foundation<br><br><br><blockquote type="cite">-----Original Message-----<br>From: Stefan Hepp [<a href="mailto:stefan@stefant.org">mailto:stefan@stefant.org</a>]<br>Sent: Tuesday, April 30, 2013 7:52 AM<br>To: Sergei Larin<br>Cc: <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>Subject: Re: [PATCH] Filter out Pseudo nodes in ScheduleDAGVLIW<br><br>Hi Sergei,<br><br>On 04/29/2013 11:30 PM, Sergei Larin wrote:<br><blockquote type="cite"> Would you happen to have a test case for this? Thanks.<br></blockquote><br>The SDNodes that caused the problems for me are the INLINEASM and<br>COPY_TO_REGCLASS nodes, which trigger the assertions in the<br>HazardRecognizer and PriorityQueue. However, I cannot reproduce this in<br>the Hexagon backend, so obviously those nodes are handled somehow<br>differently there, though I have not been able to find out how (it is<br>not due to InlineAsm being a schedule boundary, at least)..<br><br>So the only 'testcase' I have is our backend itself.. it is available<br>on github<br>(<a href="https://github.com/t-crest/patmos-llvm/tree/master/lib/Target/Patmos">https://github.com/t-crest/patmos-llvm/tree/master/lib/Target/Patmos</a>)<br>if you *really* want to look into it, but apart from that I have to say<br>I have no test case that triggers the problem in the mainstream<br>backends.<br><br>I am also not sure whether the correct way of addressing this is<br>skipping the pseudo nodes in the ScheduleDAG (like the RRList<br>scheduler) or not letting those nodes reach the VLIW scheduler in the<br>first place, like Hexagon seems to manage to do. The first way of doing<br>it seems more robust and should allow the packetizer to reset its state<br>when encountering inline assembly though (as far as I understand it,<br>assuming that it is not the DFAPacketizer that actually filters out<br>inline-asm nodes in Hexagon..).<br><br>Kind regards,<br> Stefan<br><br><br><blockquote type="cite"><blockquote type="cite">-----Original Message-----<br>From: <a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a> [mailto:llvm-commits-<br><a href="mailto:bounces@cs.uiuc.edu">bounces@cs.uiuc.edu</a>] On Behalf Of Stefan Hepp<br>Sent: Monday, April 29, 2013 7:54 AM<br>To: <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>Subject: [PATCH] Filter out Pseudo nodes in ScheduleDAGVLIW<br><br>Hi,<br><br>ScheduleDAGVLIW uses the HazardRecognizer, but does not filter out<br>any Pseudo nodes, causing the ScoreboardHazardRecognizer to run into<br>an<br>assertion:<br><br>virtual void<br>llvm::ScoreboardHazardRecognizer::EmitInstruction(llvm::SUnit *):<br>Assertion `MCID && "The scheduler must filter non-machineinstrs"'<br>failed.<br><br>I copied the EmitNode function from ScheduleDAGRRList which does<br>exactly that and added it to ScheduleDAGVLIW, and filtered out<br>COPY_TO_REGCLASS in the ResourcePriorityQueue, now the VLIW<br></blockquote></blockquote>scheduler<br><blockquote type="cite"><blockquote type="cite">also works for my custom backend (and the llvm tests still work).<br><br>I attached the patch to this email. It is against LLVM 3.2, but the<br>relevant code has not changed in upstream.<br><br>Regards,<br> Stefan</blockquote></blockquote></blockquote></div></blockquote></div><br></body></html>