<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 Jan 4, 2014, at 4:38 AM, Haishan <<a href="mailto:hndxvon@163.com">hndxvon@163.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height: 1.7; font-size: 14px; font-family: arial;"><div> At 2014-01-04 06:11:38,"Jakob Stoklund Olesen" <<a href="mailto:stoklund@2pi.dk">stoklund@2pi.dk</a>> wrote:<br><blockquote id="isReplyContent" style="padding-left: 1ex; margin: 0px 0px 0px 0.8ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; "><br><div><div>On Jan 3, 2014, at 1:52 PM, Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:</div><div><br></div><blockquote type="cite"><div style="font-family: Helvetica; ">He really just wants to rerun LiveIntervals analysis, but LiveVariables is no longer available. Would it work just to clear all the intervals rerun LiveIntervals::computeVirtRegs after all the CFG transforms are complete?</div></blockquote><div><br></div></div>Yes, I should think so.<div><br></div><div>/jakob</div><br class="Apple-interchange-newline"></blockquote></div><div><div><br class="Apple-interchange-newline">Thank you very much for your talk.</div><div>I think I could append more information about updating LiveIntervals.</div><div>1. It works well if I just use from step1 to step3, without step4.</div><div>2. In step4, I firstly use UnreachableBlockElim pass to delete OldMBB.</div><div>Then, remove all intervals and recompute all the virtual registers' LiveIntervals.</div><div>3. I debug source code in LiveRangeCalc.cpp and copy partial code shown following.</div><div>/// LiveRangeCalc.cpp</div><div>...</div><div>#ifndef NDEBUG</div><div>    if (MBB->pred_empty()) {</div><div>      MBB->getParent()->verify();</div><div>      llvm_unreachable("Use not jointly dominated by defs.");</div><div>    }</div><div>...</div><div>/// LiveRangeCalc.cpp</div><div>This MBB is the first block of MachineFunction. That's to say, This MBB doesn't have predecessor. It is reasonable?</div><div>From debug information, this unreachable error is generated from recompute a virtual register which isn't used or defined in this MBB. But this virtual register, in NewMBB,  is defined in a machine instruction which is copied from OldMBB.</div><div>So I am puzzled. </div><div>Then, I do as Andy's suggestion, but it doesn't work, and it has same error.</div><div>Could you have any suggestion?</div></div><div>Thank you very much again.</div></div></blockquote><br></div><div>Incrementally updating the live intervals will be complicated. You may be able to completely recompute them by clearing all VirtRegIntervals, then calling computeVirtRegs.</div><div><br></div><div>-Andy</div><br></body></html>