LLVM  6.0.0svn
Public Types | Public Member Functions | List of all members
llvm::Trace Class Reference

#include "llvm/Analysis/Trace.h"

Public Types

using iterator = BasicBlockListType::iterator
 
using const_iterator = BasicBlockListType::const_iterator
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 

Public Member Functions

 Trace (const std::vector< BasicBlock *> &vBB)
 Trace ctor - Make a new trace from a vector of basic blocks, residing in the function which is the parent of the first basic block in the vector. More...
 
BasicBlockgetEntryBasicBlock () const
 getEntryBasicBlock - Return the entry basic block (first block) of the trace. More...
 
BasicBlockoperator[] (unsigned i) const
 operator[]/getBlock - Return basic block N in the trace. More...
 
BasicBlockgetBlock (unsigned i) const
 
FunctiongetFunction () const
 getFunction - Return this trace's parent function. More...
 
ModulegetModule () const
 getModule - Return this Module that contains this trace's parent function. More...
 
int getBlockIndex (const BasicBlock *X) const
 getBlockIndex - Return the index of the specified basic block in the trace, or -1 if it is not in the trace. More...
 
bool contains (const BasicBlock *X) const
 contains - Returns true if this trace contains the given basic block. More...
 
bool dominates (const BasicBlock *B1, const BasicBlock *B2) const
 Returns true if B1 occurs before B2 in the trace, or if it is the same block as B2. More...
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
unsigned size () const
 
bool empty () const
 
iterator erase (iterator q)
 
iterator erase (iterator q1, iterator q2)
 
void print (raw_ostream &O) const
 print - Write trace to output stream. More...
 
void dump () const
 dump - Debugger convenience method; writes trace to standard error output stream. More...
 

Detailed Description

Definition at line 31 of file Trace.h.

Member Typedef Documentation

◆ const_iterator

using llvm::Trace::const_iterator = BasicBlockListType::const_iterator

Definition at line 82 of file Trace.h.

◆ const_reverse_iterator

using llvm::Trace::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 84 of file Trace.h.

◆ iterator

using llvm::Trace::iterator = BasicBlockListType::iterator

Definition at line 81 of file Trace.h.

◆ reverse_iterator

using llvm::Trace::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 83 of file Trace.h.

Constructor & Destructor Documentation

◆ Trace()

llvm::Trace::Trace ( const std::vector< BasicBlock *> &  vBB)
inline

Trace ctor - Make a new trace from a vector of basic blocks, residing in the function which is the parent of the first basic block in the vector.

Definition at line 40 of file Trace.h.

Member Function Documentation

◆ begin() [1/2]

iterator llvm::Trace::begin ( )
inline

Definition at line 86 of file Trace.h.

Referenced by print().

◆ begin() [2/2]

const_iterator llvm::Trace::begin ( ) const
inline

Definition at line 87 of file Trace.h.

◆ contains()

bool llvm::Trace::contains ( const BasicBlock X) const
inline

contains - Returns true if this trace contains the given basic block.

Definition at line 68 of file Trace.h.

References getBlockIndex().

◆ dominates()

bool llvm::Trace::dominates ( const BasicBlock B1,
const BasicBlock B2 
) const
inline

Returns true if B1 occurs before B2 in the trace, or if it is the same block as B2.

. Both blocks must be in the trace.

Definition at line 74 of file Trace.h.

References assert(), and getBlockIndex().

◆ dump()

LLVM_DUMP_METHOD void Trace::dump ( ) const

dump - Debugger convenience method; writes trace to standard error output stream.

Definition at line 50 of file Trace.cpp.

References llvm::dbgs(), and print().

Referenced by erase().

◆ empty()

bool llvm::Trace::empty ( ) const
inline

Definition at line 97 of file Trace.h.

◆ end() [1/2]

iterator llvm::Trace::end ( )
inline

Definition at line 88 of file Trace.h.

Referenced by print().

◆ end() [2/2]

const_iterator llvm::Trace::end ( ) const
inline

Definition at line 89 of file Trace.h.

◆ erase() [1/2]

iterator llvm::Trace::erase ( iterator  q)
inline

Definition at line 99 of file Trace.h.

◆ erase() [2/2]

iterator llvm::Trace::erase ( iterator  q1,
iterator  q2 
)
inline

Definition at line 100 of file Trace.h.

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

◆ getBlock()

BasicBlock* llvm::Trace::getBlock ( unsigned  i) const
inline

Definition at line 48 of file Trace.h.

References getFunction(), and getModule().

◆ getBlockIndex()

int llvm::Trace::getBlockIndex ( const BasicBlock X) const
inline

getBlockIndex - Return the index of the specified basic block in the trace, or -1 if it is not in the trace.

Definition at line 59 of file Trace.h.

Referenced by contains(), and dominates().

◆ getEntryBasicBlock()

BasicBlock* llvm::Trace::getEntryBasicBlock ( ) const
inline

getEntryBasicBlock - Return the entry basic block (first block) of the trace.

Definition at line 44 of file Trace.h.

Referenced by getFunction().

◆ getFunction()

Function * Trace::getFunction ( ) const

getFunction - Return this trace's parent function.

Definition at line 27 of file Trace.cpp.

References getEntryBasicBlock(), and llvm::BasicBlock::getParent().

Referenced by getBlock(), getModule(), and print().

◆ getModule()

Module * Trace::getModule ( ) const

getModule - Return this Module that contains this trace's parent function.

Definition at line 31 of file Trace.cpp.

References getFunction(), and llvm::GlobalValue::getParent().

Referenced by getBlock(), and print().

◆ operator[]()

BasicBlock* llvm::Trace::operator[] ( unsigned  i) const
inline

operator[]/getBlock - Return basic block N in the trace.

Definition at line 47 of file Trace.h.

◆ print()

void Trace::print ( raw_ostream O) const

print - Write trace to output stream.

Definition at line 36 of file Trace.cpp.

References begin(), end(), F(), getFunction(), getModule(), and llvm::Value::getName().

Referenced by dump(), and erase().

◆ rbegin() [1/2]

reverse_iterator llvm::Trace::rbegin ( )
inline

Definition at line 91 of file Trace.h.

◆ rbegin() [2/2]

const_reverse_iterator llvm::Trace::rbegin ( ) const
inline

Definition at line 92 of file Trace.h.

◆ rend() [1/2]

reverse_iterator llvm::Trace::rend ( )
inline

Definition at line 93 of file Trace.h.

◆ rend() [2/2]

const_reverse_iterator llvm::Trace::rend ( ) const
inline

Definition at line 94 of file Trace.h.

◆ size()

unsigned llvm::Trace::size ( ) const
inline

Definition at line 96 of file Trace.h.


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