]> granicus.if.org Git - llvm/commit
[Dominators] Assert if there is modification to DelBB while it is awaiting deletion
authorChijun Sima <simachijun@gmail.com>
Wed, 25 Jul 2018 06:18:33 +0000 (06:18 +0000)
committerChijun Sima <simachijun@gmail.com>
Wed, 25 Jul 2018 06:18:33 +0000 (06:18 +0000)
commita23be0643b82dad02c1af9cf235beb555a80dc05
tree30b7e7a6dd1ae003224695721162674e8a2b929e
parent434ff8b75b914a2d35b0dc5a205340adc564e238
[Dominators] Assert if there is modification to DelBB while it is awaiting deletion

Summary:
Previously, passes use
```
DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy);
DTU.deleteBB(DelBB);
```
to delete a BasicBlock.
But passes which don't have the ability to update DomTree (e.g. tailcallelim, simplifyCFG) cannot recognize a DelBB awaiting deletion and will continue to process this DelBB.
This is a simple approach to notify devs of passes which may use DTU in the future to deal with deleted BasicBlocks under Lazy Strategy correctly.

Reviewers: kuhar, brzycki, dmgreen

Reviewed By: kuhar

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D49731

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337891 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DomTreeUpdater.h
lib/IR/DomTreeUpdater.cpp