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%.

llvm-svn: 99823
This commit is contained in:
Ted Kremenek 2010-03-29 18:29:57 +00:00
parent bf2803fb20
commit 23c29f0cbe
2 changed files with 2 additions and 2 deletions

View File

@ -1212,7 +1212,7 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty,
Ty = UnwrapTypeForDebugInfo(Ty);
// Check for existing entry.
std::map<void *, llvm::WeakVH>::iterator it =
llvm::DenseMap<void *, llvm::WeakVH>::iterator it =
TypeCache.find(Ty.getAsOpaquePtr());
if (it != TypeCache.end()) {
// Verify that the debug info still exists.

View File

@ -53,7 +53,7 @@ class CGDebugInfo {
/// 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;
bool BlockLiteralGenericSet;
llvm::DIType BlockLiteralGeneric;