diff options
| author | Justin Bogner <mail@justinbogner.com> | 2015-12-05 00:39:14 +0000 | 
|---|---|---|
| committer | Justin Bogner <mail@justinbogner.com> | 2015-12-05 00:39:14 +0000 | 
| commit | d9a8ac6cc773a3de6701f79894c5fd0da1aaa4fd (patch) | |
| tree | 205086846c21e23344dc809705727eb7fd4f9d7c | |
| parent | 9d77952332fcbfadcb407119e09a3609cd23ac7d (diff) | |
| download | bcm5719-llvm-d9a8ac6cc773a3de6701f79894c5fd0da1aaa4fd.tar.gz bcm5719-llvm-d9a8ac6cc773a3de6701f79894c5fd0da1aaa4fd.zip  | |
CodeGen: Let the BumpPtrAllocator free the elements of indexList
The indexList's nodes are all allocated on a BumpPtrAllocator, so it's
more efficient to let them be freed when it goes away, rather than
deleting them directly. This is a follow up to r254794.
llvm-svn: 254808
| -rw-r--r-- | llvm/include/llvm/CodeGen/SlotIndexes.h | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h index 5dc42e20deb..7b621bee259 100644 --- a/llvm/include/llvm/CodeGen/SlotIndexes.h +++ b/llvm/include/llvm/CodeGen/SlotIndexes.h @@ -376,6 +376,11 @@ namespace llvm {        initializeSlotIndexesPass(*PassRegistry::getPassRegistry());      } +    ~SlotIndexes() { +      // The indexList's nodes are all allocated in the BumpPtrAllocator. +      indexList.clearAndLeakNodesUnsafely(); +    } +      void getAnalysisUsage(AnalysisUsage &au) const override;      void releaseMemory() override;  | 

