[llvm-commits] [llvm] r44320 - in /llvm/trunk: include/llvm/Analysis/AliasSetTracker.h lib/Transforms/Scalar/LICM.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sun Nov 25 15:52:03 PST 2007
Author: asl
Date: Sun Nov 25 17:52:02 2007
New Revision: 44320
URL: http://llvm.org/viewvc/llvm-project?rev=44320&view=rev
Log:
Remove another leak. Due to some reason AliasSetTracker didn't had any dtor...
Modified:
llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
Modified: llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasSetTracker.h?rev=44320&r1=44319&r2=44320&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/AliasSetTracker.h (original)
+++ llvm/trunk/include/llvm/Analysis/AliasSetTracker.h Sun Nov 25 17:52:02 2007
@@ -263,6 +263,7 @@
/// the specified alias analysis object to disambiguate load and store
/// addresses.
explicit AliasSetTracker(AliasAnalysis &aa) : AA(aa) {}
+ ~AliasSetTracker() { clear(); }
/// add methods - These methods are used to add different types of
/// instructions to the alias sets. Adding a new instruction can result in
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=44320&r1=44319&r2=44320&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Sun Nov 25 17:52:02 2007
@@ -84,6 +84,11 @@
}
bool doFinalization() {
+ // Free the values stored in the map
+ for (std::map<Loop *, AliasSetTracker *>::iterator
+ I = LoopToAliasMap.begin(), E = LoopToAliasMap.end(); I != E; ++I)
+ delete I->second;
+
LoopToAliasMap.clear();
return false;
}
More information about the llvm-commits
mailing list