diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:10:56 +0000 | 
| commit | 044eb2f6afba375a914ac9d8024f8f5142bb912e (patch) | |
| tree | 1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /lib/Analysis/IntervalPartition.cpp | |
| parent | eb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff) | |
Notes
Diffstat (limited to 'lib/Analysis/IntervalPartition.cpp')
| -rw-r--r-- | lib/Analysis/IntervalPartition.cpp | 13 | 
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp index a4e56e0694bc..c777d91b67c6 100644 --- a/lib/Analysis/IntervalPartition.cpp +++ b/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]);  } -  | 
