[llvm-commits] Avoid O(#registers*#basicblocks) memory use in LiveVariables

Jeffrey Yasskin jyasskin at google.com
Sat May 23 09:24:58 PDT 2009


On Fri, May 22, 2009 at 5:10 PM, Evan Cheng <evan.cheng at apple.com> wrote:
>
> On May 22, 2009, at 4:37 PM, Jeffrey Yasskin wrote:
>
>> I just wanted to double-check that you're not worried about the extra
>> memory use for small functions, and the potential for quadratic time
>> with a higher constant, before I commit this.
>
> I can see the potential for both of those issues. Perhaps you can
> specialize SparseBitVector with a smaller element size to reduce
> memory usage? As for compile time cost, can you measure it by return
> through the llvm test suite?

I've attached the results of `make TEST=nightly report.html
ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1` from before and after my
patch. I'm not sure how to read it though. Is there documentation for
what the columns mean? Do these results say whether the extra memory
use is a problem or just whether the worse random access is a problem?

I haven't yet reduced the template argument to SparseBitVector. What's
the largest common number of basic blocks in a function that variables
tend to be used or alive through? I'd want to set the argument to
that, since the size of an extra SparseBitVectorElement is higher than
anything we could save by reducing the size of an Element.

Thanks,
Jeffrey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090523/dfa315aa/attachment.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090523/dfa315aa/attachment-0001.html>


More information about the llvm-commits mailing list