<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 31, 2017 at 11:18 PM Dean Michael Berris via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">dberris added a comment.<br>
<br>
In <a href="https://reviews.llvm.org/D36078#826962" rel="noreferrer" target="_blank">https://reviews.llvm.org/D36078#826962</a>, @kpw wrote:<br>
<br>
> What's the primary motivation? Are we trying to avoid the upfront cost of global initialization? The unspecified destructor ordering with multithreaded programs?<br>
<br>
<br>
The primary motivation is to avoid the initialization of atomics at initialization time. This has caused some issues in the past with dynamic linking and relocations.<br></blockquote><div><br>Correctness issues? Performance issues? Seems like it'd be good to have the issues described more fully here (and/or in the commit(s) for posterity/clarity)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It also allows us to start removing the dependencies on the C++ standard library in the implementation. Using raw pointers gets us there, and not using std::mutex gets us there closer.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D36078" rel="noreferrer" target="_blank">https://reviews.llvm.org/D36078</a><br>
<br>
<br>
<br>
</blockquote></div></div>