[llvm] r265520 - IR: Move MDStrings to a BumpPtrAllocator
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 23:41:56 PDT 2016
Author: dexonsmith
Date: Wed Apr 6 01:41:54 2016
New Revision: 265520
URL: http://llvm.org/viewvc/llvm-project?rev=265520&view=rev
Log:
IR: Move MDStrings to a BumpPtrAllocator
We never delete any MDString until the context is destroyed. Might as
well throw them onto a BumpPtrAllocator.
Modified:
llvm/trunk/lib/IR/LLVMContextImpl.h
Modified: llvm/trunk/lib/IR/LLVMContextImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LLVMContextImpl.h?rev=265520&r1=265519&r2=265520&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LLVMContextImpl.h (original)
+++ llvm/trunk/lib/IR/LLVMContextImpl.h Wed Apr 6 01:41:54 2016
@@ -931,7 +931,7 @@ public:
FoldingSet<AttributeSetImpl> AttrsLists;
FoldingSet<AttributeSetNode> AttrsSetNodes;
- StringMap<MDString> MDStringCache;
+ StringMap<MDString, BumpPtrAllocator> MDStringCache;
DenseMap<Value *, ValueAsMetadata *> ValuesAsMetadata;
DenseMap<Metadata *, MetadataAsValue *> MetadataAsValues;
More information about the llvm-commits
mailing list