LLVM  8.0.1
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::Interval Class Reference

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) More...

#include "llvm/Analysis/Interval.h"

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

Public Types

using succ_iterator = std::vector< BasicBlock * >::iterator
 
using pred_iterator = std::vector< BasicBlock * >::iterator
 
using node_iterator = std::vector< BasicBlock * >::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 More...
 
bool isSuccessor (BasicBlock *BB) const
 isSuccessor - find out if a basic block is a successor of this Interval More...
 
bool operator== (const Interval &I) const
 Equality operator. More...
 
bool isLoop () const
 isLoop - Find out if there is a back edge in this interval... More...
 
void print (raw_ostream &O) const
 print - Show contents in human readable format... More...
 

Public Attributes

std::vector< BasicBlock * > Nodes
 Nodes - The basic blocks in this interval. More...
 
std::vector< BasicBlock * > Successors
 Successors - List of BasicBlocks that are reachable directly from nodes in this interval, but are not in the interval themselves. More...
 
std::vector< BasicBlock * > Predecessors
 Predecessors - List of BasicBlocks that have this Interval's header block as one of their successors. More...
 

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

◆ node_iterator

using llvm::Interval::node_iterator = std::vector<BasicBlock*>::iterator

Definition at line 46 of file Interval.h.

◆ pred_iterator

using llvm::Interval::pred_iterator = std::vector<BasicBlock*>::iterator

Definition at line 45 of file Interval.h.

◆ succ_iterator

using llvm::Interval::succ_iterator = std::vector<BasicBlock*>::iterator

Definition at line 44 of file Interval.h.

Constructor & Destructor Documentation

◆ Interval()

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

Definition at line 48 of file Interval.h.

References Nodes.

Member Function Documentation

◆ contains()

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

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

Definition at line 67 of file Interval.h.

Referenced by isLoop().

◆ getHeaderNode()

BasicBlock* llvm::Interval::getHeaderNode ( ) const
inline

Definition at line 52 of file Interval.h.

Referenced by llvm::getNodeHeader().

◆ isLoop()

bool Interval::isLoop ( ) const

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

Definition at line 27 of file Interval.cpp.

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

Referenced by operator==().

◆ isSuccessor()

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

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

Definition at line 77 of file Interval.h.

References llvm::Successor.

◆ operator==()

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 89 of file Interval.h.

References isLoop(), llvm::RISCVFenceField::O, and print().

◆ print()

void Interval::print ( raw_ostream O) const

print - Show contents in human readable format...

Definition at line 37 of file Interval.cpp.

Referenced by operator==().

Member Data Documentation

◆ Nodes

std::vector<BasicBlock*> llvm::Interval::Nodes

Nodes - The basic blocks in this interval.

Definition at line 55 of file Interval.h.

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

◆ Predecessors

std::vector<BasicBlock*> llvm::Interval::Predecessors

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

Definition at line 64 of file Interval.h.

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

◆ Successors

std::vector<BasicBlock*> llvm::Interval::Successors

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 60 of file Interval.h.

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


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