<div dir="ltr">Hello,<div><br></div><div>Regarding the problem of debug range for optimized code. <div>Currently a DEBUG_VALUE will be inserted after the <def>vregX</div><div>DEBUG_VALUE are only valid until the end of the current MachineBasicBlock. That's the main problem.</div><div>Why not simply iterate over all uses of vregX and insert an DEBUG_VALUE in all the MachineBasicBlocks where vregX is used. (pre regalloc)</div><div><br></div><div>I prototyped a small pass to do that and at first it seems to improve .debug_loc range validity and enhance the debugging experience for optimized code.</div><div><br></div><div><br></div><div><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 12, 2015 at 11:11 AM, Vikram TV via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:16px">Hi all,</div><div style="font-size:16px"><br></div><div style="font-size:16px">An early implementation of extending debug ranges and providing multiple location support is done here: <a href="http://reviews.llvm.org/D11933" target="_blank">http://reviews.llvm.org/D11933</a></div><div style="font-size:16px"><br></div><div style="font-size:16px">Design document: <a href="https://docs.google.com/document/d/1noDVWTvTWBdYdweICPBwvwyt8QvX4KHl7j3XKNSg1nE/edit?usp=sharing" target="_blank">https://docs.google.com/document/d/1noDVWTvTWBdYdweICPBwvwyt8QvX4KHl7j3XKNSg1nE/edit?usp=sharing</a></div><div style="font-size:16px"><br></div><div style="font-size:16px"><div style="min-height:100%"><div style="width:1163.64px"><div><div><div><div style="width:949.633px"><div><div><div><div><div style="min-height:498px"><div style="min-height:63.3806px"><div><div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote></div></div></div></div></div>