[llvm-commits] [llvm] r116380 - /llvm/trunk/lib/Analysis/RegionInfo.cpp

Tobias Grosser grosser at fim.uni-passau.de
Tue Oct 12 17:07:59 PDT 2010


Author: grosser
Date: Tue Oct 12 19:07:59 2010
New Revision: 116380

URL: http://llvm.org/viewvc/llvm-project?rev=116380&view=rev
Log:
RegionInfo: Free the RegionNodes in cache.

Contributed by: ether

Modified:
    llvm/trunk/lib/Analysis/RegionInfo.cpp

Modified: llvm/trunk/lib/Analysis/RegionInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/RegionInfo.cpp?rev=116380&r1=116379&r2=116380&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/RegionInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/RegionInfo.cpp Tue Oct 12 19:07:59 2010
@@ -376,6 +376,11 @@
 }
 
 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();





More information about the llvm-commits mailing list