<div dir="ltr"><div class="gmail_quote">On Thu, May 28, 2015 at 6:28 PM Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On May 28, 2015, at 3:29 AM, Paweł Bylica <<a href="mailto:chfast@gmail.com" target="_blank">chfast@gmail.com</a>> wrote:</div><br><div><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> Then in backtracking, check BotReadyCycle instead of Height. There may be other bugs in backtracking that you're hitting, but that definitely looks suspect to me.<br></blockquote><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">I'll check that solution however I don't fully get it why we need to ever rewrite the Gen.</span></div></blockquote></div><div><br></div></div><div style="word-wrap:break-word">During scheduling, we reset the Gen when scheduling a Def. That way, next time we see a read of that register, it becomes the current Gen.<div><br></div><div>The Gen point is used to determine how far backtracking needs to go. Once we backtracking all the way to the Gen, we reset it to indicate that the register is no longer live. That way, we can schedule a different chain of instructions using the same physical register.</div><div><br></div><div>Andy</div></div></blockquote><div><br></div><div>Thanks for you patience Andy.</div><div><br></div><div>I agree that asserts I introduced are wrong. It's a pity that there are no test for this case in regression tests.</div><div><br></div><div>However I'm still not sure about the condition I removed: </div><div><span style="color:rgb(51,51,51);font-family:monospace;font-size:13px;line-height:18.8500003814697px;white-space:pre-wrap;background-color:rgb(235,235,235)">I->getSUnit()->getHeight() < LiveRegGens[I->getReg()]->getHeight()</span>.</div><div>Can you give me an example when it does not hold.</div><div><br></div><div>- Paweł</div></div></div>