Go to the documentation of this file.
17 #ifndef LLVM_ANALYSIS_TRACE_H
18 #define LLVM_ANALYSIS_TRACE_H
31 using BasicBlockListType = std::vector<BasicBlock *>;
33 BasicBlockListType BasicBlocks;
39 Trace(
const std::vector<BasicBlock *> &vBB) : BasicBlocks (vBB) {}
59 for (
unsigned i = 0,
e = BasicBlocks.size();
i !=
e; ++
i)
60 if (BasicBlocks[
i] ==
X)
75 assert(B1Idx != -1 && B2Idx != -1 &&
"Block is not in the trace!");
76 return B1Idx <= B2Idx;
95 unsigned size()
const {
return BasicBlocks.size(); }
96 bool empty()
const {
return BasicBlocks.empty(); }
111 #endif // LLVM_ANALYSIS_TRACE_H
Module * getModule() const
getModule - Return this Module that contains this trace's parent function.
This is an optimization pass for GlobalISel generic memory operations.
BasicBlockListType::const_iterator const_iterator
std::reverse_iterator< iterator > reverse_iterator
const_reverse_iterator rend() const
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...
void dump() const
dump - Debugger convenience method; writes trace to standard error output stream.
LLVM Basic Block Representation.
iterator erase(iterator q1, iterator q2)
Function * getFunction() const
getFunction - Return this trace's parent function.
reverse_iterator rbegin()
const_iterator begin() const
bool contains(const BasicBlock *X) const
contains - Returns true if this trace contains the given basic block.
This class implements an extremely fast bulk output stream that can only output to a stream.
BasicBlockListType::iterator iterator
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
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.
void print(raw_ostream &O) const
print - Write trace to output stream.
BasicBlock * getEntryBasicBlock() const
getEntryBasicBlock - Return the entry basic block (first block) of the trace.
typename SuperClass::const_iterator const_iterator
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
@ BasicBlock
Various leaf nodes.
A Module instance is used to store all the information related to an LLVM module.
Machine Check Debug Module
iterator erase(iterator q)
BasicBlock * getBlock(unsigned i) const
const_reverse_iterator rbegin() const
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...
typename SuperClass::iterator iterator
const_iterator end() const
BasicBlock * operator[](unsigned i) const
operator[]/getBlock - Return basic block N in the trace.