diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 9010c3c..be783bc 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -3649,7 +3649,11 @@ void MachineBlockPlacement::assignBlockOrder( const std::vector<const MachineBasicBlock *> &NewBlockOrder) { assert(F->size() == NewBlockOrder.size() && "Incorrect size of block order"); F->RenumberBlocks(); - MPDT->updateBlockNumbers(); + // At this point, we possibly removed blocks from the function, so we can't + // renumber the domtree. At this point, we don't need it anymore, though. + // TODO: move this to the point where the dominator tree is actually + // invalidated (i.e., where blocks are removed without updating the domtree). + MPDT = nullptr; bool HasChanges = false; for (size_t I = 0; I < NewBlockOrder.size(); I++) { |