[llvm] r232743 - GlobalDCE: Improve performance for large modules containing comdats.

Peter Collingbourne peter at pcc.me.uk
Thu Mar 19 12:00:50 PDT 2015


On Thu, Mar 19, 2015 at 11:32:39AM -0700, Chandler Carruth wrote:
> On Thu, Mar 19, 2015 at 11:23 AM, Peter Collingbourne <peter at pcc.me.uk>
> wrote:
> 
> > +    std::unordered_multimap<Comdat *, GlobalValue *> ComdatMembers;
> 
> 
> I wonder if a DenseMap<Comdat *, TinyPtrVector<GlobalValue *>> would be
> better? (Using a sorted vector and std::binary_search naturally.) In
> particular, it seems like it might make sense to optimize for the case of a
> 1:1 correlation between comdat and global.

Maybe, but I don't think more performance tuning is worth it. On my machine
the pass now runs in about 3 seconds over an LTO'd module containing most
of Chrome.

Thanks,
-- 
Peter



More information about the llvm-commits mailing list