<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 31, 2016, at 5:35 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Mar 30, 2016 at 10:49 AM, Adrian Prantl <span dir="ltr" class=""><<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>></span> wrote:<br class=""><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 style="word-wrap:break-word" class=""><br class=""><div class=""><span class=""><blockquote type="cite" class=""><div class="">On Mar 29, 2016, at 10:06 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class=""><div class=""><br class=""><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On Tue, Mar 29, 2016 at 12:03 PM, Adrian Prantl via cfe-commits<span class=""> </span><span dir="ltr" class=""><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank" class="">cfe-commits@lists.llvm.org</a>></span><span class=""> </span>wrote:<br class=""><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"><span class=""><br class="">> On Mar 29, 2016, at 12:00 PM, Joerg Sonnenberger <<a href="mailto:joerg@britannica.bec.de" target="_blank" class="">joerg@britannica.bec.de</a>> wrote:<br class="">><br class="">> On Tue, Mar 29, 2016 at 06:47:24PM +0000, Adrian Prantl via cfe-commits wrote:<br class="">>> This code in this patch listens to the driver option -gfull, and lowers it to the new cc1 option -debug-retain-types (1).<br class="">>> When -debug-retain-types is present, CGDebugInfo will retain every(2) type it creates.<br class="">><br class="">> Is there a good reason for calling it -gfull? I would find something<br class="">> -gall-types or -gretain-all-types to make a lot more sense. This should<br class="">> be orthogonal to other options like providing only line tables?<br class=""><br class=""></span>My thinking was this:<br class="">The driver already supports -gfull, but it doesn’t do anything.<br class="">This patch can be considered a first step towards making -gfull behave as expected.<br class="">Eventually it should emit debug info for *all* types.<br class=""></blockquote><div class=""><br class=""></div><div class="">Seems somewhat problematic to half implement it, though. (admittedly we're just silently ignoring it right now)<br class=""></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">I don’t think this is problematic at all. This is incremental development.</div></div></div></blockquote><div class=""><br class=""></div><div class="">It strikes me as a strange increment. Implementing full -gfull doesn't seem like it would take much time to implement, etc.</div><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 style="word-wrap:break-word" class=""><div class=""><span class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class=""><br class="">& is 'real' -gfull what dtrace really wants? (seems it isn't - since clang's never really implemented it?)<br class=""></div></div></div></blockquote><div class=""><br class=""></div></span><div class="">Admitted, ‘real' -gfull is probably more than it absolutely needs.</div></div></div></blockquote><div class=""><br class=""></div><div class="">If just retaining referenced types is all it needs, yeah, it seems -gfull would be rather beyond that.</div><div class=""> </div><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 style="word-wrap:break-word" class=""><div class=""><span class=""><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="">Emitting all types referenced by used (even if later optimized away) code seems like the thing? -greferenced? or maybe a -f flag? Not sure.</div></div></div></blockquote><div class=""><br class=""></div></span><div class="">I don’t see a compelling case for adding another driver option to the already confusing zoo of existing driver options.</div></div></div></blockquote><div class=""><br class=""></div><div class="">My point is I think a -gfull that does something other than full would possibly be more confusing than not.</div></div></div></div></div></blockquote><div><br class=""></div><div>Point taken. Let’s surface this under a separate option instead. We can call it “-greferenced” to fit between -gfull and -gused.</div><div><br class=""></div>thanks,</div><div>adrian<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> </div><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 style="word-wrap:break-word" class=""><div class=""><div class=""> Note that we currently also accept a -gused option which according to the driver code is supposed to be the opposite of -gfull. </div></div></div></blockquote><div class=""><br class=""></div><div class="">Are -gused/-gfull meant to toggle each other?<br class=""><br class="">Huh, seems they're not general GCC flags, they're Darwin things - I didn't know that.<br class=""><br class="">Looks like GCC usually spells this <span style="font-family: monospace; font-size: inherit;" class="">-f[no-]eliminate-unused-debug-types. But doesn't seem to have an intermediate version that would be what you're going for.</span></div><div class=""> </div><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 style="word-wrap:break-word" class=""><div class=""><div class="">Adding a -greferenced option IMO will only make this more confusion instead of helping.</div><div class="">My suggestion is to have -gfull (also) activate -debug-retain-types. In the somewhat hypothetical scenario that someone implements a more comprehensive version of -gfull we should revisit this and analyze whether the resulting debug information is really too large to be practical, and if we conclude that this is a problem, we can still decide to expose -debug-retain-types to the driver with a new separate option.</div></div></div></blockquote><div class=""><br class=""></div><div class="">I would be concerned about breaking other existing users that may grow once we support the flag. (& perhaps inconsistency between GCC and Clang, but inconsistency already exists there of course)<br class=""></div></div></div></div></div></blockquote><div><br class=""></div><div><br class=""></div></div></body></html>