<div dir="ltr">+echristo, who did a bunch of this subtarget stuff, in case he has some extra insight (and/or just so he knows in case other similar things come up)</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 9:57 PM, Keno Fischer via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">loladiro created this revision.<br>
loladiro added a subscriber: llvm-commits.<br>
loladiro set the repository for this revision to rL LLVM.<br>
<br>
While profiling LLVM's memory allocation, I noticed that getSubtargetImpl was called quite often (and it allocates heap memory by doing string operations). This simple change to cache the TargetLowering/TargetRegisterInfo in CodeGenPrepare reduces the total number of allocations in my test compile by about 3%<br>
<br>
Repository:<br>
rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D14222" rel="noreferrer" target="_blank">http://reviews.llvm.org/D14222</a><br>
<br>
Files:<br>
lib/CodeGen/CodeGenPrepare.cpp<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>