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 | e910b9d9cdc0e557f5877e43ed8ff3f3a476fd34 (patch) | |
tree | 911d0f4eec5b299d24080966a80372077a8e8948 /llvm/lib/Analysis/RegionInfo.cpp | |
parent | f9ca535495f5e2340f1664c4c5996059a3ce3408 (diff) | |
download | bcm5719-llvm-e910b9d9cdc0e557f5877e43ed8ff3f3a476fd34.tar.gz bcm5719-llvm-e910b9d9cdc0e557f5877e43ed8ff3f3a476fd34.zip |
RegionInfo: Free the RegionNodes in cache.
Contributed by: ether
llvm-svn: 116380
Diffstat (limited to 'llvm/lib/Analysis/RegionInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/RegionInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/RegionInfo.cpp b/llvm/lib/Analysis/RegionInfo.cpp index 95b78cd443d..6593f07ff3c 100644 --- a/llvm/lib/Analysis/RegionInfo.cpp +++ b/llvm/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(); |