diff options
author | Chris Lattner <sabre@nondot.org> | 2002-01-31 00:42:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-01-31 00:42:27 +0000 |
commit | ccf571a408aacb589304f59c544fcdd75b7009ba (patch) | |
tree | ce23312c0aba1c1eb0c0b8e43621818d75831d5b /llvm/lib/Analysis/IntervalPartition.cpp | |
parent | 979d11db1492908774b84493ffba47f9e1848973 (diff) | |
download | bcm5719-llvm-ccf571a408aacb589304f59c544fcdd75b7009ba.tar.gz bcm5719-llvm-ccf571a408aacb589304f59c544fcdd75b7009ba.zip |
Convert analyses to new pass structure
llvm-svn: 1603
Diffstat (limited to 'llvm/lib/Analysis/IntervalPartition.cpp')
-rw-r--r-- | llvm/lib/Analysis/IntervalPartition.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/IntervalPartition.cpp b/llvm/lib/Analysis/IntervalPartition.cpp index fff8d224e21..f524d016f16 100644 --- a/llvm/lib/Analysis/IntervalPartition.cpp +++ b/llvm/lib/Analysis/IntervalPartition.cpp @@ -11,13 +11,17 @@ using namespace cfg; using std::make_pair; +AnalysisID IntervalPartition::ID(AnalysisID::create<IntervalPartition>()); + //===----------------------------------------------------------------------===// // IntervalPartition Implementation //===----------------------------------------------------------------------===// -// Destructor - Free memory -IntervalPartition::~IntervalPartition() { +// destroy - Reset state back to before method was analyzed +void IntervalPartition::destroy() { for_each(begin(), end(), deleter<cfg::Interval>); + IntervalMap.clear(); + RootInterval = 0; } // addIntervalToPartition - Add an interval to the internal list of intervals, @@ -48,7 +52,7 @@ void IntervalPartition::updatePredecessors(cfg::Interval *Int) { // IntervalPartition ctor - Build the first level interval partition for the // specified method... // -IntervalPartition::IntervalPartition(Method *M) { +bool IntervalPartition::runOnMethod(Method *M) { assert(M->front() && "Cannot operate on prototypes!"); // Pass false to intervals_begin because we take ownership of it's memory @@ -67,6 +71,7 @@ IntervalPartition::IntervalPartition(Method *M) { // predecessors for each block... for_each(begin(), end(), bind_obj(this, &IntervalPartition::updatePredecessors)); + return false; } |