diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-03-29 18:29:57 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-03-29 18:29:57 +0000 |
| commit | 23c29f0cbe93ffa273844a78b9e9ef4f4d73e4ee (patch) | |
| tree | f2004c76555c7a2eda8fe44c9dd2f5fca721e78f /clang/lib/CodeGen | |
| parent | bf2803fb20ec883edc532446e19af423432b0343 (diff) | |
| download | bcm5719-llvm-23c29f0cbe93ffa273844a78b9e9ef4f4d73e4ee.tar.gz bcm5719-llvm-23c29f0cbe93ffa273844a78b9e9ef4f4d73e4ee.zip | |
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
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 97e99ea1e08..d8a9f36c825 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -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. diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index 47a46204834..3a9a4cc12b9 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -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; |

