diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-01-08 02:28:20 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-01-08 02:28:20 +0000 |
commit | 599ebf2767d8c61dd8dbb0d4fb34e9eac9d57676 (patch) | |
tree | cd03e03d48f00b47f43c360c2bcdd603ef4a4e31 /llvm/lib/IR/LLVMContextImpl.h | |
parent | 7cb9d98cf9df2d6544cad826ce9e3719c406f0cf (diff) | |
download | bcm5719-llvm-599ebf2767d8c61dd8dbb0d4fb34e9eac9d57676.tar.gz bcm5719-llvm-599ebf2767d8c61dd8dbb0d4fb34e9eac9d57676.zip |
Remove static global GCNames from Function.cpp and move it to the Context
This remove the need for locking when deleting a function.
Differential Revision: http://reviews.llvm.org/D15988
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 257139
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.h')
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h index a24114d0a0a..d42047d4e77 100644 --- a/llvm/lib/IR/LLVMContextImpl.h +++ b/llvm/lib/IR/LLVMContextImpl.h @@ -1027,6 +1027,13 @@ public: void getOperandBundleTags(SmallVectorImpl<StringRef> &Tags) const; uint32_t getOperandBundleTagID(StringRef Tag) const; + /// Maintain the GC name for each function. + /// + /// This saves allocating an additional word in Function for programs which + /// do not use GC (i.e., most programs) at the cost of increased overhead for + /// clients which do use GC. + DenseMap<const Function*, std::string> GCNames; + LLVMContextImpl(LLVMContext &C); ~LLVMContextImpl(); |