[PATCH] D70376: [LVI] Restructure caching

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 01:03:46 PST 2019


nikic created this revision.
nikic added a reviewer: efriedma.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Variant on D70103 <https://reviews.llvm.org/D70103>. 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 <https://reviews.llvm.org/D69914>, but possibly that's not the right choice.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70376

Files:
  llvm/lib/Analysis/LazyValueInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70376.229760.patch
Type: text/x-patch
Size: 8387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191118/51007b0a/attachment.bin>


More information about the llvm-commits mailing list