[all-commits] [llvm/llvm-project] f87b78: Reapply [LVI] Restructure caching to fix non-deter...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Jun 13 02:42:05 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f87b785abee0da8939fdd5900a982311b4c25409
      https://github.com/llvm/llvm-project/commit/f87b785abee0da8939fdd5900a982311b4c25409
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-06-13 (Sat, 13 Jun 2020)

  Changed paths:
    M llvm/lib/Analysis/LazyValueInfo.cpp

  Log Message:
  -----------
  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




More information about the All-commits mailing list