[PATCH] D15391: [LazyValueInfo] Reduce memory usage

Akira Hatanaka via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 13:36:36 PST 2015


ahatanak added a comment.

> --> Is it possible to give a simple example where LazyValueInfo uses an excessive amount of memory?


LazyValueInfoCache is inserting a large number of overdefined lattice values into ValueCache when the test case I have is compiled with opt. This is the stats I have:

4 - inserted lattice const
873 - inserted lattice constrange
280419 - inserted lattice nonconst
38308250 - inserted lattice overdefined

So 99% of the entries in ValueCache are overdefined. However, it isn't necessary to write overdefined values into ValueCache because OverDefinedCache keeps track of which values are overdefined in which basic blocks and, unlike const or constrange, overdefined doesn't need any of the information in LVILatticeVal (Val and Range).

I don't have a simple explanation as to why I'm seeing this behavior when I compile the particular test case yet.

> --> Maybe a testing case?


The test case I have is a preprocessed file of lib/ARCMigrate/Transforms.cpp (from an internal branch of clang) from 2012. I'll see if I can come up with the exact command that exhibits the same behavior.


http://reviews.llvm.org/D15391





More information about the llvm-commits mailing list