<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 23, 2019 at 6:56 PM Eric Fiselier <<a href="mailto:eric@efcs.ca">eric@efcs.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Have you looked at the codegen clang produces for my suggestion?</div></div></blockquote>I had to use no_destroy to see the desired effect of suppressing the __cxa_atexit call, and even then there was an empty initialization function.</div><div class="gmail_quote"><a href="https://gcc.godbolt.org/z/tVSf47">https://gcc.godbolt.org/z/tVSf47</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">Clang is also not the only compiler that people have to work with.<br></div><div class="gmail_quote"> <br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"><br></div><div dir="auto"><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri., Aug. 23, 2019, 3:01 p.m. Hubert Tong via Phabricator, <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">hubert.reinterpretcast added a comment.<br>
<br>
In D65667#1643305 <<a href="https://reviews.llvm.org/D65667#1643305" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D65667#1643305</a>>, @EricWF wrote:<br>
<br>
> That doesn't need to happen now. But I want to see these changed to be global statics not function local. At least that way we omit the guards entirely. and accessing the variable becomes a single instruction.<br>
<br>
<br>
This goes back to the "paying for something you don't use" with regards to the up-front library loading cost. If people are actually agreed on this course of action, then we can create that version of the patch, but it does not seem clear to me.<br>
<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D65667/new/" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D65667/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D65667" rel="noreferrer noreferrer" target="_blank">https://reviews.llvm.org/D65667</a><br>
<br>
<br>
<br>
</blockquote></div></div></div>
</blockquote></div></div>