Reapply [LVI] Restructure caching to fix non-determinism
This was reverted due to a reported memory usage increase. However, a test case was never provided, and I wasn't able to reproduce it myself. Relative to the original patch, I have moved the block cache structure behind a unique_ptr, to avoid storing a huge structure inside a DenseMap. --- Variant on D70103 to fix https://bugs.llvm.org/show_bug.cgi?id=43909. The caching is switched to always use a BB to cache entry map, which then contains per-value caches. A separate set contains value handles with a deletion callback. This allows us to properly invalidate overdefined values. A possible alternative would be to always cache by value first and have per-BB maps/sets in the each cache entry. In that case we could use a ValueMap and would avoid the separate value handle set. I went with the BB indexing at the top level to make it easier to integrate D69914, but possibly that's not the right choice. Differential Revision: https://reviews.llvm.org/D70376
Loading
Please register or sign in to comment