<div dir="ltr">On 9 November 2013 15:03, Henrique Santos <span dir="ltr"><<a href="mailto:henrique.nazare.santos@gmail.com" target="_blank">henrique.nazare.santos@gmail.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>
It seems like a difficult thing to do since we would have to keep metadata intact across transformations, which, AFAIK, is not done.<br>mem2reg, for example, doesn't even propagate debug metadata to phi nodes, and I'm not really sure if it's valid to do so.<br>
</div></div></div></div></div></blockquote><div><br></div><div>I understand that for most micro opts (delete, combine, coalesce, simplify, etc), this would be pointless. But for big things, like the vectorizers, it could be an interesting tool in addition to the sanitizers, since at that point, we'd have a lot more information than in the front-end (vector sizes, types, costs, etc). In those cases, I don't think we need that much debug info.</div>
<div><br></div><div>Line information should be enough for big things, and that's reasonably kept, even at O3. For instance, if a loop is inlined into another function, it'll contain the original line info, which is helpful. Also, if a function is inlined into a loop, and the SLP-vectorizer has warnings, it'll also point to the original function. It shouldn't be hard to include the function name in the warning (to know where it was inlined into, for example).</div>
<div><div><br></div></div><div>I'm thinking of making the optimization passes help the front-end(s), the same way PGO helps the optimization passes.</div><div><br></div><div>cheers,</div><div>--renato</div></div><br></div>
</div>