<div dir="ltr">Okay, I'll take a look at that patch and see if it gives me any ideas.</div><div class="gmail_extra"><br><div class="gmail_quote">On 2 February 2017 at 16:42, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Feb 2, 2017, at 5:16 AM, Ed Jones via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hi all,<br>
><br>
> I'm currently working on an out-of-tree backend and am trying to<br>
> improve the debug experience when debugging optimized code. Our<br>
> backend only has 8-bit and 16-bit legal types, so any larger values<br>
> are expanded. The behavior I am currently seeing is that the expanded<br>
> halves of an illegal type lose their debug information. Is this the<br>
> expected behavior?<br>
><br>
> For example, if I have an ISD::DBG_VALUE SDNode associated with a<br>
> value, and that value is split up (for example a i64 load expanded<br>
> into two i32 loads), I would expect to see a new ISD::DBG_VALUE<br>
> tracking each fragment of the input original debug variable. However,<br>
> I can't see anywhere this is handled. There seems to be some support<br>
> for this, through the DW_OP_LLVM_fragment DIExpression, and there is a<br>
> function DIBuilder::<wbr>createFragmentExpression which could be used to<br>
> create an expression to track part of a variable, however these don't<br>
> seem to be used much.<br>
<br>
</span>Support for fragmented variables is (relatively) new and so far only implemented for SROA. Patches that extend support to other passes would be very welcome! You can find also a WIP patch in phabricator that adds support for TypeLegalizer that would need to be picked up by somebody.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- adrian<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Thanks,<br>
> Ed<br>
> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
</div></div></blockquote></div><br></div>