Lines Matching refs:Block
1 //===- Block.cpp - MLIR Block Class ---------------------------------------===//
9 #include "mlir/IR/Block.h"
19 // Block
22 Block::~Block() {
29 Region *Block::getParent() const { return parentValidOpOrderPair.getPointer(); }
33 Operation *Block::getParentOp() {
38 bool Block::isEntryBlock() { return this == &getParent()->front(); }
42 void Block::insertBefore(Block *block) {
48 void Block::insertAfter(Block *block) {
56 void Block::moveBefore(Block *block) {
63 void Block::moveBefore(Region *region, llvm::iplist<Block>::iterator iterator) {
67 /// Unlink this Block from its parent Region and delete it.
68 void Block::erase() {
69 assert(getParent() && "Block has no parent");
76 Operation *Block::findAncestorOpInBlock(Operation &op) {
91 void Block::dropAllReferences() {
96 void Block::dropAllDefinedValueUses() {
106 bool Block::isOpOrderValid() { return parentValidOpOrderPair.getInt(); }
109 void Block::invalidateOpOrder() {
117 bool Block::verifyOpOrder() {
138 void Block::recomputeOpOrder() {
151 auto Block::getArgumentTypes() -> ValueTypeRange<BlockArgListType> {
155 BlockArgument Block::addArgument(Type type, Location loc) {
162 auto Block::addArguments(TypeRange types, ArrayRef<Location> locs)
174 BlockArgument Block::insertArgument(unsigned index, Type type, Location loc) {
189 BlockArgument Block::insertArgument(args_iterator it, Type type, Location loc) {
195 void Block::eraseArgument(unsigned index) {
203 void Block::eraseArguments(unsigned start, unsigned num) {
212 void Block::eraseArguments(const BitVector &eraseIndices) {
217 void Block::eraseArguments(function_ref<bool(BlockArgument)> shouldEraseFn) {
246 Operation *Block::getTerminator() {
252 bool Block::mightHaveTerminator() {
257 unsigned Block::getNumSuccessors() {
261 Block *Block::getSuccessor(unsigned i) {
272 Block *Block::getSinglePredecessor() {
283 Block *Block::getUniquePredecessor() {
308 /// The newly formed Block is returned, and the specified iterator is
310 Block *Block::splitBlock(iterator splitBefore) {
313 auto *newBB = new Block();
327 Block *PredecessorIterator::unwrap(BlockOperand &value) {
342 SuccessorRange::SuccessorRange(Block *block) : SuccessorRange() {
355 bool Block::isReachable(Block *other, SmallPtrSet<Block *, 16> &&except) {
362 SmallVector<Block *> worklist(succ_begin(), succ_end());
364 Block *next = worklist.pop_back_val();
379 BlockRange::BlockRange(ArrayRef<Block *> blocks) : BlockRange(nullptr, 0) {
391 return {llvm::dyn_cast_if_present<Block *const *>(object) + index};
395 Block *BlockRange::dereference_iterator(OwnerT object, ptrdiff_t index) {
398 return llvm::dyn_cast_if_present<Block *const *>(object)[index];