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 | 93193f806378e06092820c099e437886c7309b94 (patch) | |
tree | bbdfa045f4638bb044937aeaaeab19611f65d534 /lib/Analysis/IntervalPartition.cpp | |
parent | 0f0fc3253dd44b5b6d617812d37591fa26a28599 (diff) | |
download | llvm-93193f806378e06092820c099e437886c7309b94.tar.gz llvm-93193f806378e06092820c099e437886c7309b94.tar.bz2 llvm-93193f806378e06092820c099e437886c7309b94.tar.xz |
Convert analyses to new pass structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1603 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IntervalPartition.cpp')
-rw-r--r-- | lib/Analysis/IntervalPartition.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp index fff8d224e2..f524d016f1 100644 --- a/lib/Analysis/IntervalPartition.cpp +++ b/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; } |