<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 17, 2014 at 2:00 AM, Elena Demikhovsky <span dir="ltr"><<a href="mailto:elena.demikhovsky@intel.com" target="_blank">elena.demikhovsky@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":217" class="a3s" style="overflow:hidden">+std::map < unsigned, IntrinsicData> IntrWithChainMap;<br>
+void InitIntrinsicsWithChain() {<br>
+  static bool Initialized = false;<br>
+  if (Initialized)<br>
+    return;</div></blockquote></div><br>What?</div><div class="gmail_extra"><br></div><div class="gmail_extra">This is a thread-unsafe global variable with a static initializer, and everything... then using a weird initialized boolean in the function?</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Please revert, and send out this patch for code review so that people can discuss different approaches. I'm convinced that the code as-is isn't the correct design or code for this problem.</div>
</div>