[llvm] r290433 - [LICM] Plug a leak freeing the ASTs before clearing the map.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 23 07:02:36 PST 2016
Author: davide
Date: Fri Dec 23 09:02:35 2016
New Revision: 290433
URL: http://llvm.org/viewvc/llvm-project?rev=290433&view=rev
Log:
[LICM] Plug a leak freeing the ASTs before clearing the map.
Modified:
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=290433&r1=290432&r2=290433&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Fri Dec 23 09:02:35 2016
@@ -128,6 +128,8 @@ struct LegacyLICMPass : public LoopPass
// If we have run LICM on a previous loop but now we are skipping
// (because we've hit the opt-bisect limit), we need to clear the
// loop alias information.
+ for (auto <AS : LICM.getLoopToAliasSetMap())
+ delete LTAS.second;
LICM.getLoopToAliasSetMap().clear();
return false;
}
More information about the llvm-commits
mailing list