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