Joos1W Compiler Framework
|
Public Types | |
using | iterator = iterator_impl< BasicBlock * > |
The iterator class for instructions in a basic block allows us to express points before the first instruction and after the last instruction. Otherwise, a pointer to the current instruction would be sufficient. More... | |
using | const_iterator = iterator_impl< const BasicBlock * > |
Public Member Functions | |
auto * | parent () const |
auto | begin () |
auto | end () |
auto | begin () const |
auto | end () const |
void | appendAfterEnd (Instruction *instr) |
void | insertBeforeBegin (Instruction *instr) |
std::ostream & | print (std::ostream &os) const override |
auto * | terminator () const |
void | erase (Instruction *instr) |
void | eraseFromParent () |
int | printDotNode (utils::DotPrinter &) const |
utils::Generator< BasicBlock * > | successors () const |
utils::Generator< BasicBlock * > | predecessors () const |
![]() | |
Value (Context &ctx, Type *type) | |
tir::Context & | ctx () |
auto | users () |
auto | users () const |
Type * | type () const |
void | addUser (User *user) |
void | removeUser (User *user) |
std::string_view | name () const |
auto | nameOpt () const |
void | replaceAllUsesWith (Value *newValue) |
void | setName (std::string_view name) |
std::ostream & | printName (std::ostream &os) const |
void | dump () const |
Static Public Member Functions | |
static BasicBlock * | Create (Context &ctx, Function *parent) |
Friends | |
class | Instruction |
Definition at line 12 of file BasicBlock.h.
using tir::BasicBlock::iterator = iterator_impl<BasicBlock*> |
The iterator class for instructions in a basic block allows us to express points before the first instruction and after the last instruction. Otherwise, a pointer to the current instruction would be sufficient.
Two iterators are equal iff they express the same point in the BB, which means they must also be necessarily in the same BB.
The increment and decrement moves to the previous and next iterators. The minimum iterator is therefore the one before the first instruction, and the maximum iterator is the one after the last instruction.
Definition at line 91 of file BasicBlock.h.