aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/MemoryBuiltins.h
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2013-01-13 18:02:57 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2013-01-13 18:02:57 +0000
commit29eb2cc00ca0bc4d218c6d034f90becfed999bcb (patch)
tree59d5c0e76548bc7b30e6f2e7cfc5b3a0996cc74b /include/llvm/Analysis/MemoryBuiltins.h
parent135174deb8e1e46d87b0aa55ef8df43c3ac79a8d (diff)
downloadexternal_llvm-29eb2cc00ca0bc4d218c6d034f90becfed999bcb.tar.gz
external_llvm-29eb2cc00ca0bc4d218c6d034f90becfed999bcb.tar.bz2
external_llvm-29eb2cc00ca0bc4d218c6d034f90becfed999bcb.zip
fix compile-time regression report by Joerg Sonnenberger:
cache result of Size/OffsetVisitor to speedup analysis of PHI nodes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/MemoryBuiltins.h')
-rw-r--r--include/llvm/Analysis/MemoryBuiltins.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Analysis/MemoryBuiltins.h b/include/llvm/Analysis/MemoryBuiltins.h
index f2c564f729..2a9cd75ee7 100644
--- a/include/llvm/Analysis/MemoryBuiltins.h
+++ b/include/llvm/Analysis/MemoryBuiltins.h
@@ -153,12 +153,14 @@ typedef std::pair<APInt, APInt> SizeOffsetType;
class ObjectSizeOffsetVisitor
: public InstVisitor<ObjectSizeOffsetVisitor, SizeOffsetType> {
+ typedef DenseMap<const Value*, SizeOffsetType> CacheMapTy;
+
const DataLayout *TD;
const TargetLibraryInfo *TLI;
bool RoundToAlign;
unsigned IntTyBits;
APInt Zero;
- SmallPtrSet<Value*, 8> SeenInsts;
+ CacheMapTy CacheMap;
APInt align(APInt Size, uint64_t Align);