Fix: test/Regression/LLC/badidx.c problem
[oota-llvm.git] / lib / Transforms / Scalar / CorrelatedExprs.cpp
index 9ac8a4a8939c650e598e82f62b1d964e1992d5cc..6d26ffd861918fedd5be4eeaf9a954ab0a2934ba 100644 (file)
@@ -212,11 +212,6 @@ namespace {
     // 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 @@ bool CEE::runOnFunction(Function &F) {
   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