[PATCH] D11651: [LVI] Improve LazyValueInfo compile time performance

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Thu Jul 30 08:45:50 PDT 2015


bruno created this revision.
bruno added reviewers: resistor, hfinkel, reames.
bruno added subscribers: llvm-commits, dexonsmith.

Changes in LoopUnroll in the past six months exposed scalability
issues in LazyValueInfo when used from JumpThreading. One internal test
that used to take 20s under -O2 now takes 6min.
    
This patch makes a couple of changes to speed-up LazyValueInfo and
reduces compile time to 1m20s.
    
- Change the OverDefinedCache from
DenseSet<std::pair<AssertingVH<BasicBlock>, Value*>>
to
DenseMap<AssertingVH<BasicBlock>, SmallPtrSet<Value *, 4>>

- Use DenseMap instead of std::map for ValueCacheEntryTy. Historically
there seems to be some resistance regarding the change to DenseMap
(r147980), but I couldn't find cases of iterator invalidation for
ValueCacheEntryTy (only for ValueCache, but this one is left unchanged
- still using std::map).


http://reviews.llvm.org/D11651

Files:
  lib/Analysis/LazyValueInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11651.31032.patch
Type: text/x-patch
Size: 5027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150730/caf24f95/attachment.bin>


More information about the llvm-commits mailing list