<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 27, 2018, at 2:14 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk" class="">peter@pcc.me.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Nov 27, 2018 at 1:50 PM JF Bastien via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""></div><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 style="overflow-wrap: break-word;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Nov 27, 2018, at 10:16 AM, David Blaikie via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="gmail-m_-1209052686766441166Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Nov 26, 2018 at 6:55 PM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank" class="">rnk@google.com</a>> wrote:<br class=""></div><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" class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Nov 26, 2018 at 6:43 PM Kostya Serebryany via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""></div><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" class=""><div class="gmail_quote"><div dir="ltr" class="">On Sat, Nov 17, 2018 at 9:00 AM David Blaikie via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""></div><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" class="">Would it be that drastic to have this require a code change/compiler rebuild to enable? It could be designed so the change is small/easy (changing a constant) but that the default compilers we all ship around (& especially not the official releases) don't allow access to this functionality.<br class=""><br class="">Anyone wanting to gather data would have to make this small change, rebuild their compiler, build their target with this feature & gatehr results from there.</div></blockquote><div class=""><br class=""></div><div class="">This will cripple our ability to do measurements because in many cases we can only build things with whatever is the production compiler. </div><div class="">I'd rather just rename the flag to something like  -ftrivial-auto-var-init=zero-SCARY-WARNING-ABOUT-VOID-WARRANTY-GOES-HERE</div></div></div></blockquote><div class=""><br class=""></div></div></div><div dir="ltr" class=""><div class="gmail_quote"><div class="">Reminds me of -fheinous-gnu-extensions. ;-)</div></div></div></blockquote><div class=""><br class="">Pretty much - and I don't think any choice of spelling is bad enough that it'd make it substantially less likely that people would end up depending on the behavior in their non-buggy codepaths. Once the flag is written into someone's build system, there it is... even if it's absurdly long/verbose/angry/whatever, generally it'll slip under the radar after it's written into the build system.<br class=""></div></div></div></div></blockquote></div><br class=""><div class="">I’d like to get us to a point where we all agree to a solution. I think these statements are true:</div><div class=""><br class=""></div><div class="">0. We want to minimize the size / perf hit because that’ll maximize adoption.</div><div class="">1. We need to gather size / perf data of uninit versus zero-init versus pattern-init.</div><div class="">2. The easier it is to gather data, the faster it’ll be to find and address regressions we don’t know about (likely in other people’s codebases).</div><div class="">3. We don’t want to have zero-init long term, and we don’t want people to rely on it.</div><div class="">4. Giving the flag / attribute an ugly name won’t prevent people from using them.</div><div class=""><br class=""></div><div class="">These seem at odds because we don’t usually remove flags. Can we purposefully change the name of the zero-init flag / attribute on every release, until we finally remove it? Or is the only option to give up on 2. And add friction when trying to collect data?</div></div></blockquote><div class=""><br class=""></div><div class="">We can perhaps take inspiration from how the web platform introduces new experimental features. Historically this was done using vendor prefixes, but this didn't prevent people from using them (i.e. your 4). The approach that Blink (and I believe other vendors) has taken is to put these features behind a user configurable "enable experimental web platform features” setting. The closest analog to the setting for us would probably be a cmake build setting. This makes it easy for folks to collect data with the feature (no code changes, just reconfigure and rebuild), while making it impossible for an arbitrary project to start relying on the flag (unless they ship their own copy of clang, but then again that copy of clang could be modified in arbitrary ways as well).</div></div></div></div></div></blockquote><br class=""></div><div>That still requires a rebuild of clang, right? Experimental features for web stuff is often enabled through e.g. <a href="about:flags" class="">about:flags</a> or something similar (such as a command flag), you don’t rebuild your browser. Something closer for us is a command-line flag, we could also require an environment variable with the command-line flag...</div><br class=""></body></html>