<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 11, 2015 at 7:53 AM, Diego Novillo via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@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"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Dec 11, 2015 at 9:58 AM, Diego Novillo <span dir="ltr"><<a href="mailto:dnovillo@google.com" target="_blank">dnovillo@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">So, I traced it down to the DenseMaps in class FunctionSamples. I've replaced them with two std::vector, and the read operation causes the compiler to grow from 70Mb to 280Mb. With the DenseMaps, reading the profile causes the compiler to grow from 70Mb to 3Gb.<div><br></div><div>Somehow the DenseMaps are causing a 10x growth factor. Those keys are probably an issue. Or perhaps we just need a different representation for sample records and call sites.</div></div></blockquote><div><br></div></span><div>Yes. In going through DenseMap's implementation I see that large values for keys will cause a lot of growth. And the documentation confirms it (someday I'll learn to read documentation first).</div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">I agree, it's a pretty major pitfall. It'd be nice if DenseMap used std::unique_ptr or something under the hood for value types over a certain size.</div></div>