Minor simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3619 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/CorrelatedExprs.cpp b/lib/Transforms/Scalar/CorrelatedExprs.cpp
index 9ac8a4a..6d26ffd 100644
--- a/lib/Transforms/Scalar/CorrelatedExprs.cpp
+++ b/lib/Transforms/Scalar/CorrelatedExprs.cpp
@@ -212,11 +212,6 @@
// information.
virtual void print(std::ostream &O, const Module *M) const;
- virtual void releaseMemory() {
- RegionInfoMap.clear();
- RankMap.clear();
- }
-
private:
RegionInfo &getRegionInfo(BasicBlock *BB) {
std::map<BasicBlock*, RegionInfo>::iterator I
@@ -272,7 +267,11 @@
DT = &getAnalysis<DominatorTree>();
std::set<BasicBlock*> VisitedBlocks;
- return TransformRegion(&F.getEntryNode(), VisitedBlocks);
+ bool Changed = TransformRegion(&F.getEntryNode(), VisitedBlocks);
+
+ RegionInfoMap.clear();
+ RankMap.clear();
+ return Changed;
}
// TransformRegion - Transform the region starting with BB according to the