9#ifndef LLVM_SANDBOXIR_BASICBLOCK_H
10#define LLVM_SANDBOXIR_BASICBLOCK_H
40 : BB(BB), It(It), Ctx(Ctx) {}
55 assert(Ctx ==
Other.Ctx &&
"BBIterators in different context!");
56 return It ==
Other.It;
76 buildBasicBlockFromLLVMIR(BB);
83 return From->getSubclassID() == Value::ClassID::Block;
89 auto *BB = cast<llvm::BasicBlock>(
Val);
92 std::reverse_iterator<iterator>
rbegin()
const {
93 return std::make_reverse_iterator(
end());
95 std::reverse_iterator<iterator>
rend()
const {
96 return std::make_reverse_iterator(
begin());
BlockVerifier::State From
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Basic Block Representation.
InstListType::iterator iterator
Instruction iterators...
This class implements an extremely fast bulk output stream that can only output to a stream.
Iterator for Instructions in a `BasicBlock.
BasicBlock * getNodeParent() const
\Returns the parent BB.
BBIterator & operator++()
BBIterator operator++(int)
bool operator!=(const BBIterator &Other) const
BBIterator operator--(int)
pointer get() const
\Returns the SBInstruction that corresponds to this iterator, or null if the instruction is not found...
reference operator*() const
std::bidirectional_iterator_tag iterator_category
BBIterator & operator--()
std::ptrdiff_t difference_type
BBIterator(llvm::BasicBlock *BB, llvm::BasicBlock::iterator It, Context *Ctx)
bool operator==(const BBIterator &Other) const
Contains a list of sandboxir::Instruction's.
std::reverse_iterator< iterator > rbegin() const
static bool classof(const Value *From)
For isa/dyn_cast.
Function * getParent() const
void verify() const final
Should crash if there is something wrong with the instruction.
Instruction & back() const
std::reverse_iterator< iterator > rend() const
Instruction * getTerminator() const
Instruction & front() const
Context & getContext() const
void dumpOS(raw_ostream &OS) const final
A sandboxir::User with operands, opcode and linked with previous/next instructions in an instruction ...
A SandboxIR Value has users. This is the base class.
llvm::Value * Val
The LLVM Value that corresponds to this SandboxIR Value.
Context & Ctx
All values point to the context.
@ BasicBlock
Various leaf nodes.