<div dir="ltr">On 28 February 2013 01:16, Jean-Luc Duprat <span dir="ltr"><<a href="mailto:jduprat@apple.com" target="_blank">jduprat@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The attached patch caches the result of Function::getIntrinsicID() in a DenseMap attached to the LLVMContext.  This reduces the time actually spent doing string to ID conversion and shows a 10% improvement in compile time for a particularly bad case that involves ARM Neon intrinsics (these have many overloads).<br>
</blockquote><div><br></div><div style>Hi Jean-Luc,</div><div style><br></div><div style>Looks good to me. The constant improvement was expected (O2/O3) and 10% is a good improvement. I'm not expecting any substantial increase in memory footprint.</div>
<div style><br></div><div style>One minor comment:</div><div style><br></div><div style><div>+  typedef llvm::LLVMContextImpl::IntrinsicIDCacheTy IntrinsicIDCacheTy;</div><div>+  IntrinsicIDCacheTy &IntrinsicIDCache = getContext().pImpl->IntrinsicIDCache;</div>
<div><br></div><div style>to </div><div style><br></div><div style><div>+  LLVMContextImpl::IntrinsicIDCacheTy &IntrinsicIDCache = getContext().pImpl->IntrinsicIDCache;</div><div><br></div><div style>Since the typedef is not used anywhere else and it was a bit confusing.</div>
<div style><br></div><div style>About erasing the old function on rename, I'm assuming this could occur on vectorization. Did that show up as errors when you tested it?</div><div style><br></div><div style>cheers,</div>
<div style>--renato</div></div></div></div></div></div>