34 applyUpdatesImpl<
true>();
37 applyUpdatesImpl<
false>();
39bool DomTreeUpdater::forceFlushDeletedBB() {
49 "DelBB has been modified while awaiting deletion.");
51 BB->eraseFromParent();
64 validateDeleteBB(DelBB);
65 if (
Strategy == UpdateStrategy::Lazy) {
76 validateDeleteBB(DelBB);
77 if (
Strategy == UpdateStrategy::Lazy) {
78 Callbacks.push_back(CallBackOnDeletion(DelBB, Callback));
89void DomTreeUpdater::validateDeleteBB(
BasicBlock *DelBB) {
90 assert(DelBB &&
"Invalid push_back of nullptr DelBB.");
93 while (!DelBB->
empty()) {
102 new UnreachableInst(DelBB->
getContext(), DelBB);
108#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
110 OS <<
"Pending Callbacks:\n";
112 for (
const auto &BB : Callbacks) {
113 OS <<
" " << Index <<
" : ";
116 OS << BB->getName() <<
"(";
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
#define LLVM_EXPORT_TEMPLATE
This file contains the declarations for the subclasses of Constant, which represent the different fla...
This file defines a set of templates that efficiently compute a dominator tree over a generic graph.
LLVM Basic Block Representation.
const Instruction & back() const
LLVM_ABI void removeFromParent()
Unlink 'this' from the containing function, but do not delete it.
LLVM_ABI SymbolTableList< BasicBlock >::iterator eraseFromParent()
Unlink 'this' from the containing function and delete it.
LLVM_ABI LLVMContext & getContext() const
Get the context in which this basic block lives.
LLVM_ABI LLVM_DUMP_METHOD void dump() const
Debug method to help view the internal state of this class.
LLVM_ABI void callbackDeleteBB(BasicBlock *DelBB, std::function< void(BasicBlock *)> Callback)
Delete DelBB.
LLVM_ABI void deleteBB(BasicBlock *DelBB)
Delete DelBB.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
SmallPtrSet< BasicBlockT *, 8 > DeletedBBs
void eraseDelBBNode(BasicBlockT *DelBB)
const UpdateStrategy Strategy
LLVM_DUMP_METHOD void dump() const
LLVM_ABI InstListType::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
static LLVM_ABI PoisonValue * get(Type *T)
Static factory methods - Return an 'poison' object of the specified type.
PostDominatorTree Class - Concrete subclass of DominatorTree that is used to compute the post-dominat...
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
bool pred_empty(const BasicBlock *BB)