[LVI] Improve LazyValueInfo compile time performance
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 18 Aug 2015 16:34:27 +0000 (16:34 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 18 Aug 2015 16:34:27 +0000 (16:34 +0000)
commitbfd49ab5892430f5d68457df412a08c84226426a
tree14f282c223f78f9cbab2ea4c5a48669197a490ac
parentee396be939b9777967e6c73dc1b73440d3d8c52a
[LVI] Improve LazyValueInfo compile time performance

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 commit change the OverDefinedCache from
DenseSet<std::pair<AssertingVH<BasicBlock>, Value*>> to
DenseMap<AssertingVH<BasicBlock>, SmallPtrSet<Value *, 4>>
and reduces compile time down to 1m40s.

Differential Revision: http://reviews.llvm.org/D11651

rdar://problem/21320066

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245309 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LazyValueInfo.cpp