18 #ifndef LLVM_ANALYSIS_TRACE_H
19 #define LLVM_ANALYSIS_TRACE_H
31 typedef std::vector<BasicBlock *> BasicBlockListType;
32 BasicBlockListType BasicBlocks;
39 Trace(
const std::vector<BasicBlock *> &vBB) : BasicBlocks (vBB) {}
63 for (
unsigned i = 0, e = BasicBlocks.size(); i != e; ++i)
64 if (BasicBlocks[i] == X)
81 assert(B1Idx != -1 && B2Idx != -1 &&
"Block is not in the trace!");
82 return B1Idx <= B2Idx;
101 unsigned size()
const {
return BasicBlocks.size(); }
102 bool empty()
const {
return BasicBlocks.empty(); }
119 #endif // LLVM_ANALYSIS_TRACE_H
BasicBlock * operator[](unsigned i) const
operator[]/getBlock - Return basic block N in the trace.
A Module instance is used to store all the information related to an LLVM module. ...
std::reverse_iterator< const_iterator > const_reverse_iterator
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...
const_reverse_iterator rend() const
iterator erase(iterator q)
const_reverse_iterator rbegin() const
bool contains(const BasicBlock *X) const
contains - Returns true if this trace contains the given basic block.
iterator erase(iterator q1, iterator q2)
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 pa...
LLVM Basic Block Representation.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
std::reverse_iterator< iterator > reverse_iterator
void print(raw_ostream &O) const
print - Write trace to output stream.
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.
BasicBlock * getEntryBasicBlock() const
getEntryBasicBlock - Return the entry basic block (first block) of the trace.
reverse_iterator rbegin()
BasicBlock * getBlock(unsigned i) const
Function * getFunction() const
getFunction - Return this trace's parent function.
void dump() const
dump - Debugger convenience method; writes trace to standard error output stream. ...
Module * getModule() const
getModule - Return this Module that contains this trace's parent function.
BasicBlockListType::iterator iterator
const_iterator begin() const
This class implements an extremely fast bulk output stream that can only output to a stream...
const_iterator end() const
BasicBlockListType::const_iterator const_iterator