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
This commit is contained in:
Tobias Grosser 2010-10-13 00:07:59 +00:00
parent cd77686254
commit 67be08a2f1

View File

@ -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();