<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 20, 2016, at 9:13 AM, koffie drinker via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">I'm trying to speed up the JIT time with llvm (3.9.1).</div><div class="">So far i've implemented the object cache, used FastISel and disabled optimizations.</div></div></div></blockquote><div><br class=""></div><div>I can’t help with the rest, but just wanted to mention that totally disabling the IR optimizations is not necessarily a good idea depending on what does the input IR looks like: some of the optimizations can be “lightweight” and simplify the IR / delete dead core, making the compile-time actually faster.</div><div><br class=""></div><div>— </div><div>Mehdi</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">Jit time is still too slow for my purpose (I do have a lot of code to Jit).</div></div></div></blockquote><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><a href="http://llvm.org/docs/ProgrammersManual.html#threads-and-the-jit" class="">http://llvm.org/docs/ProgrammersManual.html#threads-and-the-jit</a> states that we can invoke <span style="font-family: consolas, 'deja vu sans mono', 'bitstream vera sans mono', monospace; font-size: 13px;" class="">ExecutionEngine::getPointerToFunction()</span> concurrently. This function was replaced by <span style="font-family: consolas, 'deja vu sans mono', 'bitstream vera sans mono', monospace; font-size: 13px;" class="">ExecutionEngine::getFunctionAddress(). </span>Is this function also thread safe?</div><div class=""><br class=""></div><div class="">I want to speed up codegen by invoking parallel calls to getfunctionaddress(). Currently  due the the large amount of code that has to be Jitted, the getfunctionaddress() takes around 40% of my load time.</div><div class=""><br class=""></div><div class="">What is meant with "<span style="font-family: 'lucida grande', 'lucida sans unicode', geneva, verdana, sans-serif; font-size: 14px;" class="">he user must still ensure that only one thread accesses IR in a given </span><code class="gmail-literal gmail-docutils" style="font-family: consolas, 'deja vu sans mono', 'bitstream vera sans mono', monospace; font-size: 0.95em;"><span class="gmail-pre">LLVMContext</span></code><span style="font-family: 'lucida grande', 'lucida sans unicode', geneva, verdana, sans-serif; font-size: 14px;" class=""> while another thread might be modifying it" ?</span></div><div class=""><span style="font-family: 'lucida grande', 'lucida sans unicode', geneva, verdana, sans-serif; font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-family: 'lucida grande', 'lucida sans unicode', geneva, verdana, sans-serif; font-size: 14px;" class="">If I pre-generate all IR, and before execution, invoke the parallel getfunctionaddress() I should be fine right ? Since IR won't be modified anymore.</span></div><div class=""><span style="font-family: 'lucida grande', 'lucida sans unicode', geneva, verdana, sans-serif; font-size: 14px;" class=""><br class=""></span></div><div class=""><font face="lucida grande, lucida sans unicode, geneva, verdana, sans-serif" class=""><span style="font-size:14px" class="">Cheers,</span></font></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>