[PassManager] Ensure destructors of cached AnalysisUsage objects are run
authorPhilip Reames <listmail@philipreames.com>
Fri, 4 Dec 2015 23:48:19 +0000 (23:48 +0000)
committerPhilip Reames <listmail@philipreames.com>
Fri, 4 Dec 2015 23:48:19 +0000 (23:48 +0000)
commitf79b7835d821236a302090fa9eb05a3a1cc47c31
tree4f2d247df22b4c236e4c1407b3d4f5856c6843f4
parent5143703795b66599df93a9f35462e522f925c0f8
[PassManager] Ensure destructors of cached AnalysisUsage objects are run

In 254760, I introduced the usage of a BumpPtrAllocator for the AnalysisUsage instances held by the PassManger.  This turns out to have been incorrect since a BumpPtrAllocator does not run the destructors of objects when deallocating memory.  Since a few of our SmallVector's had grown beyond their small size, we end up with some leaked memory.  We need to use a SpecificBumpPtrAllocator instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254803 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/LegacyPassManagers.h
lib/IR/LegacyPassManager.cpp