20 "Interval Partition Construction",
true,
true)
28 for (
unsigned i = 0, e =
Intervals.size(); i != e; ++i)
32 RootInterval =
nullptr;
36 for(
unsigned i = 0, e = Intervals.size(); i != e; ++i)
37 Intervals[i]->
print(O);
44 void IntervalPartition::addIntervalToPartition(
Interval *
I) {
45 Intervals.push_back(I);
58 void IntervalPartition::updatePredecessors(
Interval *Int) {
71 assert(I !=
intervals_end(&F) &&
"No intervals in function!?!?!");
73 addIntervalToPartition(RootInterval = *I);
79 addIntervalToPartition(*I);
83 for (
unsigned i = 0, e = Intervals.size(); i != e; ++i)
84 updatePredecessors(Intervals[i]);
95 assert(IP.
getRootInterval() &&
"Cannot operate on empty IntervalPartitions!");
99 assert(I !=
intervals_end(IP) &&
"No intervals in interval partition!?!?!");
101 addIntervalToPartition(RootInterval = *I);
107 addIntervalToPartition(*I);
111 for (
unsigned i = 0, e = Intervals.size(); i != e; ++i)
112 updatePredecessors(Intervals[i]);
function_interval_iterator intervals_end(Function *)
A Module instance is used to store all the information related to an LLVM module. ...
Interval Class - An Interval is a set of nodes defined such that every node in the interval has all o...
std::vector< BasicBlock * >::iterator node_iterator
function_interval_iterator intervals_begin(Function *F, bool DeleteInts=true)
void clear()
clear - Remove all entries.
void print(raw_ostream &O, const Module *=nullptr) const override
print - Print out the internal state of the pass.
LLVM Basic Block Representation.
bool runOnFunction(Function &F) override
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass...
FunctionPass class - This class is used to implement most global optimizations.
std::vector< BasicBlock * > Nodes
Nodes - The basic blocks in this interval.
INITIALIZE_PASS(IntervalPartition,"intervals","Interval Partition Construction", true, true) void IntervalPartition
void insert(KeyT a, KeyT b, ValT y)
insert - Add a mapping of [a;b] to y, coalesce with adjacent intervals.
std::vector< BasicBlock * > Predecessors
Predecessors - List of BasicBlocks that have this Interval's header block as one of their successors...
Interval * getRootInterval()
BasicBlock * getHeaderNode() const
std::vector< BasicBlock * > Successors
Successors - List of BasicBlocks that are reachable directly from nodes in this interval, but are not in the interval themselves.
std::vector< BasicBlock * >::iterator succ_iterator
This class implements an extremely fast bulk output stream that can only output to a stream...
Interval * getBlockInterval(BasicBlock *BB)