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

Evan Cheng evan.cheng at apple.com
Mon May 25 19:26:11 PDT 2009


On May 23, 2009, at 9:24 AM, Jeffrey Yasskin wrote:

> 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?

You can use TEST=llc. It will report compile time spent each pass.  
Unfortunately it doesn't report memory use.


>
>
> 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

There isn't a "right" answer for this. I'd say we should just choose a  
reasonable number. Perhaps 8?

Evan

>
> that, since the size of an extra SparseBitVectorElement is higher than
> anything we could save by reducing the size of an Element.
>
> Thanks,
> Jeffrey
> < 
> report 
> .nightly 
> .trunk 
> .html 
> > 
> < 
> report 
> .nightly 
> .smaller_livevars.html>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list