<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 9, 2011, at 4:38 PM, Villmow, Micah wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br><blockquote type="cite">-----Original Message-----<br></blockquote><blockquote type="cite">From: Devang Patel [mailto:dpatel@apple.com]<br></blockquote><blockquote type="cite">Sent: Monday, May 09, 2011 4:28 PM<br></blockquote><blockquote type="cite">To: Villmow, Micah<br></blockquote><blockquote type="cite">Cc: llvm-commits<br></blockquote><blockquote type="cite">Subject: Re: [llvm-commits] SelectionDAG Loosing debug information<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">DanglingDebugInfoMap maps llvm::Value to a node. So, the mapping is<br></blockquote><blockquote type="cite">invalid whenever NodeMap is cleared. Are you sure this patch is the<br></blockquote><blockquote type="cite">right approach here ? <br></blockquote>[Villmow, Micah] Maybe, I'm not 100% familiar with the code, but it <br>seems to fix the problem we are having. The problem we are having is this:<br>The bitcode attached to the bug has a case where after running inlineAll<br> and then mem2reg, the resulting debug information is attached to a <br>phi node. The debug information references an instruction in a previous<br>basic block but has no references in the current basic block. By my<br>understanding after looking at the code, no nodes are created for the<br>phi node and the debug information is added to the map. However, since<br>no nodes in the current block reference the debug information, there<br>can be no resolving of the dangling reference by the end of the<br>block, which the map then gets cleared.<br><br>What this change does is allows for all of the dangling references to<br>be resolved by the current or previous block at some point in the future<br>and after all the basic blocks have been processed and there is no<br>possibility of resolving the dangling reference anymore, then it is cleared.<br><br>I don't see this as being a problem when NodeMap is cleared simply because<br>if the node existed in the current basic block, then the dangling reference<br>wouldn't exist in the DanglingDebugInfoMap as it is replaced once it is resolved.<font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><div><br></div>OK this makes. Go ahead and apply the patch, please include a test case also.</div><div>Thanks,</div><div>-</div><div>Devang<br><br><blockquote type="cite"><div>Micah<br><blockquote type="cite">-<br></blockquote><blockquote type="cite">Devang<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On May 9, 2011, at 4:04 PM, Villmow, Micah wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Patch attached.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">-----Original Message-----<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">From: <a href="mailto:llvm-commits-bounces@cs.uiuc.edu">llvm-commits-bounces@cs.uiuc.edu</a> [mailto:llvm-commits-<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">bounces@cs.uiuc.edu] On Behalf Of Eric Christopher<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Sent: Monday, May 09, 2011 12:50 PM<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">To: Villmow, Micah<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Cc: llvm-commits<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Subject: Re: [llvm-commits] SelectionDAG Loosing debug information<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">On May 9, 2011, at 11:57 AM, Villmow, Micah wrote:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I've attached a patch to bug9879 that stops SelectionDAG from<br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">dropping debug information. Can someone review to see if this<br></blockquote></blockquote></blockquote><blockquote type="cite">approach<br></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">is correct or if a better one is preferred?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">No patch attached.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">-eric<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">llvm-commits mailing list<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><bug9869.patch>_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">llvm-commits mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br><br></div></blockquote></div><br></body></html>