On Mar 29, 2010, at 11:29 AM, Ted Kremenek wrote: > Author: kremenek > Date: Mon Mar 29 13:29:57 2010 > New Revision: 99823 > > URL: http://llvm.org/viewvc/llvm-project?rev=99823&view=rev > Log: > Change 'TypeCache' from being an std::map to a llvm::DenseMap. This reduces > codegen time > on one .i file from 403.gcc by 0.5%.
Thanks Ted, > > /// TypeCache - Cache of previously constructed Types. > // FIXME: Eliminate this map. Be careful of iterator invalidation. > - std::map<void *, llvm::WeakVH> TypeCache; > + llvm::DenseMap<void *, llvm::WeakVH> TypeCache; I think you can remove the fixme now. Did you make sure that iterators aren't getting invalidated here? If something does this: WeakVH &H = TypeCache[x]; ... stuff that could insert or delete from TypeCache... ... use H ... Then this would be a bug, -Chris _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
