diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2010-10-13 00:07:59 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2010-10-13 00:07:59 +0000 |
commit | 67be08a2f186d8262781f0d1ef67cab3cd2a0d2b (patch) | |
tree | dbb5d40ff76691a6af004d9f2ea43990cee8958b /lib/Analysis/RegionInfo.cpp | |
parent | cd776862544518e215b5af8a294f5026ee844684 (diff) | |
download | llvm-67be08a2f186d8262781f0d1ef67cab3cd2a0d2b.tar.gz llvm-67be08a2f186d8262781f0d1ef67cab3cd2a0d2b.tar.bz2 llvm-67be08a2f186d8262781f0d1ef67cab3cd2a0d2b.tar.xz |
RegionInfo: Free the RegionNodes in cache.
Contributed by: ether
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionInfo.cpp')
-rw-r--r-- | lib/Analysis/RegionInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Analysis/RegionInfo.cpp b/lib/Analysis/RegionInfo.cpp index 95b78cd443..6593f07ff3 100644 --- a/lib/Analysis/RegionInfo.cpp +++ b/lib/Analysis/RegionInfo.cpp @@ -376,6 +376,11 @@ void Region::dump() const { } void Region::clearNodeCache() { + // Free the cached nodes. + for (BBNodeMapT::iterator I = BBNodeMap.begin(), + IE = BBNodeMap.end(); I != IE; ++IE) + delete I->second; + BBNodeMap.clear(); for (Region::iterator RI = begin(), RE = end(); RI != RE; ++RI) (*RI)->clearNodeCache(); |