<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 20, 2015 at 5:24 AM, Erik Eckstein <span dir="ltr"><<a href="mailto:eeckstein@apple.com" target="_blank">eeckstein@apple.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=":cnp" class="a3s" style="overflow:hidden">With this patch I'm trying to solve the following problem:<br>
<br>
I'm running llvm in multiple threads (each instance uses its private LLVMContext).<br>
With a release-asserts build of llvm I got terrible multi-thread performance. I found that the problem is the mutex in PassRegistry::getPassInfo(), mainly called from PMDataManager::verifyPreservedAnalysis().</div></blockquote></div><br>Do you mean with a release *+* asserts build?</div><div class="gmail_extra"><br></div><div class="gmail_extra">I worked with Owen to fix all of the multi-thread performance problems we could measure in the old pass manager. But we were not measuring the performance of asserts.</div><div class="gmail_extra"><br></div><div class="gmail_extra">In general, we don't work very hard to make asserts builds super fast. We try to make them as cheap as we can, but sometimes there is nothing we can do.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I don't think we want to add a hack like this to the API just to help asserts builds. Do you have a test case that shows a severe problem without asserts?</div></div>