<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 10, 2018 at 11:48 AM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Jan 10, 2018, at 11:40 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
><br>
> Implementing GCOV in the new pass manager  (r322126) I'm wondering whether the addition of a "StripSymbols(OnlyDebugInfo = true)" pass is needed - and maybe that functionality in general can be removed?<br>
><br>
> It was added, I believe, before we had the "NoDebug" style debug info, used specifically for profiling, optimization remarks, etc. So when this was implemented, stripping the debug info was probably necessary to avoid actually emitting debug info into the resulting object files.<br>
><br>
> This could be useful in an LTO like build, if you know the debug info is not needed at the LTO stage - strip it out at the end of the frontend compile to reduce the size of bitcode files.<br>
<br>
You mean that for LTO scheduling an explicit StripSymbols pass is an advantage over just using the NoDebug, which only causes the baclkend to ignore it? But the debug info will probably be needed for optimization remarks during LTO time, wouldn't it?<br></blockquote><div><br>Right - though you could be doing a build that doesn't have remarks enabled, but wanted debug info locations for something that's frontend-only? I don't know the full diversity of uses of NoDebug debug info, but could imagine there might be uses (not sure if there are current uses - could be future uses, but that's nothing to worry much about/design for of course) that only need it for the frontend compile.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
><br>
> So... does this seem relevant here? In general? (I haven't looked at what other uses)<br>
<br>
As one datapoint, I didn't know we had StripSymbols(OnlyDebugInfo = true) as a pass (I only knew about the llvm::stripDebugInfo() functions). Grepping for other uses of StripSymbols and stripDebugInfo might be a good start.<br></blockquote><div><br>*nod*<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-- adrian<br>
><br>
> Totally happy to port the StripSymbols pass to the new pass manager if it seems like it's useful/necessary.<br>
><br>
> - Dave<br>
<br>
</blockquote></div></div>