summaryrefslogtreecommitdiff
path: root/lib/Analysis/IntervalPartition.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-31 00:42:27 +0000
committerChris Lattner <sabre@nondot.org>2002-01-31 00:42:27 +0000
commit93193f806378e06092820c099e437886c7309b94 (patch)
treebbdfa045f4638bb044937aeaaeab19611f65d534 /lib/Analysis/IntervalPartition.cpp
parent0f0fc3253dd44b5b6d617812d37591fa26a28599 (diff)
downloadllvm-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.cpp11
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;
}