LLVM API Documentation

Public Types | Public Member Functions | Public Attributes
llvm::Interval Class Reference

#include <Interval.h>

Collaboration diagram for llvm::Interval:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector
< BasicBlock * >::iterator 
succ_iterator
typedef std::vector
< BasicBlock * >::iterator 
pred_iterator
typedef std::vector
< BasicBlock * >::iterator 
node_iterator

Public Member Functions

 Interval (BasicBlock *Header)
BasicBlockgetHeaderNode () const
bool contains (BasicBlock *BB) const
 contains - Find out if a basic block is in this interval
bool isSuccessor (BasicBlock *BB) const
 isSuccessor - find out if a basic block is a successor of this Interval
bool operator== (const Interval &I) const
bool isLoop () const
 isLoop - Find out if there is a back edge in this interval...
void print (raw_ostream &O) const
 print - Show contents in human readable format...

Public Attributes

std::vector< BasicBlock * > Nodes
std::vector< BasicBlock * > Successors
std::vector< BasicBlock * > Predecessors

Detailed Description

Interval Class - An Interval is a set of nodes defined such that every node in the interval has all of its predecessors in the interval (except for the header)

Definition at line 37 of file Interval.h.


Member Typedef Documentation

typedef std::vector<BasicBlock*>::iterator llvm::Interval::node_iterator

Definition at line 45 of file Interval.h.

typedef std::vector<BasicBlock*>::iterator llvm::Interval::pred_iterator

Definition at line 44 of file Interval.h.

typedef std::vector<BasicBlock*>::iterator llvm::Interval::succ_iterator

Definition at line 43 of file Interval.h.


Constructor & Destructor Documentation

llvm::Interval::Interval ( BasicBlock Header) [inline]

Definition at line 47 of file Interval.h.

References Nodes.


Member Function Documentation

bool llvm::Interval::contains ( BasicBlock BB) const [inline]

contains - Find out if a basic block is in this interval

Definition at line 69 of file Interval.h.

References Nodes.

Referenced by isLoop().

Definition at line 51 of file Interval.h.

Referenced by llvm::getNodeHeader().

isLoop - Find out if there is a back edge in this interval...

Definition at line 29 of file Interval.cpp.

References contains(), I, llvm::pred_begin(), and llvm::pred_end().

bool llvm::Interval::isSuccessor ( BasicBlock BB) const [inline]

isSuccessor - find out if a basic block is a successor of this Interval

Definition at line 78 of file Interval.h.

References Successors.

bool llvm::Interval::operator== ( const Interval I) const [inline]

Equality operator. It is only valid to compare two intervals from the same partition, because of this, all we have to check is the header node for equality.

Definition at line 90 of file Interval.h.

void Interval::print ( raw_ostream O) const

print - Show contents in human readable format...

Definition at line 40 of file Interval.cpp.

References I, Nodes, Predecessors, and Successors.


Member Data Documentation

Nodes - The basic blocks in this interval.

Definition at line 55 of file Interval.h.

Referenced by llvm::addNodeToInterval(), contains(), Interval(), and print().

Predecessors - List of BasicBlocks that have this Interval's header block as one of their successors.

Definition at line 66 of file Interval.h.

Referenced by llvm::pred_begin(), llvm::pred_end(), and print().

Successors - List of BasicBlocks that are reachable directly from nodes in this interval, but are not in the interval themselves. These nodes necessarily must be header nodes for other intervals.

Definition at line 61 of file Interval.h.

Referenced by isSuccessor(), print(), llvm::succ_begin(), and llvm::succ_end().


The documentation for this class was generated from the following files: