llvm/unittests/Transforms
Chijun Sima 1a16c79be0 [Dominators] Make RemoveUnreachableBlocks return false if the BasicBlock is already awaiting deletion
Summary:
Previously, `removeUnreachableBlocks` still returns true (which indicates the CFG is changed) even when all the unreachable blocks found is awaiting deletion in the DDT class.
This makes code pattern like
```
// Code modified from lib/Transforms/Scalar/SimplifyCFGPass.cpp 
bool EverChanged = removeUnreachableBlocks(F, nullptr, DDT);
...
do {
    EverChanged = someMightHappenModifications();
    EverChanged |= removeUnreachableBlocks(F, nullptr, DDT);
  } while (EverChanged);
```
become a dead loop.
Fix this by detecting whether a BasicBlock is already awaiting deletion.

Reviewers: kuhar, brzycki, dmgreen, grosser, davide

Reviewed By: kuhar, brzycki

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338882 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-03 12:45:29 +00:00
..
IPO
Scalar [Dominators] Remove verifyDomTree and add some verifying for Post Dom Trees 2018-02-28 11:00:08 +00:00
Utils [Dominators] Make RemoveUnreachableBlocks return false if the BasicBlock is already awaiting deletion 2018-08-03 12:45:29 +00:00
Vectorize [VPlan] Introduce VPLoopInfo analysis. 2018-07-31 01:57:29 +00:00
CMakeLists.txt [VPlanRecipeBase] Add insertBefore helper. 2018-06-18 11:34:17 +00:00