diff options
Diffstat (limited to 'llvm/lib/Analysis/IntervalPartition.cpp')
-rw-r--r-- | llvm/lib/Analysis/IntervalPartition.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/IntervalPartition.cpp b/llvm/lib/Analysis/IntervalPartition.cpp index a4e56e0694b..c777d91b67c 100644 --- a/llvm/lib/Analysis/IntervalPartition.cpp +++ b/llvm/lib/Analysis/IntervalPartition.cpp @@ -12,10 +12,17 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Analysis/IntervalPartition.h" +#include "llvm/Analysis/Interval.h" #include "llvm/Analysis/IntervalIterator.h" +#include "llvm/Pass.h" +#include <cassert> +#include <utility> + using namespace llvm; char IntervalPartition::ID = 0; + INITIALIZE_PASS(IntervalPartition, "intervals", "Interval Partition Construction", true, true) @@ -40,7 +47,6 @@ void IntervalPartition::print(raw_ostream &O, const Module*) const { // 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). -// void IntervalPartition::addIntervalToPartition(Interval *I) { Intervals.push_back(I); @@ -54,7 +60,6 @@ void IntervalPartition::addIntervalToPartition(Interval *I) { // the interval data structures. After interval generation is complete, // run through all of the intervals and propagate successor info as // predecessor info. -// void IntervalPartition::updatePredecessors(Interval *Int) { BasicBlock *Header = Int->getHeaderNode(); for (BasicBlock *Successor : Int->Successors) @@ -63,7 +68,6 @@ void IntervalPartition::updatePredecessors(Interval *Int) { // IntervalPartition ctor - Build the first level interval partition for the // specified function... -// bool IntervalPartition::runOnFunction(Function &F) { // Pass false to intervals_begin because we take ownership of it's memory function_interval_iterator I = intervals_begin(&F, false); @@ -84,11 +88,9 @@ bool IntervalPartition::runOnFunction(Function &F) { return false; } - // IntervalPartition ctor - Build a reduced interval partition from an // existing interval graph. This takes an additional boolean parameter to // distinguish it from a copy constructor. Always pass in false for now. -// IntervalPartition::IntervalPartition(IntervalPartition &IP, bool) : FunctionPass(ID) { assert(IP.getRootInterval() && "Cannot operate on empty IntervalPartitions!"); @@ -110,4 +112,3 @@ IntervalPartition::IntervalPartition(IntervalPartition &IP, bool) for (unsigned i = 0, e = Intervals.size(); i != e; ++i) updatePredecessors(Intervals[i]); } - |