summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-12-23 15:02:35 +0000
committerDavide Italiano <davide@freebsd.org>2016-12-23 15:02:35 +0000
commitb9ff23a40240d03cec020bb4e366c789ac8ac664 (patch)
tree2153fa4f3cc5a4d290af8f3ca5d812babad552f6
parent89831421af27b23573033e24594d21b804de1a95 (diff)
downloadbcm5719-llvm-b9ff23a40240d03cec020bb4e366c789ac8ac664.tar.gz
bcm5719-llvm-b9ff23a40240d03cec020bb4e366c789ac8ac664.zip
[LICM] Plug a leak freeing the ASTs before clearing the map.
llvm-svn: 290433
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index bc2a9d1391b..c981a8ff96b 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -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 &LTAS : LICM.getLoopToAliasSetMap())
+ delete LTAS.second;
LICM.getLoopToAliasSetMap().clear();
return false;
}
OpenPOWER on IntegriCloud