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(); }
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
Machine Check Debug Module
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Basic Block Representation.
A Module instance is used to store all the information related to an LLVM module.
std::reverse_iterator< iterator > reverse_iterator
BasicBlock * operator[](unsigned i) const
operator[]/getBlock - Return basic block N in the trace.
void dump() const
dump - Debugger convenience method; writes trace to standard error 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.
iterator erase(iterator q1, iterator q2)
const_iterator end() const
const_iterator begin() const
const_reverse_iterator rbegin() const
const_reverse_iterator rend() const
BasicBlock * getBlock(unsigned i) const
std::reverse_iterator< const_iterator > const_reverse_iterator
BasicBlock * getEntryBasicBlock() const
getEntryBasicBlock - Return the entry basic block (first block) of the trace.
Function * getFunction() const
getFunction - Return this trace's parent function.
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...
reverse_iterator rbegin()
bool contains(const BasicBlock *X) const
contains - Returns true if this trace contains the given basic block.
iterator erase(iterator q)
void print(raw_ostream &O) const
print - Write trace to output stream.
Module * getModule() const
getModule - Return this Module that contains this trace's parent function.
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...
This class implements an extremely fast bulk output stream that can only output to a stream.
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.