[llvm-commits] [llvm] r55508 - in /llvm/trunk: include/llvm/Analysis/IntervalPartition.h lib/Analysis/IntervalPartition.cpp

Chris Lattner sabre at nondot.org
Thu Aug 28 15:56:53 PDT 2008


Author: lattner
Date: Thu Aug 28 17:56:53 2008
New Revision: 55508

URL: http://llvm.org/viewvc/llvm-project?rev=55508&view=rev
Log:
rename destroy -> releaseMemory to properly hook into passmgr.


Modified:
    llvm/trunk/include/llvm/Analysis/IntervalPartition.h
    llvm/trunk/lib/Analysis/IntervalPartition.cpp

Modified: llvm/trunk/include/llvm/Analysis/IntervalPartition.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/IntervalPartition.h?rev=55508&r1=55507&r2=55508&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/IntervalPartition.h (original)
+++ llvm/trunk/include/llvm/Analysis/IntervalPartition.h Thu Aug 28 17:56:53 2008
@@ -59,9 +59,6 @@
   //
   IntervalPartition(IntervalPartition &I, bool);
 
-  // Destructor - Free memory
-  ~IntervalPartition() { destroy(); }
-
   // print - Show contents in human readable format...
   virtual void print(std::ostream &O, const Module* = 0) const;
   void print(std::ostream *O, const Module* M = 0) const {
@@ -92,10 +89,10 @@
   // Interface to Intervals vector...
   const std::vector<Interval*> &getIntervals() const { return Intervals; }
 
-private:
-  // destroy - Reset state back to before function was analyzed
-  void destroy();
+  // releaseMemory - Reset state back to before function was analyzed
+  void releaseMemory();
 
+private:
   // addIntervalToPartition - Add an interval to the internal list of intervals,
   // and then add mappings from all of the basic blocks in the interval to the
   // interval itself (in the IntervalMap).

Modified: llvm/trunk/lib/Analysis/IntervalPartition.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IntervalPartition.cpp?rev=55508&r1=55507&r2=55508&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/IntervalPartition.cpp (original)
+++ llvm/trunk/lib/Analysis/IntervalPartition.cpp Thu Aug 28 17:56:53 2008
@@ -23,8 +23,8 @@
 // IntervalPartition Implementation
 //===----------------------------------------------------------------------===//
 
-// destroy - Reset state back to before function was analyzed
-void IntervalPartition::destroy() {
+// releaseMemory - Reset state back to before function was analyzed
+void IntervalPartition::releaseMemory() {
   for (unsigned i = 0, e = Intervals.size(); i != e; ++i)
     delete Intervals[i];
   IntervalMap.clear();





More information about the llvm-commits mailing list