[PATCH] D28549: Global DCE performance improvement
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 04:53:42 PST 2017
serge-sans-paille added inline comments.
Comment at: include/llvm/Transforms/IPO/GlobalDCE.h:41
+ // Constant -> Globals that use this global cache.
+ std::unordered_map<Constant *, SmallPtrSet<GlobalValue *, 8>>
> serge-sans-paille wrote:
> > mehdi_amini wrote:
> > > majnemer wrote:
> > > > DenseMap?
> > > DenseMap with a `SmallPtrSet`?
> > I've kept the original Moving to a std::unordered_multimap for GVDEpendencies, not sure about what you expect for the ConstantDependenciesCache. What's the pro/con of using a DenseMap?
> DenseMap is an open-addressing hashmap where the bucket are allocated with the key, hence "dense". This is very performance but for the memory consumption: empty buckets are taking the same amount of space as occupied ones.
> So we usually avoid DenseMap containing "large" elements.
ok, thanks for the extra info. Everything looks much nicer now.
More information about the llvm-commits