[llvm-dev] High memory use and LVI/Correlated Value Propagation

Philip Reames via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 13 15:38:24 PST 2016


I don't think that arbitrary limiting the complexity of the search is 
the right approach.  There are numerous ways the LVI infrastructure 
could be made more memory efficient.  Fixing the existing code to be 
memory efficient is the right approach.  Only once there's no more low 
hanging fruit should we even consider clamping the search.

In general, introducing clamps should be an absolute last resort. We 
really don't want an optimizer than if fragile with respect to code size 
and shape.

Philip

On 01/13/2016 02:27 PM, Joerg Sonnenberger via llvm-dev wrote:
> Hi all,
> with the current trunk I have two major cases where clang needs more
> than 2GB memory for compiling programs with -O2. One is related to GVN
> and MemoryDependenceAnalysis and has a pending patch. The other is
> related to the Correlated Value Propagation and Lazy Value Information
> cache. Attached is a heap profile for one of the relevant test cases.
> Looking at the sources, I don't see any form of CFG limiters in LVI or
> CVP, so it doesn't seem surprising that large memory use can be easily
> triggered. This normally also corresponds to very slow compilation, so
> it addressing it fixes two issues at the same time. A test case can be
> found in https://llvm.org/bugs/show_bug.cgi?id=10584.
>
> The question for me is: where should such complexity limits be placed --
> in the CVP pass or inside LVI? Is anyone specifically interested in
> hunting down the problem?
>
> Joerg
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160113/db215a7a/attachment.html>


More information about the llvm-dev mailing list