41template <
class Ptr,
class USE_iterator>
58 assert(Inst->isTerminator() &&
"BasicBlock used in non-terminator");
77 assert(!
It.atEnd() &&
"pred_iterator out of range!");
83 assert(!
It.atEnd() &&
"pred_iterator out of range!");
89 Self tmp = *
this; ++*
this;
return tmp;
95 return It.getOperandNo();
144 return I->successors().begin();
147 return I->successors().begin();
151 return I->successors().end();
161 return I->successors();
208 "GraphTraits getNumber() not detected");
223 "GraphTraits getNumber() not detected");
242 "GraphTraits getNumber() not detected");
256 "GraphTraits getNumber() not detected");
283 return F->getMaxBlockNumber();
286 return F->getBlockNumberEpoch();
307 return F->getMaxBlockNumber();
310 return F->getBlockNumberEpoch();
322 return &
G.Graph->getEntryBlock();
326 return F->getMaxBlockNumber();
329 return F->getBlockNumberEpoch();
335 return &
G.Graph->getEntryBlock();
339 return F->getMaxBlockNumber();
342 return F->getBlockNumberEpoch();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the little GraphTraits<X> template class that should be specialized by classes that...
LLVM Basic Block Representation.
unsigned getNumber() const
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
bool operator==(const Self &x) const
void advancePastNonTerminators()
PredIterator(Ptr *bb, bool)
bool operator!=(const Self &x) const
std::forward_iterator_tag iterator_category
reference operator*() const
PredIterator< Ptr, USE_iterator > Self
std::ptrdiff_t difference_type
pointer * operator->() const
unsigned getOperandNo() const
getOperandNo - Return the operand number in the predecessor's terminator of the successor.
Use & getUse() const
getUse - Return the operand Use in the predecessor's terminator of the successor.
A Use represents the edge between a Value definition and its users.
A range adaptor for a pair of iterators.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
This is an optimization pass for GlobalISel generic memory operations.
bool succ_empty(const Instruction *I)
iterator_range< pred_iterator > pred_range
iterator_range< succ_iterator > succ_range
auto pred_end(const MachineBasicBlock *BB)
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
auto successors(const MachineBasicBlock *BB)
constexpr bool GraphHasNodeNumbers
Indicate whether a GraphTraits<NodeT>::getNumber() is supported.
iterator_range< const_pred_iterator > const_pred_range
auto pred_size(const MachineBasicBlock *BB)
PredIterator< const BasicBlock, Value::const_user_iterator > const_pred_iterator
auto succ_size(const MachineBasicBlock *BB)
RNSuccIterator< NodeRef, BlockT, RegionT > succ_begin(NodeRef Node)
RNSuccIterator< NodeRef, BlockT, RegionT > succ_end(NodeRef Node)
Instruction::succ_iterator succ_iterator
PredIterator< BasicBlock, Value::user_iterator > pred_iterator
auto pred_begin(const MachineBasicBlock *BB)
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
auto predecessors(const MachineBasicBlock *BB)
Instruction::const_succ_iterator const_succ_iterator
bool pred_empty(const BasicBlock *BB)
iterator_range< const_succ_iterator > const_succ_range
static NodeRef getEntryNode(BasicBlock *BB)
succ_iterator ChildIteratorType
static ChildIteratorType child_begin(NodeRef N)
static unsigned getNumber(const BasicBlock *BB)
static ChildIteratorType child_end(NodeRef N)
static unsigned getMaxNumber(const Function *F)
static nodes_iterator nodes_begin(Function *F)
static unsigned getNumberEpoch(const Function *F)
static nodes_iterator nodes_end(Function *F)
static size_t size(Function *F)
static NodeRef getEntryNode(Function *F)
pointer_iterator< Function::iterator > nodes_iterator
static ChildIteratorType child_begin(NodeRef N)
static unsigned getNumber(const BasicBlock *BB)
static ChildIteratorType child_end(NodeRef N)
pred_iterator ChildIteratorType
static NodeRef getEntryNode(Inverse< BasicBlock * > G)
static unsigned getNumberEpoch(const Function *F)
static unsigned getMaxNumber(const Function *F)
static NodeRef getEntryNode(Inverse< Function * > G)
static ChildIteratorType child_end(NodeRef N)
const_pred_iterator ChildIteratorType
const BasicBlock * NodeRef
static NodeRef getEntryNode(Inverse< const BasicBlock * > G)
static ChildIteratorType child_begin(NodeRef N)
static unsigned getNumber(const BasicBlock *BB)
static unsigned getMaxNumber(const Function *F)
static NodeRef getEntryNode(Inverse< const Function * > G)
static unsigned getNumberEpoch(const Function *F)
const BasicBlock * NodeRef
static ChildIteratorType child_begin(NodeRef N)
static unsigned getNumber(const BasicBlock *BB)
static NodeRef getEntryNode(const BasicBlock *BB)
const_succ_iterator ChildIteratorType
static ChildIteratorType child_end(NodeRef N)
static size_t size(const Function *F)
static nodes_iterator nodes_begin(const Function *F)
static NodeRef getEntryNode(const Function *F)
static unsigned getNumberEpoch(const Function *F)
static unsigned getMaxNumber(const Function *F)
static nodes_iterator nodes_end(const Function *F)
pointer_iterator< Function::const_iterator > nodes_iterator
typename Function *::UnknownGraphTypeError NodeRef
The const version of succ_iterator.
Iterator type that casts an operand to a basic block.