<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 3, 2014, at 1:06 PM, Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 14px; 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><br class="Apple-interchange-newline">On Jan 3, 2014, at 12:10 PM, Jakob Stoklund Olesen <<a href="mailto:stoklund@2pi.dk">stoklund@2pi.dk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 3, 2014, at 11:01 AM, Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 14px; 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><br class="Apple-interchange-newline">On Jan 3, 2014, at 4:58 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><br>At 2014-01-01 04:36:21,"Andrew Trick" <<a href="mailto:atrick@apple.com">atrick@apple.com</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>On Dec 31, 2013, at 3:52 AM, Haishan <<a href="mailto:hndxvon@163.com">hndxvon@163.com</a>> wrote:</div></blockquote></div><span style="line-height: 28px;"><div>  My update steps are shown following:</div><div>  LiveIntervals *LIS = &getAnalysis<LiveIntervals>();</div><div>    1. LIS->insertMBBInMaps(NewMBB)</div><div>    2. LIS->InsertMachineInstrRangeInMaps(NewMBB->begin(), NewMBB->end())</div><div>    3. Due to some machine instructions of NewMBB copy from OldMBB, I have to removeInterval firstly. Then I use LIS->createAndComputeVirtRegInterval() to update LiveInterval info of NewMBB.</div><div>    4. Then I want to delete OldMBB in the current MachineFuncion. At the same time, delete LiveIntervals info of OldMBB. So, firstly, Use RemoveMachineInstrFromMaps() to erase SlotIndexes info of OldMBB. And, delete OldMBB from current CFG. Lastly, remove all registers' interval, create and recompute virtual register interval info.</div><div>  However, I get an unreachable error "Use not jointly dominated by defs" in LiveRangeCalc.cpp:188.</div><div>So, comparing with Step3, Step4 generates an unreachable error, Why?</div><div>  Valid information of OldMBB is deleted when updating CFG? Is there something wrong with my updating steps?</div><div>  Thank you very much again.</div></span></div></blockquote><br></div><div style="font-family: Helvetica; font-size: 14px; 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;">I’m haven’t done anything like this so I can only guess.</div><div style="font-family: Helvetica; font-size: 14px; 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;"><br></div><div style="font-family: Helvetica; font-size: 14px; 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;">The error means that some path from function entry does not provide a reaching def for a vreg. You’ll have to analyze the CFG and debug to understand why.</div><div style="font-family: Helvetica; font-size: 14px; 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;"><br></div><div style="font-family: Helvetica; font-size: 14px; 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;">My suggestion would be to completely update the CFG first, with no connections to the old block. Remove the old block, it’s instructions and vregs from maps. Then add the new block to maps and recompute.</div><div style="font-family: Helvetica; font-size: 14px; 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;"><br></div><div style="font-family: Helvetica; font-size: 14px; 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;">You might need to keep track of any vregs referenced in the old block but not in the new block to ensure they are updated.</div></blockquote><div><br></div><div>Those LIS->insert…() functions are only proxies for the corresponding functions on SlotIndexes. They only add the necessary slot indexes, they don’t update any liveness information.</div><div><br></div><div>We don’t have any support for updating liveness after inserting a new basic block. There is no reason you couldn’t do it, but the code doesn’t exist.</div></div></div></blockquote><br></div><div style="font-family: Helvetica; font-size: 14px; 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;">Haishan is using createAndComputeVirtRegInterval for each vreg. I guess this should work if removeInterval is called first.</div></blockquote><div><br></div><div>The problem is with all the other virtual registers in the function. You need to decide if they are live through the new block or not. That isn’t computed automatically.</div><div><br></div><div>Thanks,</div><div>/jakob</div></div></body></html>